Skip to content

Conversation

@pichlermarc
Copy link
Member

@pichlermarc pichlermarc commented Feb 11, 2025

Which problem is this PR solving?

For @opentelemetry/[email protected] we'll remove isWrapped() since it's duplicated in @opentelemetry/instrumentation. It makes more sense to have it in @opentelemetry/instrumentation since that's actually an instrumentation-related utility function.

Refs open-telemetry/opentelemetry-js#5444

Short description of the changes

Uses isWrapped() from @opentelemetry/instrumentation instead. It is a drop-in replacement as the implementations are identical:

ShimWrapped is also fully compatible:

@codecov
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.40%. Comparing base (2989b94) to head (9af54bb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2704   +/-   ##
=======================================
  Coverage   92.40%   92.40%           
=======================================
  Files         171      171           
  Lines        8142     8142           
  Branches     1647     1647           
=======================================
  Hits         7524     7524           
  Misses        618      618           
Files with missing lines Coverage Δ
...lugin-react-load/src/BaseOpenTelemetryComponent.ts 97.04% <100.00%> (ø)

@pichlermarc pichlermarc merged commit 58bc158 into open-telemetry:main Feb 11, 2025
25 checks passed
@trentm
Copy link
Contributor

trentm commented Feb 11, 2025

Hrm, this should have failed npm run lint:deps. It does on main now:

[10:36:37 trentm@peach:~/src/opentelemetry-js-contrib (git:main)]
% npm run lint:deps

> [email protected] lint:deps
> npx --yes [email protected] --dependencies --production --tags=-knipignore

Unused dependencies (2)
@opentelemetry/otlp-transformer  packages/opentelemetry-test-utils/package.json
@opentelemetry/core              plugins/web/opentelemetry-plugin-react-load/package.json
Unlisted dependencies (1)
@opentelemetry/instrumentation  plugins/web/opentelemetry-plugin-react-load/src/BaseOpenTelemetryComponent.ts

[10:36:46 trentm@peach:~/src/opentelemetry-js-contrib (git:main rv:1)]
% echo $?
1

plugins/web/opentelemetry-plugin-react-load needs to change its dep to be on instrumentation instead of core.

@trentm
Copy link
Contributor

trentm commented Feb 11, 2025

Ah, lint:deps was accidentally removed from linting in #2493

https://github.com/open-telemetry/opentelemetry-js-contrib/pull/2493/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L26-R24

Likely from a merge: that PR and adding lint:deps were both within days of each other.

@trentm
Copy link
Contributor

trentm commented Feb 11, 2025

#2709 added to fix that up.

deejay1 pushed a commit to deejay1/opentelemetry-js-contrib that referenced this pull request Apr 14, 2025
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.

5 participants