Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where an empty exemplar was added to counters #5395

Merged
merged 2 commits into from Apr 16, 2024

Conversation

dashpole
Copy link
Contributor

@dashpole dashpole commented Apr 15, 2024

Fixes #5383

I also found out that the +Inf bucket is only sometimes added to the proto format: https://github.com/prometheus/client_golang/blob/d038ab96c0c7b9cd217a39072febd610bcdf1fd8/prometheus/metric.go#L189

That meant we were dropping the highest histogram bucket if users were not using exemplars.

@gouthamve

Copy link

codecov bot commented Apr 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.1%. Comparing base (2faced4) to head (ce4e263).

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #5395   +/-   ##
=====================================
  Coverage   62.1%   62.1%           
=====================================
  Files        186     186           
  Lines      11527   11537   +10     
=====================================
+ Hits        7166    7176   +10     
  Misses      4149    4149           
  Partials     212     212           
Files Coverage Δ
bridges/prometheus/producer.go 90.6% <100.0%> (+0.3%) ⬆️

@dashpole dashpole marked this pull request as ready for review April 15, 2024 13:54
@dashpole dashpole requested a review from a team as a code owner April 15, 2024 13:54
Copy link
Member

@gouthamve gouthamve left a comment

Choose a reason for hiding this comment

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

LGTM

@pellared pellared merged commit e90376c into open-telemetry:main Apr 16, 2024
23 checks passed
@dashpole dashpole deleted the fix_exemplars branch April 16, 2024 14:02
scorpionknifes pushed a commit to scorpionknifes/opentelemetry-go-contrib that referenced this pull request Apr 24, 2024
scorpionknifes pushed a commit to scorpionknifes/opentelemetry-go-contrib that referenced this pull request Apr 24, 2024
@MrAlias MrAlias added this to the v1.26.0 milestone Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prometheusbridge: Creates invalid exemplars for Prometheus counters
5 participants