From a983ad34bee1a212c516812405dbd85fac44898e Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 12 Jul 2018 15:16:36 -0700 Subject: [PATCH] 0 default sampling --- Src/Common/W3C/W3CConstants.cs | 2 +- .../Net45.Tests/DependencyTrackingTelemetryModuleHttpTest.cs | 2 +- .../DependencyTrackingTelemetryModuleTestNetCore.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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());