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

Call scopeInfoMetrics only once even if it returns an error #4499

Merged

Conversation

dmathieu
Copy link
Member

@dmathieu dmathieu commented Sep 12, 2023

Closes #4091.

@dmathieu dmathieu force-pushed the no-double-call-scopeinfometrics branch from dd03f27 to f87115c Compare September 12, 2023 14:03
@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Merging #4499 (b316d42) into main (e3d6c8e) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #4499   +/-   ##
=====================================
  Coverage   81.3%   81.3%           
=====================================
  Files        220     220           
  Lines      17670   17678    +8     
=====================================
+ Hits       14378   14386    +8     
  Misses      2992    2992           
  Partials     300     300           
Files Changed Coverage
exporters/prometheus/exporter.go 100.0%

Copy link
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

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

Just two comments. Besides that it is great. Especially that you have even covered it in a unit test 👍

exporters/prometheus/exporter.go Outdated Show resolved Hide resolved
exporters/prometheus/exporter.go Outdated Show resolved Hide resolved
@pellared pellared merged commit ac56391 into open-telemetry:main Sep 14, 2023
22 checks passed
@dmathieu dmathieu deleted the no-double-call-scopeinfometrics branch September 14, 2023 07:53
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.

createScopeInfoMetric is unnecessarily called when it returns an error
3 participants