Skip to content

fix(instrumentation,instrumentation-http): fix codecov under-reporting#6867

Merged
pichlermarc merged 2 commits into
open-telemetry:mainfrom
mwear:codecov-under-reporting
Jul 2, 2026
Merged

fix(instrumentation,instrumentation-http): fix codecov under-reporting#6867
pichlermarc merged 2 commits into
open-telemetry:mainfrom
mwear:codecov-under-reporting

Conversation

@mwear

@mwear mwear commented Jul 1, 2026

Copy link
Copy Markdown
Member

Which problem is this PR solving?

I found this while working on #6864. Coverage for instrumentation and instrumentation-http was under-reported on Codecov. Both packages run their CJS and ESM (and double-instr) suites as separate nyc invocations. By default each nyc run cleans .nyc_output before running and writes a report after, so the later run wiped the earlier run's data and the final coverage-final.json reflected only the last suite.

Short description of the changes

  • Add --no-clean to the follow-on test runs so raw coverage accumulates in .nyc_output instead of being wiped.
  • Add a trailing nyc report to the test script to emit the merged report Codecov consumes.
  • Add --silent to the per-suite runs to suppress the partial intermediate reports.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Ran npm test in both packages and confirmed the resulting coverage-final.json includes coverage from all suites (CJS + ESM + double-instr) rather than only the final run.

Checklist:

  • Followed the style guidelines of this project

@mwear
mwear requested a review from a team as a code owner July 1, 2026 18:00
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.14%. Comparing base (d61ab5f) to head (67b6c2e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6867      +/-   ##
==========================================
- Coverage   95.58%   95.14%   -0.45%     
==========================================
  Files         388      397       +9     
  Lines       13170    14248    +1078     
  Branches     3005     3296     +291     
==========================================
+ Hits        12589    13556     +967     
- Misses        581      692     +111     

see 11 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pichlermarc pichlermarc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thank you 🙂

@pichlermarc
pichlermarc added this pull request to the merge queue Jul 2, 2026
Merged via the queue into open-telemetry:main with commit d375c08 Jul 2, 2026
29 checks passed
@otelbot-js otelbot-js Bot mentioned this pull request Jul 2, 2026
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.

2 participants