From 7d8c403ec2b63f83128efc9391dfd4b6c0eec5e5 Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Tue, 2 Feb 2021 10:41:32 -0800 Subject: [PATCH] IsAllDataRequested true after ending (#1758) * IsAllDataRequested true after ending * false typo * Make it clear in comment that we are no marking IsAlLDataRequested as false --- src/OpenTelemetry/Trace/TracerProviderSdk.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/OpenTelemetry/Trace/TracerProviderSdk.cs b/src/OpenTelemetry/Trace/TracerProviderSdk.cs index c269c08988e..d0759533a5e 100644 --- a/src/OpenTelemetry/Trace/TracerProviderSdk.cs +++ b/src/OpenTelemetry/Trace/TracerProviderSdk.cs @@ -97,6 +97,14 @@ internal TracerProviderSdk( return; } + // Spec says IsRecording must be false once span ends. + // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#isrecording + // However, Activity has slightly different semantic + // than Span and we don't have strong reason to do this + // now, as Activity anyway allows read/write always. + // Intentionally commenting the following line. + // activity.IsAllDataRequested = false; + if (SuppressInstrumentationScope.DecrementIfTriggered() == 0) { this.processor?.OnEnd(activity);