Jack
Jack
Just want to chime in here -- I cherry-picked the original author's commits into a new PR (#2427), happy to take ownership of any requested changes to the OG PR,...
Not sure if this is related or not, but we're hitting an issue with the prometheus exporter and the http instrumentation. I added some debug logging and it looks like...
I've narrowed it down to the autoloader -- the [Instrumentation constructor](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation/src/instrumentation.ts#L59-L61) inits the metrics first, then the call to [`registerInstrumentation`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation/src/autoLoader.ts#L31-L40) passes in the same meterProvider to [`enableInstrumentations`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation/src/autoLoaderUtils.ts#L62-L64), triggering the instrumentation...
Could also be user error / us looking at outdated docs -- we've since stopped calling `registerInstrumentation`, construction of the plugin seems to be sufficient to monkeypatch.
@dyladan I think this would affect anything that extends InstrumentationAbstract, not necessarily specific to the http instrumentation
We just don't enable much else by default to have noticed/verified it affects others.
> check if the Meter is different or not, and only create the "Metric Instruments" when is something different This would get my vote, though it does mean the API...
@legendecas thank you for the base code, this should show the duplicate metrics/series: ```js const { MeterProvider } = require('@opentelemetry/sdk-metrics'); const api = require('@opentelemetry/api'); const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');...
To be clear, the individual data points aren't duplicated, but in the case where the HTTP instrumentation produces 4 metrics under the scoped metrics, 2 of those metrics will never...
> Although "same metric names" can exist in the output when you request http://localhost:9464/metrics, they are not "identical" metric records since their attributes (or labels in prometheus) are not the...