-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Metrics] Prometheus exporter reports instrumentation library name instead of instrument name #1370
Comments
+1: I just hit this same issue (I think) when trying to spin-up the prometheus example. I see the counter / histogram values being read out by the corresponding I'm assuming this is related because it does also seem like a metric aliasing issue, but maybe I'm down the wrong path. |
The spec says:
and likewise for the description. If I understand correctly, @esigo meant something like this:
Without it, views with an empty name end up exposing metrics with empty names to Prometheus, which fails to scrap. |
Good point. Thanks for clarifying. |
Greetings,
I am attempting to export to Prometheus from an application based on the Prometheus example.
WITH_METRICS_PREVIEW is undefined.
Running the example binary appears to work, and reports a metric named
prometheus_metric_example
, type counter,for an instrument named
prometheus_metric_example_counter
in the C++ code.Running my application,
No matter how instruments or views are named, the data exported to Prometheus always reports the same metric name,
which is the name given as instrumentation library when calling GetMeter().
Should the prometheus export code use
metric_data.instrument_descriptor.name_
instead ofinstrumentation_info.instrumentation_library_->GetName()
?Also, there is no HELP exported to Prometheus.
The following change helps to go further ...
Regards.
The text was updated successfully, but these errors were encountered: