Prometheus fails to scrap Process Instrumentation metrics due to issues with units #1616
Closed
1 of 2 tasks
Labels
comp:instrumentation.process
Things related to OpenTelemetry.Instrumentation.Process
Issue with OpenTelemetry.Instrumentation.Process
List of all OpenTelemetry NuGet
packages and version that you are
using (e.g.
OpenTelemetry 1.3.2
):Runtime version (e.g.
net462
,net48
,net6.0
,net7.0
etc. You canfind this information from the
*.csproj
file):Is this a feature request or a bug?
What is the expected behavior?
.AddProcessInstrumentation()
coupled with.AddPrometheusExported()
should correctly export metrics to Prometheus.What is the actual behavior?
We receive an exemplar error when Prometheus hits the scrape target:
unit "seconds" not a suffix of metric "process_cpu_time_seconds_total"
Process and Runtime metrics exported in Prometheus format do not meet OpenMetrics specification. The unit used attached in metadata does not match the metric suffix in several cases, causing Prometheus server and OpenTelemetry Collector's Prometheus receiver to throw errors while scraping the target.
This unit was defined in metadata for that metric:
OpenMetrics specification regarding units: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#unit
Additional Context
OT configuration:
With appsettings.json containing:
The text was updated successfully, but these errors were encountered: