-
Notifications
You must be signed in to change notification settings - Fork 544
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
chore: remove usages of Span constructor #2458
chore: remove usages of Span constructor #2458
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2458 +/- ##
==========================================
- Coverage 90.97% 90.77% -0.21%
==========================================
Files 146 156 +10
Lines 7492 7716 +224
Branches 1502 1584 +82
==========================================
+ Hits 6816 7004 +188
- Misses 676 712 +36
|
This package does not have an assigned component owner and is considered unmaintained. As such this package is in feature-freeze and this PR will be closed with 14 days unless a new owner or a sponsor (a member of @open-telemetry/javascript-approvers) for the feature is found. It is the responsibility of the author to find a sponsor for this feature. |
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.
Looks good to me, thanks @david-luna. I've left one query regarding type coercion.
SpanKind.SERVER | ||
); | ||
ROOT_CONTEXT | ||
) as unknown as Span; |
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.
Do we need both type coercions here - can we coerce straight into Span
?
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.
Not necessary at all. Removing it in the next commit. Good catch :)
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.
Removed!
kind: SpanKind.INTERNAL, | ||
}, | ||
ROOT_CONTEXT | ||
) as unknown as Span; |
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.
Same as above.
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.
Removed!
Looks like the warning will be for opentelemetry-instrumentation-dns, not baggage-span-procesor. We may need to break up the PR to address the different components due to their level of ownership / maintenance. |
@MikeGoldsmith I'll sponsor the PR, then we don't need to break it up 🙂 |
plugins/node/opentelemetry-instrumentation-dns/test/functionals/utils.test.ts
Outdated
Show resolved
Hide resolved
export * from './baggage-span-processor'; | ||
export * from './types'; | ||
export { BaggageSpanProcessor } from './baggage-span-processor'; | ||
export { ALLOW_ALL_BAGGAGE_KEYS, BaggageKeyPredicate } from './types'; |
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.
note to reviewer: open-telemetry/opentelemetry-js#4186
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.
Thanks @david-luna 🙂
approving for @opentelemetry/instrumentation-dns
🙂
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.
Looks good for me too - thanks @david-luna 🎉
Which problem is this PR solving?
The Span constructor from ' @opentelemetry/sdk-trace-base` is planned for removal from the public API (ref).
This PR anticipates the possible breaking changes derived from it
Short description of the changes
new Span
constructor in favour ofTracer.startSpan