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(otel): adds an API for generating span links #2614
Conversation
BenchmarksBenchmark execution time: 2024-03-18 14:59:18 Comparing candidate commit b18de31 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 35 metrics, 2 unstable metrics. scenario:BenchmarkPartialFlushing/Enabled-24
|
853481a
to
ce049ea
Compare
ce049ea
to
3519f3d
Compare
@dianashevchenko Do I also need to update mockspan.go? |
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.
Nits
@mabdinur just remembered this change should probably be reflected in the opentelemetry package as well. Since, OTel API does have the AddLink method, which we couldn't support before. |
I am not sure if the Otel API exposes an AddLink method: https://github.com/open-telemetry/opentelemetry-go/blob/main/trace/trace.go#L338. I think adding links to existing spans is a concept internal to the go sdk: https://github.com/open-telemetry/opentelemetry-go/blob/da047e70ef583efbc91883dd2e35c616569260ef/sdk/trace/span.go#L632C25-L632C32. |
@mabdinur please address my previous comments before marking the conversation as resolved 🙌 |
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
What does this PR do?
Adds
AddLink
to the span struct.Motivation
Currently span links can only be set on spans on span creation (via WithSpanLinks option). To support many use cases we need the ability to add SpanLinks after a span has been created.
Reviewer's Checklist
For Datadog employees:
@DataDog/security-design-and-guidance
.Unsure? Have a question? Request a review!