Skip to content

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

Merged
utpilla merged 5 commits intoopen-telemetry:mainfrom
robertcoltheart:bug/fix-export-scope-info
Dec 15, 2023
Merged

Scope info should only be exported for Prometheus if OpenMetrics is requested#5182
utpilla merged 5 commits intoopen-telemetry:mainfrom
robertcoltheart:bug/fix-export-scope-info

Conversation

@robertcoltheart
Copy link
Copy Markdown
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
@codecov
Copy link
Copy Markdown

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
Copy Markdown
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)").

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