-
Notifications
You must be signed in to change notification settings - Fork 140
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
[Tracer] Extracting Last Parent Id If Conflicting SpanIds are Found with The W3C Headers #5721
Changes from all commits
506ad94
794e07e
fe0f045
cefa8d2
cad9105
aaac0d0
4216406
fdd4fd5
5e45656
459ca70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,7 +199,7 @@ private SpanContext(TraceId traceId, string serviceName) | |
/// <summary> | ||
/// Gets the span id. | ||
/// </summary> | ||
public ulong SpanId { get; } | ||
public ulong SpanId { get; internal set; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This feels iffy. Why are we adding a property setter? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So part of the W3C Phase 3 is the future deprecation of Datadog headers, so when we find conflicting headers we prioritize W3C span id and need to update them, in the latest commit I do so like:
Do you have any other prefer methods, I Googled the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, this is Still, it would've been nice to mutate things as little as possible. Maybe determine the final span id first before creating the Thanks for clarifying. |
||
|
||
/// <summary> | ||
/// Gets or sets the service name to propagate to child spans. | ||
|
@@ -251,10 +251,14 @@ internal string Origin | |
internal string RawTraceId => _rawTraceId ??= HexString.ToHexString(TraceId128); | ||
|
||
/// <summary> | ||
/// Gets the span id as a hexadecimal string of length 16, | ||
/// Gets or sets the span id as a hexadecimal string of length 16, | ||
/// padded with zeros to the left if needed. | ||
/// </summary> | ||
internal string RawSpanId => _rawSpanId ??= HexString.ToHexString(SpanId); | ||
internal string RawSpanId | ||
{ | ||
get => _rawSpanId ??= HexString.ToHexString(SpanId); | ||
set => _rawSpanId = value; | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets additional key/value pairs from an upstream "tracestate" W3C header that we will propagate downstream. | ||
|
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!