open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.11k stars 2.39k forks source link

Prometheus Receiver cannot read common exemplars #36130

Open tcolgate opened 3 weeks ago

tcolgate commented 3 weeks ago

Component(s)

receiver/prometheus

What happened?

Description

Steps to Reproduce

Expected Result

Actual Result

Cause

This appears to be a bug in the prometheus scrape code that is not catering for the quoted labels (raised prometheus/prometheus#15259) Using the standard otel http instrumentation, it's hard to avoid the dotted form of hte quoted labels.

It is possible to just strings.Replace the dots in the opentelemetry-go client library's prometheus exporter, but this is not a general fix for UTF8 label keys.

Collector version

679374a8656d39b5a38515c7d5fdaf708a999e4c

Environment information

go version go1.23.2 linux/amd64

OpenTelemetry Collector configuration

receivers:     
  prometheus:
        config:
          global:
            evaluation_interval: 1m
            scrape_interval: 1m
            scrape_protocols:
            - OpenMetricsText1.0.0
            - OpenMetricsText0.0.1
            scrape_timeout: 10s

Log output

WILL UPDATE ASAP

Additional context

No response

github-actions[bot] commented 3 weeks ago

Pinging code owners:

dashpole commented 3 weeks ago

Thanks for the report. Lets follow-up on the prometheus issue.