Skip to content

Conversation

@songy23
Copy link
Member

@songy23 songy23 commented Jul 23, 2025

cherry-pick of d82267d

go.opentelemetry.io/otel/exporters/prometheus v0.59.1 does not fully fix the metric name issue so we have to revert to v0.58.0

Downgrades opentelemetry-go dependencies effectively reverting #13289 and others

  • Due to a bug in the prometheus exporter, if you are configuring a prometheus exporter, the collector's internal metrics will be emitted with an unexpected suffix in its name. For example, the metric
    otelcol_exporter_sent_spans__spans__total instead of otelcol_exporter_sent_spans_total. The workaround is to manually configure without_units: true in your prometheus exporter config
 service:
   telemetry:
     metrics:
       readers:
         - pull: 
             exporter: 
               prometheus: 
                 host: 0.0.0.0 
                 port: 8888 
                 without_units: true 

If you are using the collector's default Prometheus exporter for exporting internal metrics you are unaffected.

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

Downgrades opentelemetry-go dependencies effectively reverting open-telemetry#13289
and others

- Due to a
[bug](open-telemetry/opentelemetry-go#7039) in
the prometheus exporter, if you are configuring a prometheus exporter,
the collector's internal metrics will be emitted with an unexpected
suffix in its name. For example, the metric
`otelcol_exporter_sent_spans__spans__total` instead of
`otelcol_exporter_sent_spans_total`. The workaround is to manually
configure `without_units: true` in your prometheus exporter config

  ```yaml
  service:
    telemetry:
      metrics:
        readers:
          - pull:
              exporter:
                prometheus:
                  host: 0.0.0.0
                  port: 8888
                  without_units: true
  ```
If you are using the collector's default Prometheus exporter for
exporting internal metrics you are unaffected.

---------

Signed-off-by: alex boten <[email protected]>
Co-authored-by: alex boten <[email protected]>
Co-authored-by: Yang Song <[email protected]>
@codecov
Copy link

codecov bot commented Jul 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.44%. Comparing base (f68d710) to head (6849599).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13466   +/-   ##
=======================================
  Coverage   91.44%   91.44%           
=======================================
  Files         533      533           
  Lines       29564    29566    +2     
=======================================
+ Hits        27034    27036    +2     
  Misses       1998     1998           
  Partials      532      532           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mx-psi mx-psi added the release:blocker The issue must be resolved before cutting the next release label Jul 23, 2025
Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ArthurSens @dashpole would appreciate a review from your side, thx!

@codeboten
Copy link
Contributor

Is there a new bug opened to track this in prometheus?

@songy23
Copy link
Member Author

songy23 commented Jul 23, 2025

Is there a new bug opened to track this in prometheus?

looks like it's prometheus/otlptranslator#44

@codeboten codeboten added this pull request to the merge queue Jul 23, 2025
Merged via the queue into open-telemetry:main with commit 59b5328 Jul 23, 2025
75 checks passed
@songy23 songy23 deleted the cherry-pick-d82267d branch July 23, 2025 16:47
github-merge-queue bot pushed a commit that referenced this pull request Jul 31, 2025
)

Reverts #13514

Context:
#13466

go.opentelemetry.io/otel/exporters/prometheus v0.59.x has a bug leading
to unexpected suffix in metric names, we want to stay with v0.58.0
songy23 added a commit to open-telemetry/opentelemetry-collector-contrib that referenced this pull request Aug 8, 2025
…41869)

#### Description
Similar to
open-telemetry/opentelemetry-collector-releases#1067
but for contrib
This avoids accidentally pulling in
go.opentelemetry.io/otel/exporters/prometheus v0.59.x when building your
distros. v0.59.x has a known bug in metric names. See
open-telemetry/opentelemetry-collector#13466.

#### Link to tracking issue
open-telemetry/opentelemetry-collector#13544
obs-gh-mattcotter added a commit to observeinc/observe-agent that referenced this pull request Aug 29, 2025
…and status check (#255)

Context:
open-telemetry/opentelemetry-collector#13466

go.opentelemetry.io/otel/exporters/prometheus v0.59.x has a bug leading
to unexpected suffix in metric names, we need to stay with v0.58.0 to
make `observe-agent status` work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:blocker The issue must be resolved before cutting the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants