Component(s)
No response
What happened?
Describe the bug
Using Prometheus exporter with add_metric_suffixes: false in 0.154.0 adds unit to metric name, where 0.153.0 using the same config does not.
I suspect, but have not verified, that prometheus/common#877 pulled in by open-telemetry/opentelemetry-collector#15379 is buggy.
Steps to reproduce
Define config for opentelemetry-collector as below and export a metric, say
http.server.requests{method=GET,outcome=SUCCESS,status=200,uri=/yourUrl} count=1 sum=1108.618208 le10=0 ... le5000=0 0
Then curl the /metrics endpoint.
What did you expect to see?
Using 0.153.0 I expect and do get:
# HELP http_server_requests HTTP server request processing time
# TYPE http_server_requests histogram
http_server_requests_bucket{job="unknown_service",method="GET",otel_scope_name="",otel_scope_schema_url="",otel_scope_version="",outcome="SUCCESS",status="200",uri="/yourUrl",le="10"} 0
What did you see instead?
Using 0.154.0 I expect the metric name to remain http_server_requests_bucket, but I get:
# HELP http_server_requests_milliseconds HTTP server request processing time
# TYPE http_server_requests_milliseconds histogram
http_server_requests_milliseconds_bucket{job="unknown_service",method="GET",otel_scope_name="",otel_scope_schema_url="",otel_scope_version="",outcome="SUCCESS",status="200",uri="/yourUrl",le="10"} 0
The metric name has had an _milliseconds added.
Collector version
v0.154.0
Environment information
Environment
Docker container running platform linux/amd64 for both versions for debugging locally.
Same images running i Kubernetes v1.29.14+41c4e9b exhibits same issue.
OpenTelemetry Collector configuration
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
batch:
exporters:
debug:
verbosity: normal
prometheus:
add_metric_suffixes: false
endpoint: 0.0.0.0:8889
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [debug]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [debug, prometheus]
Log output
Additional context
No response
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Component(s)
No response
What happened?
Describe the bug
Using Prometheus exporter with
add_metric_suffixes: falsein 0.154.0 adds unit to metric name, where 0.153.0 using the same config does not.I suspect, but have not verified, that prometheus/common#877 pulled in by open-telemetry/opentelemetry-collector#15379 is buggy.
Steps to reproduce
Define config for opentelemetry-collector as below and export a metric, say
Then
curlthe/metricsendpoint.What did you expect to see?
Using 0.153.0 I expect and do get:
What did you see instead?
Using 0.154.0 I expect the metric name to remain
http_server_requests_bucket, but I get:The metric name has had an
_millisecondsadded.Collector version
v0.154.0
Environment information
Environment
Docker container running platform linux/amd64 for both versions for debugging locally.
Same images running i Kubernetes v1.29.14+41c4e9b exhibits same issue.
OpenTelemetry Collector configuration
Log output
Additional context
No response
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it. Learn more here.