-
Notifications
You must be signed in to change notification settings - Fork 977
feat(core)!: remove unused/obsolete functions and types #5444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core)!: remove unused/obsolete functions and types #5444
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5444 +/- ##
==========================================
- Coverage 94.79% 94.77% -0.02%
==========================================
Files 310 308 -2
Lines 7974 7966 -8
Branches 1682 1678 -4
==========================================
- Hits 7559 7550 -9
- Misses 415 416 +1
|
|
@pichlermarc Trawling through opentelemetry-js-contrib.git I see some usages of |
trentm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, modulo possibly want to change how isWrapped is handled.
| * (user-facing): TracesSamplerValues was only consumed internally and has been removed from exports without replacement | ||
| * feat(core)!: remove unused and obsolete functions and types [#5444](https://github.com/open-telemetry/opentelemetry-js/pull/5444) @pichlermarc | ||
| * (user-facing): `VERSION` was an internal constant that was unintentionally exported. It has been removed without replacement. | ||
| * (user-facing): `isWrapped` has been removed in favor of `isWrapped` from `@opentelemetry/instrumentation` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I mentioned in a comment, this is used in one contrib package (plugin-react-load). So perhaps this falls under:
if an export is used in exactly one package - move its code to that package (do not export it from the package it was moved to)
It is used in tests in another package (opentelemetry-instrumentation-user-interaction), but that pkg also has a dep on @opentelemetry/instrumentation, so can use the isWrapped from there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, thanks for double checking - I had missed that one. I've opened a PR to make all necessary changes in contrib: open-telemetry/opentelemetry-js-contrib#2704
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since both implementations are identical I've opted to just use the one from @opentelemetry/instrumentation instead. :)
| export { isUrlIgnored, urlMatches } from './utils/url'; | ||
| export { isWrapped } from './utils/wrap'; | ||
| export { BindOnceFuture } from './utils/callback'; | ||
| export { VERSION } from './version'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no way to read the VERSION now.
Which problem is this PR solving?
Removing more unused functions and types from
@opentelemetry/core. These were all intended to be only used internally, or were previously used but are now obsolete.Refs #5172
Breaking changes
VERSIONwas an internal constant that was unintentionally exported. It has been removed without replacement.isWrappedhas been removed in favor ofisWrappedfrom@opentelemetry/instrumentationShimWrappedhas been removed in favor ofShimWrappedfrom@opentelemetry/instrumentationhexToBase64was a utility function that is not used by the SDK anymore. It has been removed without replacement.hexToBinarywas a utility function that now internal to@opentelemetry/otlp-tranformer. It has been removed without replacement.baggageUtils.getKeyPariswas an internal utility function that was unintentionally exported. It has been removed without replacement.baggageUtils.serializeKeyPairswas an internal utility function that was unintentionally exported. It has been removed without replacement.baggageUtils.parseKeyPairsIntoRecord,has been removed in favor ofparseKeyPairsIntoRecordbaggageUtils.parsePairKeyValuewas an internal utility function that was unintentionally exported. It has been removed without replacement.TimeOriginLegacyhas been removed without replacement.isAttributeKeywas an internal utility function that was unintentionally exported. It has been removed without replacement.Type of change
How Has This Been Tested?