open-telemetry / opentelemetry-js

OpenTelemetry JavaScript Client
https://opentelemetry.io
Apache License 2.0
2.76k stars 810 forks source link

test(instrumentation): skip unwrap tests for esm #5153

Closed pichlermarc closed 1 week ago

pichlermarc commented 1 week ago

Which problem is this PR solving?

import-in-the-middle@1.11.1 broke Instrumentation#disable() functionality for ESM by introducing support to hook the same module multiple times (https://github.com/nodejs/import-in-the-middle/pull/153) - this makes tests fail in #5045 which bumps the lock file to that version.

This PR is to unblock updating by skipping the unwrap tests for ESM instrumentation. Going forward, we'll have to decide if the unwrapping-during-runtime is worth the complexity and maintenance overhead it introduces to every instrumentation package. Going through use-cases it seems like disabling/unwrapping is mostly used for testing - since the release of import-int-the-middle@1.11.1 we also had 0 user reports that this functionality is broken, which leads me to believe that this feature is not of significant enough value to a significant portion our end-users.

I'll open a follow-up issue to discuss this in-depth.

Short description of the changes

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.17%. Comparing base (72c9af9) to head (abea31b). Report is 9 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #5153 +/- ## ========================================== - Coverage 93.18% 93.17% -0.01% ========================================== Files 315 314 -1 Lines 8086 8076 -10 Branches 1617 1622 +5 ========================================== - Hits 7535 7525 -10 Misses 551 551 ``` [see 10 files with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-js/pull/5153/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)