[bug] Divergence between metrics names exposed between Prometheus Exporter and Otlp Exporter (Unit not appended) #5814
Labels
bug
Something isn't working
needs-triage
New issues which have not been classified or triaged by a community member
pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol
Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package
Package
OpenTelemetry.Exporter.OpenTelemetryProtocol
Package Version
Runtime Version
net8.0
Description
Our application uses metrics exposed by the
AddAspNetCoreInstrumentation
.Before updating to the OpenTelemetry Exporter, we were using the
AddPrometheusExporter
+MapPrometheusScrapingEndpoint
, so Prometheus could scrape the application directly.After changing to the OpenTelemetry Exporter (
AddOtlpExporter
), we noticed that metric names have changed.The unit is not been appended on metric name as before, impacting the dashboards provided by .NET Team for Grafana ASP.NET Core Dashboard (You can check that the dashboard template is configured with metrics that contains the unit suffix)
Example of metric name with Prometheus Exporter:
http_server_request_duration_seconds
Metric name with OtlpExporter:
http_server_request_duration
Steps to Reproduce
WithMetrics
extension and add bothAddOtlpExporter
and point it to the Opel Collector (default: http://localhost:4317).Expected Result
Metric names should contains unit appended to their names.
Ex:
Actual Result
Metrics with no unit appended, for example:
Additional Context
Perhas is just a configuration issue on my part, but I could not find any configuration that makes the OpenTelemetry exporter to append the metric unit.
The text was updated successfully, but these errors were encountered: