instrumentation scope dropped from metrics #337
Replies: 3 comments
-
|
micrometer metrics are disabled by default in the agent. What are your settings? |
Beta Was this translation helpful? Give feedback.
-
|
That micrometer metric was just an example. OTel metrics similarly lack the instrumentation scope if I query prometheus in the otel-lgtm container: But, the micrometer metric is illustrative -- when micrometer metric export is enabled, there are two Without the instrumentation scope, I can't filter for only the metric I want in my charts. Here's the configuration I'm using. otel-lgtm is running locally via docker run in the file pointed to by OTEL_JAVAAGENT_CONFIGURATION_FILE : in my IDE, my run configuration specifies the following env vars to export to the local otel-lgtm container: |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for explaining the use case. The only solution I know is to check for the existence of other attributes - BTW, I now realize that scope is not supposed to be part of the attributes - as it's usually not needed. Resource attributes can be promoted though: https://github.com/prometheus/prometheus/blob/main/config/config.go#L1442 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
context:
java spring boot app, instrumented via OTel java agent 2.10.0
(spring boot 3.4.0, java temurin 21.0.1)
in the prometheus data exposed via Grafana, I don't see instrumentation scope in the metrics.
in my application's startup, if I enable additional exporters:
OTEL_METRICS_EXPORTER=otlp,prometheus,consoleand query the prom endpoint, I see the instrumentation scope there:
and, in the
consoleoutput, I see instrumentation scope in the OTLP export:but, in the otel-lgtm Grafana, if I query that metric, I don't see a instrumentation scope in the raw attributes of the metric:
Beta Was this translation helpful? Give feedback.
All reactions