Skip to content

Conversation

@brianphillips
Copy link
Contributor

NB: code change primarily comes from #2813 and relates to #1942.

Which problem is this PR solving?

  • This allows ESM applications to successfully import (vs. require) the dataloader package while instrumenting via otel

Short description of the changes

  • Allows for default export to be nested inside the imported object instead of assuming its at the root level

…dule

Code primarily comes from open-telemetry#2813. This commit adds a test
@codecov
Copy link

codecov bot commented Aug 7, 2025

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.83%. Comparing base (ef59c8d) to head (694c51d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../instrumentation-dataloader/src/instrumentation.ts 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2973      +/-   ##
==========================================
- Coverage   89.84%   89.83%   -0.01%     
==========================================
  Files         188      188              
  Lines        9282     9288       +6     
  Branches     1903     1905       +2     
==========================================
+ Hits         8339     8344       +5     
- Misses        943      944       +1     
Files with missing lines Coverage Δ
.../instrumentation-dataloader/src/instrumentation.ts 98.12% <87.50%> (-0.58%) ⬇️
🚀 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.

Copy link
Member

@raphael-theriault-swi raphael-theriault-swi left a comment

Choose a reason for hiding this comment

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

Thank you for picking this up and adding the test !

@brianphillips brianphillips force-pushed the dataloader-esm-instrumentation branch from 98bb90b to 694c51d Compare August 8, 2025 13:54
Copy link
Member

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

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

looks good, thanks! :)

@pichlermarc pichlermarc merged commit 16979f6 into open-telemetry:main Aug 8, 2025
23 checks passed
@dyladan dyladan mentioned this pull request Aug 6, 2025
@brianphillips brianphillips deleted the dataloader-esm-instrumentation branch August 11, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants