-
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
Tiny cleanup of static Tracer
instance usages
#4936
Changes from all commits
aae42fb
60fb88f
e747a17
ece6aa1
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 |
---|---|---|
|
@@ -38,6 +38,11 @@ public static class SpanExtensions | |
public static void SetTraceSamplingPriority(this ISpan span, SamplingPriority samplingPriority) | ||
{ | ||
TelemetryFactory.Metrics.Record(PublicApiUsage.SpanExtensions_SetTraceSamplingPriority); | ||
SetTraceSamplingPriorityInternal(span, samplingPriority); | ||
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. fwiw, I think longer term we should move away from using 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. Sounds good to me! v3? 😄 |
||
} | ||
|
||
internal static void SetTraceSamplingPriorityInternal(this ISpan span, SamplingPriority samplingPriority) | ||
{ | ||
if (span == null) { ThrowHelper.ThrowArgumentNullException(nameof(span)); } | ||
|
||
if (span.Context is SpanContext { TraceContext: { } traceContext }) | ||
|
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.
Good catch.