Initialisation order with express initialisation #2597
-
Hi! It's not clear from the documentation, but from experiment I believe that it's necessary to initialise opentelemetry, or at least to register the express instrumentation, before calling any function in express, is that true? I.e. it's not enough merely to have registered the express instrumentation before calling If I'm right, would you be amenable to a PR to add this information to https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-express/README.md ? Or is there a better place to document this requirement? I'll admit I find it hard to know where to look for guidance on using opentelemetry-js compared to, e.g. opentelemetry-python. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
The instrumentation needs to be created/registered before |
Beta Was this translation helpful? Give feedback.
The instrumentation needs to be created/registered before
require('express')
.