Skip to content

Commit

Permalink
Revert "Swap to Datadog as default propagation style (#4420)" (#4442)
Browse files Browse the repository at this point in the history
This reverts commit aff06a7.
  • Loading branch information
zacharycmontoya authored Jul 24, 2023
1 parent 7efc2de commit 2e89a5e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tracer/src/Datadog.Trace/Configuration/TracerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ public static IEnumerable<object[]> 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 };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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";
Expand Down

0 comments on commit 2e89a5e

Please sign in to comment.