-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(opentelemetry): Add addLink(s)
to span
#15387
Conversation
size-limit report 📦
|
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
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.
Nice! This all looks reasonable to me. Just wondered if we're missing something to correctly serialize a span link on the root span to event.contexts.trace
?
So basically for a case like
const someSpan = startInactiveSpan(...);
someSpanContext = someSpan.spanContext();
someSpan.end();
startSpan({name: 'rootSpan'}, () => {
rootSpan.addLink({context: someSpanContext});
})
(which is probably quite similar to how we'll eventually link previous traces)
// A general note regarding this test: | ||
// The fact that the trace_id and span_id are correctly linked is tested in a unit test |
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.
I also only learned this by chance but if this is about not being able to store the ids in variables to compare: You can pass a function to expect({ transaction }) so that you can write better assertions than just comparing the matching object. See here for an example
dcfe159
to
2fb2b9d
Compare
dev-packages/node-integration-tests/suites/tracing/linking/test.ts
Outdated
Show resolved
Hide resolved
addLink(s)
to spanaddLink(s)
to 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.
Nice, thanks!
Link spans which are related. Example: