Meter Tags and Prometheus HttpListener #5829
-
Hello, I'm having difficult understanding, the use of Tags and the resultant Prometheus output, from a The documentation for Metric Enrichment mentions:
But these do not appear to be working, when tags from Meter creation are specified they are not present in the Prometheus Output. I started looking over on Stack Overflow, and found this question. Which is identical to my issue. But I wanted to make it even easier to help the community here see what's going on. So on a fork of opentelemetry-dotnet, I have edited a test to show the issue. You can find the whole commit. But, to help further:
These changes result in a failing test as the Meter based tags are not present, but based on the documentation, I feel this should be working. It looks like only tags that are sent with a metric's value (via Set, Add, Record etc) are propagated. However, questions on this area seem to come up somewhat frequently so I'm a little confused. For example there's:
As such I am not sure:
Could anyone provide some guidance? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
This also affects "Observable" Instruments.
Tags created in this way also do not show up. |
Beta Was this translation helpful? Give feedback.
-
Prometheus supports instrumentation scope (Meter tags), only when OpenMetrics format is used. Is that your case? |
Beta Was this translation helpful? Give feedback.
Got it. It looks like a bug in Prometheus exporter. It is only exposing Meter name for the scope, not the version, not the tags! Could you report it as a bug?