Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
vishweshbankwar committed Jun 6, 2022
1 parent c9880cc commit fb2d5a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/OpenTelemetry/Trace/TracerProviderSdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,13 @@ protected override void Dispose(bool disposing)
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static ActivitySamplingResult PropagateOrIgnoreData(in ActivityContext context)
private static ActivitySamplingResult PropagateOrIgnoreData(in ActivityContext parentContext)
{
var isRootSpan = context.TraceId == default;
var isRootSpan = parentContext.TraceId == default;

// If it is the root span or the parent is remote select PropagationData so the trace ID is preserved
// even if no activity of the trace is recorded (sampled per OpenTelemetry parlance).
return (isRootSpan || context.IsRemote)
return (isRootSpan || parentContext.IsRemote)
? ActivitySamplingResult.PropagationData
: ActivitySamplingResult.None;
}
Expand Down

0 comments on commit fb2d5a6

Please sign in to comment.