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
tracing: Adds support for Span Links #2502
Conversation
f37b8cc
to
3707d3b
Compare
3707d3b
to
01edc9a
Compare
BenchmarksBenchmark execution time: 2024-02-01 19:10:30 Comparing candidate commit c75a095 in PR branch Found 0 performance improvements and 12 performance regressions! Performance is the same for 27 metrics, 2 unstable metrics. scenario:BenchmarkOTelApiWithCustomTags/datadog_otel_api-24
scenario:BenchmarkPartialFlushing/Disabled-24
scenario:BenchmarkPartialFlushing/Enabled-24
scenario:BenchmarkSingleSpanRetention/no-rules-24
scenario:BenchmarkSingleSpanRetention/with-rules/match-all-24
scenario:BenchmarkSingleSpanRetention/with-rules/match-half-24
scenario:BenchmarkStartSpan-24
scenario:BenchmarkTracerAddSpans-24
|
e9a5b3b
to
b8467aa
Compare
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golangci
ddtrace/ddtrace_gen.go|714 col 23| z.Parent.Msgsize undefined (type SpanContext has no field or method Msgsize)
ddtrace/ddtrace_gen.go|721 col 43| z.Context.Msgsize undefined (type context.Context has no field or method Msgsize)
ddtrace/ddtrace_gen.go|721 col 43| too many errors) (typecheck)
ddtrace/ddtrace_gen.go|393 col 19| z.Parent.DecodeMsg undefined (type SpanContext has no field or method DecodeMsg)
ddtrace/ddtrace_gen.go|441 col 20| z.Context.DecodeMsg undefined (type context.Context has no field or method DecodeMsg)
ddtrace/ddtrace_gen.go|484 col 17| z.Parent.EncodeMsg undefined (type SpanContext has no field or method EncodeMsg)
ddtrace/ddtrace_gen.go|536 col 18| z.Context.EncodeMsg undefined (type context.Context has no field or method EncodeMsg)
ddtrace/ddtrace_gen.go|567 col 20| z.Parent.MarshalMsg undefined (type SpanContext has no field or method MarshalMsg)
ddtrace/ddtrace_gen.go|591 col 21| z.Context.MarshalMsg undefined (type context.Context has no field or method MarshalMsg)
ddtrace/ddtrace_gen.go|628 col 24| z.Parent.UnmarshalMsg undefined (type SpanContext has no field or method UnmarshalMsg)
ddtrace/ddtrace_gen.go|676 col 25| z.Context.UnmarshalMsg undefined (type context.Context has no field or method UnmarshalMsg)
ddtrace/ddtrace_gen.go|714 col 23| z.Parent.Msgsize undefined (type SpanContext has no field or method Msgsize)
ddtrace/ddtrace_gen.go|721 col 43| z.Context.Msgsize undefined (type context.Context has no field or method Msgsize)
ddtrace/ddtrace_gen.go|721 col 43| too many errors (typecheck)
ddtrace/ddtrace_gen.go|393 col 19| z.Parent.DecodeMsg undefined (type SpanContext has no field or method DecodeMsg)
ddtrace/ddtrace_gen.go|441 col 20| z.Context.DecodeMsg undefined (type context.Context has no field or method DecodeMsg)
ddtrace/ddtrace_gen.go|484 col 17| z.Parent.EncodeMsg undefined (type SpanContext has no field or method EncodeMsg)
ddtrace/ddtrace_gen.go|536 col 18| z.Context.EncodeMsg undefined (type context.Context has no field or method EncodeMsg)
ddtrace/ddtrace_gen.go|567 col 20| z.Parent.MarshalMsg undefined (type SpanContext has no field or method MarshalMsg)
ddtrace/ddtrace_gen.go|591 col 21| z.Context.MarshalMsg undefined (type context.Context has no field or method MarshalMsg)
ddtrace/ddtrace_gen.go|628 col 24| z.Parent.UnmarshalMsg undefined (type SpanContext has no field or method UnmarshalMsg)
ddtrace/ddtrace_gen.go|676 col 25| z.Context.UnmarshalMsg undefined (type context.Context has no field or method UnmarshalMsg)
ddtrace/ddtrace_gen.go|714 col 23| z.Parent.Msgsize undefined (type SpanContext has no field or method Msgsize)
ddtrace/ddtrace_gen.go|721 col 43| z.Context.Msgsize undefined (type context.Context has no field or method Msgsize)
ddtrace/ddtrace_gen.go|721 col 43| too many errors) (typecheck)
c4c9639
to
e86dbac
Compare
e1bd0ba
to
9116d8d
Compare
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golangci
ddtrace/span_link_msgp.go|363 col 19| z.Parent.DecodeMsg undefined (type SpanContext has no field or method DecodeMsg)
ddtrace/span_link_msgp.go|411 col 20| z.Context.DecodeMsg undefined (type context.Context has no field or method DecodeMsg)
ddtrace/span_link_msgp.go|454 col 17| z.Parent.EncodeMsg undefined (type SpanContext has no field or method EncodeMsg)
ddtrace/span_link_msgp.go|506 col 18| z.Context.EncodeMsg undefined (type context.Context has no field or method EncodeMsg)
ddtrace/span_link_msgp.go|533 col 23| z.Parent.Msgsize undefined (type SpanContext has no field or method Msgsize)
ddtrace/span_link_msgp.go|540 col 43| z.Context.Msgsize undefined (type context.Context has no field or method Msgsize)) (typecheck)
94bc4d0
to
0f64408
Compare
opentelemetry: Adds support for SpanLinks [WIP] copy biolerplate for msgpack encoding serialize otel span links update mock span and clean up tests fix broken auto gen tests
revert unnecessary changes
|
I removed asm-go from the reviewers as I didn't see anything other than pure APM tracing in this PR. |
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.
A few nits for some Go idioms, but otherwise looks good. Thanks!
2c0ac32
to
db266fa
Compare
db266fa
to
c75a095
Compare
What does this PR do?
Implements Span Links in the opentelemetry datadog API
Builds on: https://github.com/DataDog/dd-trace-go/pull/2396/files#diff-a8dc5a7b943aca594d89dc56beced16d9dbc951c6aa0c0ce2d328432dab92c80.
Motivation
Previously setting a span link on an OpenTelemetry span would result in a no-op with this change SpanLinks will be serialized and sent to the Datadog Agent.
Testing
Run the following snippet with a version of the datadog agent that support decoding v0.4 span links:
This generates the following trace level logs in the agent:
These links are currently shown in the Datadog UI as "hidden span attributes":
Reviewer's Checklist
For Datadog employees:
@DataDog/security-design-and-guidance.Unsure? Have a question? Request a review!