Skip to content

Prometheus exporter tests: iterate through all scopes rather than looking only at the first#7510

Merged
dmathieu merged 2 commits intoopen-telemetry:mainfrom
tongoss:feature/improve-prometheus-tests
Oct 16, 2025
Merged

Prometheus exporter tests: iterate through all scopes rather than looking only at the first#7510
dmathieu merged 2 commits intoopen-telemetry:mainfrom
tongoss:feature/improve-prometheus-tests

Conversation

@tongoss
Copy link
Copy Markdown
Contributor

@tongoss tongoss commented Oct 15, 2025

Current State: Only inspected the first ScopeMetrics[0].

New: Iterates all ScopeMetrics to look for the four expected metrics anywhere.

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.2%. Comparing base (9dea78c) to head (d29c27e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #7510   +/-   ##
=====================================
  Coverage   86.2%   86.2%           
=====================================
  Files        295     295           
  Lines      25864   25864           
=====================================
+ Hits       22307   22308    +1     
+ Misses      3184    3183    -1     
  Partials     373     373           

see 1 file with indirect coverage changes

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

@tongoss tongoss marked this pull request as ready for review October 15, 2025 05:16
@flc1125 flc1125 added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Oct 15, 2025
flc1125

This comment was marked as outdated.

@dmathieu dmathieu changed the title Update Prometheus Unit tests Prometheus exporter tests: iterate through all scopes rather than looking only at the first Oct 15, 2025
@dmathieu dmathieu merged commit b37822b into open-telemetry:main Oct 16, 2025
31 checks passed
@MrAlias MrAlias added this to the v1.39.0 milestone Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants