Register http instrumentation after the server has started #2240
Answered
by
dyladan
Dharin-shah
asked this question in
Q&A
-
hi, i am trying to use opentelemetry as a plugin to a system, and the plugins are loaded after the server has started. And i believe thats the reason why, auto-loading traces like http are not getting loaded.
|
Beta Was this translation helpful? Give feedback.
Answered by
dyladan
May 28, 2021
Replies: 1 comment 1 reply
-
Due to the nature of auto instrumentation, it is important that it is loaded before anything else. Otherwise it is very difficult to make any guarantees. I would recommend that you use something like node's -r flag to load the instrumentation code before your application code. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Dharin-shah
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Due to the nature of auto instrumentation, it is important that it is loaded before anything else. Otherwise it is very difficult to make any guarantees. I would recommend that you use something like node's -r flag to load the instrumentation code before your application code.