我正在尝试使用Firebase云功能设置Stackdriver Trace。
但即使@google-cloud/trace-agent
是第一个加载的模块,我也会收到错误:
ERROR:@google-cloud/trace-agent: TraceAgent#start: Tracing might not work as the following modules were loaded before the trace agent was initialized: [accepts, body-parser, bytes, content-disposition, content-type, cookie, cookie-signature, crc, debug, depd, destroy, ee-first, escape-html, etag, express, finalhandler, forwarded, fresh, iconv-lite, ipaddr.js, media-typer, merge-descriptors, methods, mime, mime-db, mime-types, ms, negotiator, on-finished, parseurl, path-to-regexp, proxy-addr, qs, range-parser, raw-body, send, serve-static, type-is, utils-merge, vary]
它似乎与Firebase本身加载的模块有关。
是否存在阻止此日志显示的解决方案或使Trace与Firebase云功能一起使用的最佳方法是什么?