Closed ringerc closed 2 years ago
Further investigation showed that opentelemetry-http was actually irrelevant. It's a completely unrelated issue with the app that seems to have been introduced at the same time I started trialling instrumentation for it.
I'm looking for help/advice on tracking down an error when enabling
@opentelemetry/instrumentation-http
in a node app via@opentelemetry/auto-instrumentations-node
I'm a node ignoramus, but I'm hoping that even if it's a stupid question it'll help someone else later. When enabling tracing with
--require tracing.ts
and either of the typescript examples I include at the end of this ticket, I see errors like the following when my Express app starts up:I can't find any mention of an
authorization
header anywhere in the app codebase, nor any relevant looking ones inopentelemetry-js
oropentelemetry-js-contrib
. And I can't for the life of me figure out how the stack trace relates to the final error.It seems to hit variants of the same stack trace depending on whichever outbound http request it makes first, no matter what the target endpoint/service is.
I've tried using only the console span exporter, disabling zipkin/otel/prom exporters. No change.
I'm invoking the app via
umi dev --require ./tracing.ts
inpackage.json
in case theumi
framework is relevant.Versions:
and from
package.json
:Interestingly I don't see a similar error from the React app loading the same instrumentation wrapper, but I'm not sure if it's just not hitting the instrumented code yet. See: Node ignoramus trying to instrument an app that isn't mine.
Instrumentation
tracing.ts
version 1Instrumentation
tracing.ts
version 2