From 2e89a5e1f8614c6f9d5aa11bc942f428a10c8733 Mon Sep 17 00:00:00 2001 From: Zach Montoya Date: Mon, 24 Jul 2023 13:50:02 -0700 Subject: [PATCH] Revert "Swap to Datadog as default propagation style (#4420)" (#4442) This reverts commit aff06a76e50f90fb85fbfb80437b49d5a66906c6. --- tracer/src/Datadog.Trace/Configuration/TracerSettings.cs | 4 ++-- .../Configuration/ConfigurationSourceTests.cs | 4 ++-- .../Configuration/TracerSettingsTests.cs | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tracer/src/Datadog.Trace/Configuration/TracerSettings.cs b/tracer/src/Datadog.Trace/Configuration/TracerSettings.cs index 0db548b69358..0d6225c5fee1 100644 --- a/tracer/src/Datadog.Trace/Configuration/TracerSettings.cs +++ b/tracer/src/Datadog.Trace/Configuration/TracerSettings.cs @@ -272,7 +272,7 @@ internal TracerSettings(IConfigurationSource? source, IConfigurationTelemetry te if (PropagationStyleInject.Length == 0) { // default value - PropagationStyleInject = new[] { ContextPropagationHeaderStyle.Datadog }; + PropagationStyleInject = new[] { ContextPropagationHeaderStyle.W3CTraceContext, ContextPropagationHeaderStyle.Datadog }; } var propagationStyleExtract = config @@ -284,7 +284,7 @@ internal TracerSettings(IConfigurationSource? source, IConfigurationTelemetry te if (PropagationStyleExtract.Length == 0) { // default value - PropagationStyleExtract = new[] { ContextPropagationHeaderStyle.Datadog }; + PropagationStyleExtract = new[] { ContextPropagationHeaderStyle.W3CTraceContext, ContextPropagationHeaderStyle.Datadog }; } // If Activity support is enabled, we must enable the W3C Trace Context propagators. diff --git a/tracer/test/Datadog.Trace.Tests/Configuration/ConfigurationSourceTests.cs b/tracer/test/Datadog.Trace.Tests/Configuration/ConfigurationSourceTests.cs index 8851ba90def4..abc1c9be0810 100644 --- a/tracer/test/Datadog.Trace.Tests/Configuration/ConfigurationSourceTests.cs +++ b/tracer/test/Datadog.Trace.Tests/Configuration/ConfigurationSourceTests.cs @@ -84,8 +84,8 @@ public static IEnumerable GetDefaultTestData() yield return new object[] { CreateFunc(s => s.MaxTracesSubmittedPerSecond), 100 }; yield return new object[] { CreateFunc(s => s.TracerMetricsEnabled), false }; yield return new object[] { CreateFunc(s => s.Exporter.DogStatsdPort), 8125 }; - yield return new object[] { CreateFunc(s => s.PropagationStyleInject), new[] { "Datadog" } }; - yield return new object[] { CreateFunc(s => s.PropagationStyleExtract), new[] { "Datadog" } }; + yield return new object[] { CreateFunc(s => s.PropagationStyleInject), new[] { "tracecontext", "Datadog" } }; + yield return new object[] { CreateFunc(s => s.PropagationStyleExtract), new[] { "tracecontext", "Datadog" } }; yield return new object[] { CreateFunc(s => s.ServiceNameMappings), null }; yield return new object[] { CreateFunc(s => s.TraceId128BitGenerationEnabled), false }; diff --git a/tracer/test/Datadog.Trace.Tests/Configuration/TracerSettingsTests.cs b/tracer/test/Datadog.Trace.Tests/Configuration/TracerSettingsTests.cs index a43e5b3fa684..0a0080a44953 100644 --- a/tracer/test/Datadog.Trace.Tests/Configuration/TracerSettingsTests.cs +++ b/tracer/test/Datadog.Trace.Tests/Configuration/TracerSettingsTests.cs @@ -630,10 +630,10 @@ public void IsActivityListenerEnabled(string value, string fallbackValue, bool e [Theory] [InlineData("test1,, ,test2", "test3,, ,test4", "test5,, ,test6", new[] { "test1", "test2" })] - [InlineData("", "test3,, ,test4", "test5,, ,test6", new[] { "Datadog" })] + [InlineData("", "test3,, ,test4", "test5,, ,test6", new[] { "tracecontext", "Datadog" })] [InlineData(null, "test3,, ,test4", "test5,, ,test6", new[] { "test3", "test4" })] [InlineData(null, null, "test5,, ,test6", new[] { "test5", "test6" })] - [InlineData(null, null, null, new[] { "Datadog" })] + [InlineData(null, null, null, new[] { "tracecontext", "Datadog" })] public void PropagationStyleInject(string value, string legacyValue, string fallbackValue, string[] expected) { const string legacyKey = "DD_PROPAGATION_STYLE_INJECT"; @@ -654,10 +654,10 @@ public void PropagationStyleInject(string value, string legacyValue, string fall [Theory] [InlineData("test1,, ,test2", "test3,, ,test4", "test5,, ,test6", new[] { "test1", "test2" })] - [InlineData("", "test3,, ,test4", "test5,, ,test6", new[] { "Datadog" })] + [InlineData("", "test3,, ,test4", "test5,, ,test6", new[] { "tracecontext", "Datadog" })] [InlineData(null, "test3,, ,test4", "test5,, ,test6", new[] { "test3", "test4" })] [InlineData(null, null, "test5,, ,test6", new[] { "test5", "test6" })] - [InlineData(null, null, null, new[] { "Datadog" })] + [InlineData(null, null, null, new[] { "tracecontext", "Datadog" })] public void PropagationStyleExtract(string value, string legacyValue, string fallbackValue, string[] expected) { const string legacyKey = "DD_PROPAGATION_STYLE_EXTRACT";