You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HI all,
we are using OT-JS Autoinstrumentation for Traces/Spans in our Project for some time. Every thing works right.
Now we would Create Metrics for the Autoinstrumentation, but we could not get it work.
We fellowed the documenation from here OT-JS Instrumentation
Could it be, that there is no metrics-instrumentation in Autoinstrumentation?
Autoinstrumentation is cool, we do not need any aditional instrumentation in our code for spans/traces. So my hope was, i only need to activate metrics and get some Metrics for e.g. incoming http-requests or db-connections.
Regards, Sascha
The text was updated successfully, but these errors were encountered:
Metrics is not enabled by default and there is an issue created to add that feature #4551
If you followed the link provided at the end it tells to use the require CLI option to load the metrics config like this
node --require ./instrumentation.js app.js
Assuming did follow the auto instrumentation instructions the docs are a bit misleading. The --require flag within NODE_OPTIONS environment var takes precedence over the one in the command therefore the SDK starts before the metrics is configured.
You need to make sure metrics config is loaded before registering auto instrumentations. You can update your auto instrumentations start script this way (taken from the docs)
HI all,
we are using OT-JS Autoinstrumentation for Traces/Spans in our Project for some time. Every thing works right.
Now we would Create Metrics for the Autoinstrumentation, but we could not get it work.
We fellowed the documenation from here OT-JS Instrumentation
Could it be, that there is no metrics-instrumentation in Autoinstrumentation?
Autoinstrumentation is cool, we do not need any aditional instrumentation in our code for spans/traces. So my hope was, i only need to activate metrics and get some Metrics for e.g. incoming http-requests or db-connections.
Regards, Sascha
The text was updated successfully, but these errors were encountered: