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

Scope info should only be exported for Prometheus if OpenMetrics is requested #5182

Merged

Conversation

robertcoltheart
Copy link
Contributor

@robertcoltheart robertcoltheart commented Dec 15, 2023

Fixes #3972

Changes

otel_scope_info was mistakenly being exported for non-OpenMetrics scrapes. This fix corrects this so that it will only be exposed for OpenMetrics.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@robertcoltheart robertcoltheart changed the title Scope info should only be exported if OpenMetrics is requested Scope info should only be exported for Prometheus if OpenMetrics is requested Dec 15, 2023
@robertcoltheart robertcoltheart marked this pull request as ready for review December 15, 2023 02:08
@robertcoltheart robertcoltheart requested a review from a team December 15, 2023 02:08
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

Merging #5182 (5ff87f0) into main (3c986e8) will decrease coverage by 0.03%.
The diff coverage is 70.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5182      +/-   ##
==========================================
- Coverage   83.50%   83.48%   -0.03%     
==========================================
  Files         297      297              
  Lines       12386    12387       +1     
==========================================
- Hits        10343    10341       -2     
- Misses       2043     2046       +3     
Flag Coverage Δ
unittests 83.48% <70.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...tpListener/Internal/PrometheusCollectionManager.cs 77.77% <70.00%> (+0.19%) ⬆️

... and 9 files with indirect coverage changes

Copy link
Member

@reyang reyang left a comment

Choose a reason for hiding this comment

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

Consider updating the changelog by putting this PR and the previous PR under the same entry (similar to what https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry/CHANGELOG.md#050-beta2 has - "Refactored simple export and batch export APIs (#1078 #1081 #1083 #1085 #1087 #1094 #1113 #1127 #1129 #1135)").

@utpilla utpilla merged commit 7eeae5b into open-telemetry:main Dec 15, 2023
78 checks passed
@robertcoltheart robertcoltheart deleted the bug/fix-export-scope-info branch December 15, 2023 05:00
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.

Prometheus exporter handles instrumentation scope and prevents collisions
3 participants