Skip to content

Conversation

@rochdev
Copy link
Member

@rochdev rochdev commented Dec 18, 2025

What does this PR do?

Fix tracer metadata when optional dependencies are missing.

Motivation

Native addons should always be loaded in a try/catch in case they can't be loaded. This is especially true when they are explicitly not installed, for example when omitting optional dependencies or when bundling the library without the native addons.

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

Overall package size

Self size: 4.35 MB
Deduped: 5.18 MB
No deduping: 5.18 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.0 | 68.46 kB | 797.03 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.78%. Comparing base (e9493e1) to head (3c661a1).
⚠️ Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7143      +/-   ##
==========================================
+ Coverage   84.76%   84.78%   +0.02%     
==========================================
  Files         521      521              
  Lines       22151    22156       +5     
==========================================
+ Hits        18776    18786      +10     
+ Misses       3375     3370       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@datadog-official

This comment has been minimized.

@pr-commenter
Copy link

pr-commenter bot commented Dec 18, 2025

Benchmarks

Benchmark execution time: 2025-12-18 19:48:50

Comparing candidate commit 3c661a1 in PR branch fix-tracer-metadata-omit-optional with baseline commit e9493e1 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 288 metrics, 32 unstable metrics.

@rochdev rochdev marked this pull request as ready for review December 18, 2025 19:58
@rochdev rochdev requested a review from a team as a code owner December 18, 2025 19:58
Copy link
Collaborator

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

LGTM. I think having an additional test case that has none of the optional dependencies installed and using features for all of those would be good as well. Where we have a map of configs that have to be defined for each of them and we check that the map is kept up to date with the entries in the package.json. That way we know that we find all.

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