diff --git a/Src/Common/W3C/W3CConstants.cs b/Src/Common/W3C/W3CConstants.cs index 1688e2783..580855654 100644 --- a/Src/Common/W3C/W3CConstants.cs +++ b/Src/Common/W3C/W3CConstants.cs @@ -63,7 +63,7 @@ public static class W3CConstants /// /// Default sampled flag value. /// - internal const string DefaultSampled = "01"; + internal const string DefaultSampled = "00"; /// /// Name of the environment variable that controls W3C distributed tracing support. diff --git a/Src/DependencyCollector/Net45.Tests/DependencyTrackingTelemetryModuleHttpTest.cs b/Src/DependencyCollector/Net45.Tests/DependencyTrackingTelemetryModuleHttpTest.cs index 1f80abbc3..82e0decf7 100644 --- a/Src/DependencyCollector/Net45.Tests/DependencyTrackingTelemetryModuleHttpTest.cs +++ b/Src/DependencyCollector/Net45.Tests/DependencyTrackingTelemetryModuleHttpTest.cs @@ -353,7 +353,7 @@ public void TestDependencyCollectionWithW3CHeadersDiagnosticSource() Assert.AreEqual(expectedTraceId, dependency.Context.Operation.Id); Assert.AreEqual(expectedParentId, dependency.Context.Operation.ParentId); - Assert.AreEqual($"00-{expectedTraceId}-{dependency.Id}-01", request.Headers[W3CConstants.TraceParentHeader]); + Assert.AreEqual($"00-{expectedTraceId}-{dependency.Id}-00", request.Headers[W3CConstants.TraceParentHeader]); Assert.AreEqual($"{W3CConstants.ApplicationIdTraceStateField}={expectedAppId},state=some", request.Headers[W3CConstants.TraceStateHeader]); diff --git a/Src/DependencyCollector/NetCore.Tests/DependencyTrackingTelemetryModuleTestNetCore.cs b/Src/DependencyCollector/NetCore.Tests/DependencyTrackingTelemetryModuleTestNetCore.cs index d1a6bd53c..0e6811789 100644 --- a/Src/DependencyCollector/NetCore.Tests/DependencyTrackingTelemetryModuleTestNetCore.cs +++ b/Src/DependencyCollector/NetCore.Tests/DependencyTrackingTelemetryModuleTestNetCore.cs @@ -246,7 +246,7 @@ public async Task TestDependencyCollectionWithW3CHeadersAndRequestId() Assert.AreEqual(expectedParentId, dependency.Context.Operation.ParentId); Assert.IsTrue(request.Headers.Contains(W3CConstants.TraceParentHeader)); - Assert.AreEqual($"00-{expectedTraceId}-{dependency.Id}-01", request.Headers.GetValues(W3CConstants.TraceParentHeader).Single()); + Assert.AreEqual($"00-{expectedTraceId}-{dependency.Id}-00", request.Headers.GetValues(W3CConstants.TraceParentHeader).Single()); Assert.IsTrue(request.Headers.Contains(W3CConstants.TraceStateHeader)); Assert.AreEqual($"{W3CConstants.ApplicationIdTraceStateField}={expectedAppId},state=some", request.Headers.GetValues(W3CConstants.TraceStateHeader).Single()); @@ -296,7 +296,7 @@ public async Task TestDependencyCollectionWithW3CHeadersAndNoParentContext() Assert.AreEqual(expectedParentId, dependency.Context.Operation.ParentId); Assert.IsTrue(request.Headers.Contains(W3CConstants.TraceParentHeader)); - Assert.AreEqual($"00-{expectedTraceId}-{dependency.Id}-01", request.Headers.GetValues(W3CConstants.TraceParentHeader).Single()); + Assert.AreEqual($"00-{expectedTraceId}-{dependency.Id}-00", request.Headers.GetValues(W3CConstants.TraceParentHeader).Single()); Assert.IsTrue(request.Headers.Contains(W3CConstants.TraceStateHeader)); Assert.AreEqual($"{W3CConstants.ApplicationIdTraceStateField}={expectedAppId}", request.Headers.GetValues(W3CConstants.TraceStateHeader).Single());