From 8c004414f459a6cd186e167ea79af5c73ba83212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Wed, 24 Jul 2024 15:44:21 +0200 Subject: [PATCH 01/23] inject trace context via set context --- .../AdoNet/DbScopeFactory.cs | 7 ++- .../DatabaseMonitoringPropagator.cs | 43 ++++++++++++++++++- .../DatabaseMonitoringPropagatorTests.cs | 39 +++++++++++++++-- 3 files changed, 82 insertions(+), 7 deletions(-) diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs index ee7201f5cf50..c77ce8f03b50 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs @@ -10,11 +10,13 @@ using System.Data; using System.Data.SqlTypes; using System.Diagnostics.CodeAnalysis; +using System.Linq; using System.Threading; using Datadog.Trace.AppSec; using Datadog.Trace.AppSec.Rasp; using Datadog.Trace.Configuration; using Datadog.Trace.DatabaseMonitoring; +using Datadog.Trace.ExtensionMethods; using Datadog.Trace.Iast; using Datadog.Trace.Logging; using Datadog.Trace.Tagging; @@ -103,11 +105,12 @@ internal static class DbScopeFactory } else { - var propagatedCommand = DatabaseMonitoringPropagator.PropagateSpanData(tracer.Settings.DbmPropagationMode, tracer.DefaultServiceName, tagsFromConnectionString.DbName, tagsFromConnectionString.OutHost, scope.Span, integrationId, out var traceParentInjected); + var traceParentInjectedInContext = DatabaseMonitoringPropagator.PropagateDataViaContext(tracer, tracer.Settings.DbmPropagationMode, integrationId, command.Connection, serviceName, scope, tags); + var propagatedCommand = DatabaseMonitoringPropagator.PropagateDataViaComment(tracer.Settings.DbmPropagationMode, tracer.DefaultServiceName, tagsFromConnectionString.DbName, tagsFromConnectionString.OutHost, scope.Span, integrationId, out var traceParentInjectedInComment); if (!string.IsNullOrEmpty(propagatedCommand)) { command.CommandText = $"{propagatedCommand} {commandText}"; - if (traceParentInjected) + if (traceParentInjectedInComment || traceParentInjectedInContext) { tags.DbmTraceInjected = "true"; } diff --git a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs index e6870778142f..86732a20bb7c 100644 --- a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs +++ b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs @@ -4,6 +4,7 @@ // using System; +using System.Data; using Datadog.Trace.Configuration; using Datadog.Trace.Propagators; using Datadog.Trace.Tagging; @@ -23,7 +24,7 @@ internal static class DatabaseMonitoringPropagator private const string SqlCommentEnv = "dde"; internal const string DbmPrefix = $"/*{SqlCommentSpanService}='"; - internal static string PropagateSpanData(DbmPropagationLevel propagationStyle, string configuredServiceName, string? dbName, string? outhost, Span span, IntegrationId integrationId, out bool traceParentInjected) + internal static string PropagateDataViaComment(DbmPropagationLevel propagationStyle, string configuredServiceName, string? dbName, string? outhost, Span span, IntegrationId integrationId, out bool traceParentInjected) { traceParentInjected = false; @@ -73,5 +74,45 @@ internal static string PropagateSpanData(DbmPropagationLevel propagationStyle, s return string.Empty; } + + /// + /// Uses a sql instruction to set a context for the current connection, bearing the span ID and trace ID. + /// This is meant to circumvent cache invalidation issues that occur when those values are injected in comment. + /// Currently only working for MSSQL (uses an instruction that is specific to it) + /// + /// True if the traceparent information was set + internal static bool PropagateDataViaContext(Tracer tracer, DbmPropagationLevel propagationLevel, IntegrationId integrationId, IDbConnection? connection, string serviceName, Scope scope, SqlTags tags) + { + if (propagationLevel != DbmPropagationLevel.Full || integrationId != IntegrationId.SqlClient || connection == null) + { + return false; + } + + // we want the instrumentation span to be a sibling of the actual query span + var instrumentationParent = scope.Parent?.Span?.Context; + using (var instrumentationScope = tracer.StartActiveInternal("set context_info", instrumentationParent, tags: tags, serviceName: serviceName)) + { + instrumentationScope.Span.Type = SpanTypes.Sql; + // this tag serves as "documentation" for users to realize this is something done by the instrumentation + instrumentationScope.Span.Tags.SetTag("dd.instrumentation", "true"); + + var version = 0; // version can have a maximum value of 7 in the current format + var sampled = SamplingPriorityValues.IsKeep(scope.Span.Context.GetOrMakeSamplingDecision() ?? SamplingPriorityValues.Default) + ? 1 + : 0; + var versionAndSampling = (((version << 1) & 0b1110) | (sampled & 0b0001)).ToString("X"); + var injectionSql = "set context_info 0x" + versionAndSampling + scope.Span.Context.RawSpanId + scope.Span.Context.RawTraceId; + // important to set the resource name before running the command so that we don't re-instrument + instrumentationScope.Span.ResourceName = injectionSql; + + var injectionCommand = connection.CreateCommand(); + injectionCommand.CommandText = injectionSql; + injectionCommand.ExecuteNonQuery(); + } // closing instrumentation span + + // we don't want to measure the time spent in "set_context" in the actual query span + scope.Span.ResetStartTime(); + return true; + } } } diff --git a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs index bd7f8281e955..23a813eb7431 100644 --- a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs +++ b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs @@ -4,6 +4,7 @@ // using System; +using System.Data; using Datadog.Trace.Agent; using Datadog.Trace.Configuration; using Datadog.Trace.Configuration.Telemetry; @@ -57,7 +58,7 @@ public void ExpectedCommentInjected(string propagationMode, int? samplingPriorit var span = _v0Tracer.StartSpan(operationName: "mysql.query", parent: SpanContext.None, serviceName: dbServiceName, traceId: (TraceId)7021887840877922076, spanId: 407003698947780173); span.SetTraceSamplingPriority((SamplingPriority)samplingPriority.Value); - var returnedComment = DatabaseMonitoringPropagator.PropagateSpanData(dbmPropagationLevel, "Test.Service", "MyDatabase", "MyHost", span, integrationId, out var traceParentInjectedValue); + var returnedComment = DatabaseMonitoringPropagator.PropagateDataViaComment(dbmPropagationLevel, "Test.Service", "MyDatabase", "MyHost", span, integrationId, out var traceParentInjectedValue); traceParentInjectedValue.Should().Be(traceParentInjected); returnedComment.Should().Be(expectedComment); @@ -75,7 +76,7 @@ public void ExpectedTagsInjected(string expectedComment, string env = null, stri span.Context.TraceContext.ServiceVersion = version; span.SetTraceSamplingPriority(SamplingPriority.AutoKeep); - var returnedComment = DatabaseMonitoringPropagator.PropagateSpanData(DbmPropagationLevel.Service, "Test.Service", "MyDatabase", "MyHost", span, IntegrationId.MySql, out var traceParentInjected); + var returnedComment = DatabaseMonitoringPropagator.PropagateDataViaComment(DbmPropagationLevel.Service, "Test.Service", "MyDatabase", "MyHost", span, IntegrationId.MySql, out var traceParentInjected); // Always false since this test never runs for full mode traceParentInjected.Should().Be(false); @@ -94,7 +95,7 @@ public void ExpectedTagsEncoded(string expectedComment, string service, string d span.Context.TraceContext.ServiceVersion = version; span.SetTraceSamplingPriority(SamplingPriority.AutoKeep); - var returnedComment = DatabaseMonitoringPropagator.PropagateSpanData(DbmPropagationLevel.Service, service, dbName, host, span, IntegrationId.MySql, out var traceParentInjected); + var returnedComment = DatabaseMonitoringPropagator.PropagateDataViaComment(DbmPropagationLevel.Service, service, dbName, host, span, IntegrationId.MySql, out var traceParentInjected); // Always false since this test never runs for full mode traceParentInjected.Should().Be(false); @@ -115,10 +116,40 @@ public void ExpectedCommentInjectedV1() var span = _v1Tracer.StartSpan(tags: new SqlV1Tags() { DbName = dbName }, operationName: "mysql.query", parent: SpanContext.None, serviceName: dbServiceName, traceId: (TraceId)7021887840877922076, spanId: 407003698947780173); span.SetTraceSamplingPriority(samplingPriority); - var returnedComment = DatabaseMonitoringPropagator.PropagateSpanData(dbmPropagationLevel, "Test.Service", "MyDatabase", "MyHost", span, integrationId, out var traceParentInjectedValue); + var returnedComment = DatabaseMonitoringPropagator.PropagateDataViaComment(dbmPropagationLevel, "Test.Service", "MyDatabase", "MyHost", span, integrationId, out var traceParentInjectedValue); traceParentInjectedValue.Should().Be(traceParentInjected); returnedComment.Should().Be(expectedComment); } + + [Theory] + [InlineData("full", "sqlclient", SamplingPriorityValues.UserKeep, "set context_info 0x1000000000000beef0000000000000000000000000000cafe")] + [InlineData("full", "sqlclient", SamplingPriorityValues.UserReject, "set context_info 0x0000000000000beef0000000000000000000000000000cafe")] + [InlineData("nope", "sqlclient", SamplingPriorityValues.UserKeep, null)] + // disabled for all db types except mysql for now + [InlineData("full", "npgsql", SamplingPriorityValues.UserKeep, null)] + [InlineData("full", "sqlite", SamplingPriorityValues.UserKeep, null)] + [InlineData("full", "oracle", SamplingPriorityValues.UserKeep, null)] + [InlineData("full", "mysql", SamplingPriorityValues.UserKeep, null)] + public void ExpectedContextSet(string propagationMode, string integration, int? samplingPriority, string expectedCommand) + { + Enum.TryParse(propagationMode, ignoreCase: true, out DbmPropagationLevel dbmPropagationLevel); + Enum.TryParse(integration, ignoreCase: true, out IntegrationId integrationId); + + // capture command sent + string contextSet = null; + var commandMock = new Mock(); + var connectionMock = new Mock(MockBehavior.Strict); + connectionMock.Setup(c => c.CreateCommand()).Returns(commandMock.Object); + commandMock.SetupSet(c => c.CommandText = It.IsAny()) + .Callback(value => contextSet = value); + + var span = _v0Tracer.StartSpan("mysql.query", parent: SpanContext.None, serviceName: "pouet", traceId: (TraceId)0xCAFE, spanId: 0xBEEF); + span.SetTraceSamplingPriority((SamplingPriority)samplingPriority.Value); + + DatabaseMonitoringPropagator.PropagateDataViaContext(_v0Tracer, dbmPropagationLevel, integrationId, connectionMock.Object, "pouet", new Scope(parent: null, span, scopeManager: null, finishOnClose: false), new SqlTags()); + + contextSet.Should().Be(expectedCommand); + } } } From b18a8aca57800e84cdc8bbcecbb469001b8eaefc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Thu, 25 Jul 2024 16:46:35 +0200 Subject: [PATCH 02/23] little bit of refactoring --- .../DatabaseMonitoringPropagator.cs | 49 +++++++++++++++---- .../DatabaseMonitoringPropagatorTests.cs | 42 +++++++++++----- 2 files changed, 69 insertions(+), 22 deletions(-) diff --git a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs index 86732a20bb7c..b2ac95fbc0a6 100644 --- a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs +++ b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs @@ -5,6 +5,7 @@ using System; using System.Data; +using System.Numerics; using Datadog.Trace.Configuration; using Datadog.Trace.Propagators; using Datadog.Trace.Tagging; @@ -96,23 +97,53 @@ internal static bool PropagateDataViaContext(Tracer tracer, DbmPropagationLevel // this tag serves as "documentation" for users to realize this is something done by the instrumentation instrumentationScope.Span.Tags.SetTag("dd.instrumentation", "true"); - var version = 0; // version can have a maximum value of 7 in the current format - var sampled = SamplingPriorityValues.IsKeep(scope.Span.Context.GetOrMakeSamplingDecision() ?? SamplingPriorityValues.Default) - ? 1 - : 0; - var versionAndSampling = (((version << 1) & 0b1110) | (sampled & 0b0001)).ToString("X"); - var injectionSql = "set context_info 0x" + versionAndSampling + scope.Span.Context.RawSpanId + scope.Span.Context.RawTraceId; + byte version = 0; // version can have a maximum value of 15 in the current format + var sampled = SamplingPriorityValues.IsKeep(scope.Span.Context.GetOrMakeSamplingDecision() ?? SamplingPriorityValues.Default); + var contextValue = BuildContextValue(version, sampled, scope.Span.SpanId, scope.Span.TraceId128); + var injectionSql = "set context_info @context"; // important to set the resource name before running the command so that we don't re-instrument instrumentationScope.Span.ResourceName = injectionSql; - var injectionCommand = connection.CreateCommand(); - injectionCommand.CommandText = injectionSql; - injectionCommand.ExecuteNonQuery(); + using (var injectionCommand = connection.CreateCommand()) + { + injectionCommand.CommandText = injectionSql; + + var parameter = injectionCommand.CreateParameter(); + parameter.ParameterName = "@context"; + parameter.Value = contextValue; + parameter.DbType = DbType.VarNumeric; + injectionCommand.Parameters.Add(parameter); + + injectionCommand.ExecuteNonQuery(); + } } // closing instrumentation span // we don't want to measure the time spent in "set_context" in the actual query span scope.Span.ResetStartTime(); return true; } + + /// + /// Writes the given info in a biginteger with the following format: + /// 4 bits: protocol version, 3 bits: reserved, 1 bit: sampling decision, 64 bits: spanID, 128 bits: traceID + /// + private static BigInteger BuildContextValue(byte version, bool isSampled, ulong spanId, TraceId traceId) + { + var sampled = isSampled ? 1 : 0; + var versionAndSampling = (byte)(((version << 4) & 0b1111_0000) | (sampled & 0b0000_0001)); + var contextBytes = new byte[1 + sizeof(ulong) + TraceId.Size]; + // one pass to write 3 64 integers at once: span ID, upper, and lower traceID + for (var i = 0; i < sizeof(ulong); i++) + { + var bitshift = i * sizeof(ulong); // we write the LSB first + contextBytes[i] = (byte)(traceId.Lower >> bitshift); + contextBytes[i + sizeof(ulong)] = (byte)(traceId.Upper >> bitshift); + contextBytes[i + sizeof(ulong) + sizeof(ulong)] = (byte)(spanId >> bitshift); + } + + contextBytes[contextBytes.Length - 1] = versionAndSampling; + + return new BigInteger(contextBytes); // little endian + } } } diff --git a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs index 23a813eb7431..b28e9e984a9d 100644 --- a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs +++ b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs @@ -5,6 +5,7 @@ using System; using System.Data; +using System.Numerics; using Datadog.Trace.Agent; using Datadog.Trace.Configuration; using Datadog.Trace.Configuration.Telemetry; @@ -123,33 +124,48 @@ public void ExpectedCommentInjectedV1() } [Theory] - [InlineData("full", "sqlclient", SamplingPriorityValues.UserKeep, "set context_info 0x1000000000000beef0000000000000000000000000000cafe")] - [InlineData("full", "sqlclient", SamplingPriorityValues.UserReject, "set context_info 0x0000000000000beef0000000000000000000000000000cafe")] - [InlineData("nope", "sqlclient", SamplingPriorityValues.UserKeep, null)] + [InlineData("full", "sqlclient", SamplingPriorityValues.UserKeep, true, "01000000000000beef0000000000000000000000000000cafe")] + [InlineData("full", "sqlclient", SamplingPriorityValues.UserReject, true, "00000000000000beef0000000000000000000000000000cafe")] + [InlineData("nope", "sqlclient", SamplingPriorityValues.UserKeep, false, null)] // disabled for all db types except mysql for now - [InlineData("full", "npgsql", SamplingPriorityValues.UserKeep, null)] - [InlineData("full", "sqlite", SamplingPriorityValues.UserKeep, null)] - [InlineData("full", "oracle", SamplingPriorityValues.UserKeep, null)] - [InlineData("full", "mysql", SamplingPriorityValues.UserKeep, null)] - public void ExpectedContextSet(string propagationMode, string integration, int? samplingPriority, string expectedCommand) + [InlineData("full", "npgsql", SamplingPriorityValues.UserKeep, false, null)] + [InlineData("full", "sqlite", SamplingPriorityValues.UserKeep, false, null)] + [InlineData("full", "oracle", SamplingPriorityValues.UserKeep, false, null)] + [InlineData("full", "mysql", SamplingPriorityValues.UserKeep, false, null)] + public void ExpectedContextSet(string propagationMode, string integration, int? samplingPriority, bool shouldInject, string expectedContext) { Enum.TryParse(propagationMode, ignoreCase: true, out DbmPropagationLevel dbmPropagationLevel); Enum.TryParse(integration, ignoreCase: true, out IntegrationId integrationId); - // capture command sent - string contextSet = null; - var commandMock = new Mock(); + // capture command and parameter sent + string sql = null; + var context = BigInteger.Zero; var connectionMock = new Mock(MockBehavior.Strict); + var commandMock = new Mock(); + var parameterMock = new Mock(); connectionMock.Setup(c => c.CreateCommand()).Returns(commandMock.Object); commandMock.SetupSet(c => c.CommandText = It.IsAny()) - .Callback(value => contextSet = value); + .Callback(value => sql = value); + commandMock.Setup(c => c.CreateParameter()).Returns(parameterMock.Object); + commandMock.SetupGet(c => c.Parameters).Returns(Mock.Of()); + parameterMock.SetupSet(p => p.Value = It.IsAny()) + .Callback(value => context = (BigInteger)value); var span = _v0Tracer.StartSpan("mysql.query", parent: SpanContext.None, serviceName: "pouet", traceId: (TraceId)0xCAFE, spanId: 0xBEEF); span.SetTraceSamplingPriority((SamplingPriority)samplingPriority.Value); DatabaseMonitoringPropagator.PropagateDataViaContext(_v0Tracer, dbmPropagationLevel, integrationId, connectionMock.Object, "pouet", new Scope(parent: null, span, scopeManager: null, finishOnClose: false), new SqlTags()); - contextSet.Should().Be(expectedCommand); + if (shouldInject) + { + sql.Should().StartWith("set context_info "); + context.ToString("x50").Should().Be(expectedContext); + } + else + { + sql.Should().BeNull(); + context.IsZero.Should().BeTrue(); + } } } } From 80af8b5ca9deb81f2a368a250016d3dc2a301011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Fri, 26 Jul 2024 16:25:45 +0200 Subject: [PATCH 03/23] copy the tags when reusing them --- .../DatabaseMonitoringPropagator.cs | 5 ++++- tracer/src/Datadog.Trace/Tagging/ITags.cs | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs index b2ac95fbc0a6..0a2a0c36988c 100644 --- a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs +++ b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs @@ -91,7 +91,10 @@ internal static bool PropagateDataViaContext(Tracer tracer, DbmPropagationLevel // we want the instrumentation span to be a sibling of the actual query span var instrumentationParent = scope.Parent?.Span?.Context; - using (var instrumentationScope = tracer.StartActiveInternal("set context_info", instrumentationParent, tags: tags, serviceName: serviceName)) + // copy the tags so that modifications on one span don't impact the other + var copyProcessor = new ITags.CopyProcessor(); + tags.EnumerateTags(ref copyProcessor); + using (var instrumentationScope = tracer.StartActiveInternal("set context_info", instrumentationParent, tags: copyProcessor.TagsCopy, serviceName: serviceName)) { instrumentationScope.Span.Type = SpanTypes.Sql; // this tag serves as "documentation" for users to realize this is something done by the instrumentation diff --git a/tracer/src/Datadog.Trace/Tagging/ITags.cs b/tracer/src/Datadog.Trace/Tagging/ITags.cs index 50f9454a18c8..2f93b1d74c21 100644 --- a/tracer/src/Datadog.Trace/Tagging/ITags.cs +++ b/tracer/src/Datadog.Trace/Tagging/ITags.cs @@ -27,5 +27,24 @@ void EnumerateMetrics(ref TProcessor processor) void EnumerateMetaStruct(ref TProcessor processor) where TProcessor : struct, IItemProcessor; + + /// + /// To be used in combination with to create a copy of the tags. + /// + public readonly struct CopyProcessor : IItemProcessor + where T : ITags, new() + { + public readonly ITags TagsCopy; + + public CopyProcessor() + { + TagsCopy = new T(); + } + + public void Process(TagItem item) + { + TagsCopy.SetTag(item.Key, item.Value); + } + } } } From 7c1ef10f1fdc65bfca2e34236342c660b88cfe71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Fri, 26 Jul 2024 16:30:06 +0200 Subject: [PATCH 04/23] wider system tests --- .../AdoNet/MicrosoftDataSqlClientTests.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AdoNet/MicrosoftDataSqlClientTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AdoNet/MicrosoftDataSqlClientTests.cs index 18445aad2d8f..4a39d08ef8f9 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AdoNet/MicrosoftDataSqlClientTests.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AdoNet/MicrosoftDataSqlClientTests.cs @@ -26,7 +26,9 @@ public MicrosoftDataSqlClientTests(ITestOutputHelper output) public static IEnumerable GetEnabledConfig() => from packageVersionArray in PackageVersions.MicrosoftDataSqlClient from metadataSchemaVersion in new[] { "v0", "v1" } - select new[] { packageVersionArray[0], metadataSchemaVersion }; + from dbmEnabled in new[] { true, false } + from propagation in new[] { "disabled", "service", "full" } + select new[] { packageVersionArray[0], metadataSchemaVersion, dbmEnabled, propagation }; public override Result ValidateIntegrationSpan(MockSpan span, string metadataSchemaVersion) => span.IsSqlClient(metadataSchemaVersion); @@ -34,7 +36,7 @@ public static IEnumerable GetEnabledConfig() [MemberData(nameof(GetEnabledConfig))] [Trait("Category", "EndToEnd")] [Trait("RunOnWindows", "True")] - public async Task SubmitsTraces(string packageVersion, string metadataSchemaVersion) + public async Task SubmitsTraces(string packageVersion, string metadataSchemaVersion, bool dbmEnabled, string propagation) { // ALWAYS: 133 spans // - SqlCommand: 21 spans (3 groups * 7 spans) @@ -65,9 +67,13 @@ public async Task SubmitsTraces(string packageVersion, string metadataSchemaVers } var expectedSpanCount = isVersion4 ? 91 : 147; + // there are as many spans for the instrumentation as regular spans, since we create one extra for each query. + var expectedInstrumentationSpanCount = propagation == "full" ? expectedSpanCount : 0; const string dbType = "sql-server"; const string expectedOperationName = dbType + ".query"; + SetEnvironmentVariable(ConfigurationKeys.DataStreamsMonitoring.Enabled, dbmEnabled ? "1" : "0"); + SetEnvironmentVariable("DD_DBM_PROPAGATION_MODE", propagation); SetEnvironmentVariable("DD_TRACE_SPAN_ATTRIBUTE_SCHEMA", metadataSchemaVersion); var isExternalSpan = metadataSchemaVersion == "v0"; var clientSpanServiceName = isExternalSpan ? $"{EnvironmentHelper.FullSampleName}-{dbType}" : EnvironmentHelper.FullSampleName; @@ -75,10 +81,13 @@ public async Task SubmitsTraces(string packageVersion, string metadataSchemaVers using var telemetry = this.ConfigureTelemetry(); using var agent = EnvironmentHelper.GetMockAgent(); using var process = await RunSampleAndWaitForExit(agent, packageVersion: packageVersion); + var spans = agent.WaitForSpans(expectedSpanCount, operationName: expectedOperationName); - int actualSpanCount = spans.Count(s => s.ParentId.HasValue); // Remove unexpected DB spans from the calculation + var actualSpanCount = spans.Count(s => s.ParentId.HasValue); // Remove unexpected DB spans from the calculation + var instrumentationSpans = agent.WaitForSpans(expectedInstrumentationSpanCount, operationName: "set context_info"); Assert.Equal(expectedSpanCount, actualSpanCount); + Assert.Equal(expectedInstrumentationSpanCount, instrumentationSpans.Count); ValidateIntegrationSpans(spans, metadataSchemaVersion, expectedServiceName: clientSpanServiceName, isExternalSpan); telemetry.AssertIntegrationEnabled(IntegrationId.SqlClient); } From f8cb802bb8518232370f3e04757e4e1988b36b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Wed, 14 Aug 2024 17:36:27 +0200 Subject: [PATCH 05/23] generate xml and fix type of variable --- .../Datadog.Trace.Trimming/build/Datadog.Trace.Trimming.xml | 4 ++++ .../DatabaseMonitoring/DatabaseMonitoringPropagator.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tracer/src/Datadog.Trace.Trimming/build/Datadog.Trace.Trimming.xml b/tracer/src/Datadog.Trace.Trimming/build/Datadog.Trace.Trimming.xml index f4175220a417..b8ee643cbcb7 100644 --- a/tracer/src/Datadog.Trace.Trimming/build/Datadog.Trace.Trimming.xml +++ b/tracer/src/Datadog.Trace.Trimming/build/Datadog.Trace.Trimming.xml @@ -202,8 +202,12 @@ + + + + diff --git a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs index 0a2a0c36988c..cdb931680003 100644 --- a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs +++ b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs @@ -114,7 +114,7 @@ internal static bool PropagateDataViaContext(Tracer tracer, DbmPropagationLevel var parameter = injectionCommand.CreateParameter(); parameter.ParameterName = "@context"; parameter.Value = contextValue; - parameter.DbType = DbType.VarNumeric; + parameter.DbType = DbType.Binary; injectionCommand.Parameters.Add(parameter); injectionCommand.ExecuteNonQuery(); From 08ece1e26679a4e613717a0acbf91faef50d379c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Tue, 20 Aug 2024 13:44:11 +0200 Subject: [PATCH 06/23] rewrite context bytes generation to return byte array --- .../DatabaseMonitoringPropagator.cs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs index cdb931680003..df4b2e48d27b 100644 --- a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs +++ b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs @@ -130,23 +130,20 @@ internal static bool PropagateDataViaContext(Tracer tracer, DbmPropagationLevel /// Writes the given info in a biginteger with the following format: /// 4 bits: protocol version, 3 bits: reserved, 1 bit: sampling decision, 64 bits: spanID, 128 bits: traceID /// - private static BigInteger BuildContextValue(byte version, bool isSampled, ulong spanId, TraceId traceId) + private static byte[] BuildContextValue(byte version, bool isSampled, ulong spanId, TraceId traceId) { var sampled = isSampled ? 1 : 0; var versionAndSampling = (byte)(((version << 4) & 0b1111_0000) | (sampled & 0b0000_0001)); var contextBytes = new byte[1 + sizeof(ulong) + TraceId.Size]; - // one pass to write 3 64 integers at once: span ID, upper, and lower traceID - for (var i = 0; i < sizeof(ulong); i++) - { - var bitshift = i * sizeof(ulong); // we write the LSB first - contextBytes[i] = (byte)(traceId.Lower >> bitshift); - contextBytes[i + sizeof(ulong)] = (byte)(traceId.Upper >> bitshift); - contextBytes[i + sizeof(ulong) + sizeof(ulong)] = (byte)(spanId >> bitshift); - } - contextBytes[contextBytes.Length - 1] = versionAndSampling; + contextBytes[0] = versionAndSampling; + + Buffer.BlockCopy(BitConverter.GetBytes(spanId), srcOffset: 0, contextBytes, dstOffset: 1, sizeof(ulong)); + + Buffer.BlockCopy(BitConverter.GetBytes(traceId.Upper), srcOffset: 0, contextBytes, 1 + sizeof(ulong), sizeof(ulong)); + Buffer.BlockCopy(BitConverter.GetBytes(traceId.Lower), srcOffset: 0, contextBytes, 1 + sizeof(ulong) + sizeof(ulong), sizeof(ulong)); - return new BigInteger(contextBytes); // little endian + return contextBytes; } } } From 87a21424e64c93f80960d8b9c530438dfc5861bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Tue, 20 Aug 2024 19:02:42 +0200 Subject: [PATCH 07/23] rewrite again but with proper endianess --- .../DatabaseMonitoringPropagator.cs | 18 +++++++++++------- .../DatabaseMonitoringPropagatorTests.cs | 14 +++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs index df4b2e48d27b..1a56d96c2976 100644 --- a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs +++ b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs @@ -5,11 +5,11 @@ using System; using System.Data; -using System.Numerics; using Datadog.Trace.Configuration; using Datadog.Trace.Propagators; using Datadog.Trace.Tagging; using Datadog.Trace.Util; +using Datadog.Trace.VendoredMicrosoftCode.System.Buffers.Binary; #nullable enable @@ -127,7 +127,7 @@ internal static bool PropagateDataViaContext(Tracer tracer, DbmPropagationLevel } /// - /// Writes the given info in a biginteger with the following format: + /// Writes the given info in a byte array with the following format: /// 4 bits: protocol version, 3 bits: reserved, 1 bit: sampling decision, 64 bits: spanID, 128 bits: traceID /// private static byte[] BuildContextValue(byte version, bool isSampled, ulong spanId, TraceId traceId) @@ -137,11 +137,15 @@ private static byte[] BuildContextValue(byte version, bool isSampled, ulong span var contextBytes = new byte[1 + sizeof(ulong) + TraceId.Size]; contextBytes[0] = versionAndSampling; - - Buffer.BlockCopy(BitConverter.GetBytes(spanId), srcOffset: 0, contextBytes, dstOffset: 1, sizeof(ulong)); - - Buffer.BlockCopy(BitConverter.GetBytes(traceId.Upper), srcOffset: 0, contextBytes, 1 + sizeof(ulong), sizeof(ulong)); - Buffer.BlockCopy(BitConverter.GetBytes(traceId.Lower), srcOffset: 0, contextBytes, 1 + sizeof(ulong) + sizeof(ulong), sizeof(ulong)); + BinaryPrimitives.WriteUInt64BigEndian( + new VendoredMicrosoftCode.System.Span(contextBytes, start: 1, sizeof(ulong)), + spanId); + BinaryPrimitives.WriteUInt64BigEndian( + new VendoredMicrosoftCode.System.Span(contextBytes, 1 + sizeof(ulong), sizeof(ulong)), + traceId.Upper); + BinaryPrimitives.WriteUInt64BigEndian( + new VendoredMicrosoftCode.System.Span(contextBytes, 1 + sizeof(ulong) + sizeof(ulong), sizeof(ulong)), + traceId.Lower); return contextBytes; } diff --git a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs index b28e9e984a9d..5608cf09b558 100644 --- a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs +++ b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs @@ -124,8 +124,8 @@ public void ExpectedCommentInjectedV1() } [Theory] - [InlineData("full", "sqlclient", SamplingPriorityValues.UserKeep, true, "01000000000000beef0000000000000000000000000000cafe")] - [InlineData("full", "sqlclient", SamplingPriorityValues.UserReject, true, "00000000000000beef0000000000000000000000000000cafe")] + [InlineData("full", "sqlclient", SamplingPriorityValues.UserKeep, true, "01000000000000BEEF0000000000000000000000000000CAFE")] + [InlineData("full", "sqlclient", SamplingPriorityValues.UserReject, true, "00000000000000BEEF0000000000000000000000000000CAFE")] [InlineData("nope", "sqlclient", SamplingPriorityValues.UserKeep, false, null)] // disabled for all db types except mysql for now [InlineData("full", "npgsql", SamplingPriorityValues.UserKeep, false, null)] @@ -139,7 +139,7 @@ public void ExpectedContextSet(string propagationMode, string integration, int? // capture command and parameter sent string sql = null; - var context = BigInteger.Zero; + byte[] context = null; var connectionMock = new Mock(MockBehavior.Strict); var commandMock = new Mock(); var parameterMock = new Mock(); @@ -148,8 +148,8 @@ public void ExpectedContextSet(string propagationMode, string integration, int? .Callback(value => sql = value); commandMock.Setup(c => c.CreateParameter()).Returns(parameterMock.Object); commandMock.SetupGet(c => c.Parameters).Returns(Mock.Of()); - parameterMock.SetupSet(p => p.Value = It.IsAny()) - .Callback(value => context = (BigInteger)value); + parameterMock.SetupSet(p => p.Value = It.IsAny()) + .Callback(value => context = (byte[])value); var span = _v0Tracer.StartSpan("mysql.query", parent: SpanContext.None, serviceName: "pouet", traceId: (TraceId)0xCAFE, spanId: 0xBEEF); span.SetTraceSamplingPriority((SamplingPriority)samplingPriority.Value); @@ -159,12 +159,12 @@ public void ExpectedContextSet(string propagationMode, string integration, int? if (shouldInject) { sql.Should().StartWith("set context_info "); - context.ToString("x50").Should().Be(expectedContext); + BitConverter.ToString(context).Replace("-", string.Empty).Should().Be(expectedContext); } else { sql.Should().BeNull(); - context.IsZero.Should().BeTrue(); + context.Should().BeNull(); } } } From 094dfed248bd8de97d05e8c8a494151700f79d1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Wed, 21 Aug 2024 10:17:28 +0200 Subject: [PATCH 08/23] fix expected tags for integration tests --- tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV0Rules.cs | 1 + tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV1Rules.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV0Rules.cs b/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV0Rules.cs index d553fbb3a2f5..61cd18949234 100644 --- a/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV0Rules.cs +++ b/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV0Rules.cs @@ -646,6 +646,7 @@ public static Result IsSqlClientV0(this MockSpan span) => Result.FromSpan(span) .IsOptional("db.name") .IsPresent("out.host") .IsOptional("_dd.base_service") + .IsOptional("_dd.dbm_trace_injected") .Matches("db.type", "sql-server") .Matches("component", "SqlClient") .Matches("span.kind", "client")); diff --git a/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV1Rules.cs b/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV1Rules.cs index 762801911abe..27ff3aed7af8 100644 --- a/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV1Rules.cs +++ b/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV1Rules.cs @@ -888,6 +888,7 @@ public static Result IsSqlClientV1(this MockSpan span) => Result.FromSpan(span) .IsOptional("peer.service.remapped_from") .IsOptional("_dd.base_service") .MatchesOneOf("_dd.peer.service.source", "db.name", "out.host", "peer.service") + .IsOptional("_dd.dbm_trace_injected") .Matches("component", "SqlClient") .Matches("span.kind", "client")); From c87e6d2f839e9d5f9aed707aa1e1be7febbdebaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Wed, 21 Aug 2024 11:30:29 +0200 Subject: [PATCH 09/23] update snapshots --- ...qlClientTests.tagged.SchemaV0.verified.txt | 504 ++++++++++++------ ...qlClientTests.tagged.SchemaV1.verified.txt | 168 ++++++ 2 files changed, 504 insertions(+), 168 deletions(-) diff --git a/tracer/test/snapshots/SystemDataSqlClientTests.tagged.SchemaV0.verified.txt b/tracer/test/snapshots/SystemDataSqlClientTests.tagged.SchemaV0.verified.txt index 0afea6b65210..5d7c1b7cde61 100644 --- a/tracer/test/snapshots/SystemDataSqlClientTests.tagged.SchemaV0.verified.txt +++ b/tracer/test/snapshots/SystemDataSqlClientTests.tagged.SchemaV0.verified.txt @@ -14,7 +14,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -35,7 +36,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -56,7 +58,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -77,7 +80,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -98,7 +102,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -119,7 +124,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -140,7 +146,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -161,7 +168,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -182,7 +190,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -203,7 +212,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -224,7 +234,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -245,7 +256,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -266,7 +278,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -287,7 +300,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -308,7 +322,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -329,7 +344,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -350,7 +366,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -371,7 +388,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -392,7 +410,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -413,7 +432,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -434,7 +454,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -455,7 +476,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -476,7 +498,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -497,7 +520,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -518,7 +542,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -539,7 +564,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -560,7 +586,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -581,7 +608,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -602,7 +630,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -623,7 +652,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -644,7 +674,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -665,7 +696,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -686,7 +718,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -707,7 +740,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -728,7 +762,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -749,7 +784,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -770,7 +806,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -791,7 +828,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -812,7 +850,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -833,7 +872,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -854,7 +894,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -875,7 +916,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -896,7 +938,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -917,7 +960,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -938,7 +982,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -959,7 +1004,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -980,7 +1026,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1001,7 +1048,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1022,7 +1070,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1043,7 +1092,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1064,7 +1114,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1085,7 +1136,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1106,7 +1158,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1127,7 +1180,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1148,7 +1202,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1169,7 +1224,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1190,7 +1246,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1211,7 +1268,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1232,7 +1290,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1253,7 +1312,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1274,7 +1334,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1295,7 +1356,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1316,7 +1378,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1337,7 +1400,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1358,7 +1422,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1379,7 +1444,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1400,7 +1466,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1421,7 +1488,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1442,7 +1510,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1463,7 +1532,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1484,7 +1554,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1505,7 +1576,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1526,7 +1598,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1547,7 +1620,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1568,7 +1642,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1589,7 +1664,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1610,7 +1686,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1631,7 +1708,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1652,7 +1730,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1673,7 +1752,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1694,7 +1774,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1715,7 +1796,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1736,7 +1818,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1757,7 +1840,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1778,7 +1862,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1799,7 +1884,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1820,7 +1906,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1841,7 +1928,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1862,7 +1950,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1883,7 +1972,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1904,7 +1994,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1925,7 +2016,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1946,7 +2038,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1967,7 +2060,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -1988,7 +2082,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2009,7 +2104,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2030,7 +2126,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2051,7 +2148,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2072,7 +2170,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2093,7 +2192,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2114,7 +2214,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2135,7 +2236,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2156,7 +2258,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2177,7 +2280,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2198,7 +2302,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2219,7 +2324,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2240,7 +2346,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2261,7 +2368,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2282,7 +2390,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2303,7 +2412,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2324,7 +2434,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2345,7 +2456,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2366,7 +2478,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2387,7 +2500,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2408,7 +2522,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2429,7 +2544,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2450,7 +2566,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2471,7 +2588,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2492,7 +2610,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2513,7 +2632,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2534,7 +2654,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2555,7 +2676,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2576,7 +2698,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2597,7 +2720,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2618,7 +2742,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2639,7 +2764,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2660,7 +2786,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2681,7 +2808,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2702,7 +2830,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2723,7 +2852,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2744,7 +2874,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2765,7 +2896,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2786,7 +2918,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2807,7 +2940,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2828,7 +2962,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2849,7 +2984,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2870,7 +3006,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2891,7 +3028,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2912,7 +3050,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2933,7 +3072,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2954,7 +3094,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2975,7 +3116,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -2996,7 +3138,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3017,7 +3160,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3038,7 +3182,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3059,7 +3204,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3080,7 +3226,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3101,7 +3248,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3122,7 +3270,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3143,7 +3292,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3164,7 +3314,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3185,7 +3336,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3206,7 +3358,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3227,7 +3380,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3248,7 +3402,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3269,7 +3424,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3290,7 +3446,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3311,7 +3468,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3332,7 +3490,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3353,7 +3512,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3374,7 +3534,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3395,7 +3556,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3416,7 +3578,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3437,7 +3600,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3458,7 +3622,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3479,7 +3644,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3500,7 +3666,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 @@ -3521,7 +3688,8 @@ language: dotnet, out.host: sqlserver, runtime-id: Guid_1, - span.kind: client + span.kind: client, + _dd.dbm_trace_injected: true }, Metrics: { _dd.top_level: 1.0 diff --git a/tracer/test/snapshots/SystemDataSqlClientTests.tagged.SchemaV1.verified.txt b/tracer/test/snapshots/SystemDataSqlClientTests.tagged.SchemaV1.verified.txt index a8d3f581c7b5..d050f12948a9 100644 --- a/tracer/test/snapshots/SystemDataSqlClientTests.tagged.SchemaV1.verified.txt +++ b/tracer/test/snapshots/SystemDataSqlClientTests.tagged.SchemaV1.verified.txt @@ -16,6 +16,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -36,6 +37,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -56,6 +58,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -76,6 +79,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -96,6 +100,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -116,6 +121,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -136,6 +142,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -156,6 +163,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -176,6 +184,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -196,6 +205,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -216,6 +226,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -236,6 +247,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -256,6 +268,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -276,6 +289,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -296,6 +310,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -316,6 +331,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -336,6 +352,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -356,6 +373,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -376,6 +394,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -396,6 +415,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -416,6 +436,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -436,6 +457,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -456,6 +478,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -476,6 +499,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -496,6 +520,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -516,6 +541,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -536,6 +562,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -556,6 +583,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -576,6 +604,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -596,6 +625,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -616,6 +646,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -636,6 +667,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -656,6 +688,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -676,6 +709,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -696,6 +730,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -716,6 +751,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -736,6 +772,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -756,6 +793,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -776,6 +814,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -796,6 +835,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -816,6 +856,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -836,6 +877,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -856,6 +898,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -876,6 +919,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -896,6 +940,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -916,6 +961,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -936,6 +982,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -956,6 +1003,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -976,6 +1024,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -996,6 +1045,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1016,6 +1066,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1036,6 +1087,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1056,6 +1108,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1076,6 +1129,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1096,6 +1150,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1116,6 +1171,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1136,6 +1192,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1156,6 +1213,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1176,6 +1234,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1196,6 +1255,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1216,6 +1276,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1236,6 +1297,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1256,6 +1318,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1276,6 +1339,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1296,6 +1360,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1316,6 +1381,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1336,6 +1402,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1356,6 +1423,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1376,6 +1444,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1396,6 +1465,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1416,6 +1486,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1436,6 +1507,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1456,6 +1528,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1476,6 +1549,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1496,6 +1570,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1516,6 +1591,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1536,6 +1612,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1556,6 +1633,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1576,6 +1654,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1596,6 +1675,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1616,6 +1696,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1636,6 +1717,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1656,6 +1738,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1676,6 +1759,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1696,6 +1780,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1716,6 +1801,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1736,6 +1822,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1756,6 +1843,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1776,6 +1864,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1796,6 +1885,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1816,6 +1906,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1836,6 +1927,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1856,6 +1948,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1876,6 +1969,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1896,6 +1990,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1916,6 +2011,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1936,6 +2032,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1956,6 +2053,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1976,6 +2074,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -1996,6 +2095,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2016,6 +2116,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2036,6 +2137,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2056,6 +2158,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2076,6 +2179,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2096,6 +2200,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2116,6 +2221,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2136,6 +2242,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2156,6 +2263,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2176,6 +2284,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2196,6 +2305,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2216,6 +2326,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2236,6 +2347,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2256,6 +2368,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2276,6 +2389,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2296,6 +2410,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2316,6 +2431,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2336,6 +2452,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2356,6 +2473,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2376,6 +2494,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2396,6 +2515,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2416,6 +2536,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2436,6 +2557,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2456,6 +2578,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2476,6 +2599,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2496,6 +2620,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2516,6 +2641,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2536,6 +2662,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2556,6 +2683,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2576,6 +2704,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2596,6 +2725,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2616,6 +2746,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2636,6 +2767,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2656,6 +2788,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2676,6 +2809,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2696,6 +2830,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2716,6 +2851,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2736,6 +2872,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2756,6 +2893,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2776,6 +2914,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2796,6 +2935,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2816,6 +2956,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2836,6 +2977,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2856,6 +2998,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2876,6 +3019,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2896,6 +3040,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2916,6 +3061,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2936,6 +3082,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2956,6 +3103,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2976,6 +3124,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -2996,6 +3145,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3016,6 +3166,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3036,6 +3187,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3056,6 +3208,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3076,6 +3229,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3096,6 +3250,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3116,6 +3271,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3136,6 +3292,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3156,6 +3313,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3176,6 +3334,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3196,6 +3355,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3216,6 +3376,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3236,6 +3397,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3256,6 +3418,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3276,6 +3439,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3296,6 +3460,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3316,6 +3481,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3336,6 +3502,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } }, @@ -3356,6 +3523,7 @@ peer.service: sqlserver, span.kind: client, version: 1.0.0, + _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host } } From b29266479c3bf149a43366cc35304a71874cff0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Wed, 21 Aug 2024 17:40:05 +0200 Subject: [PATCH 10/23] fix comment in test Co-authored-by: Lucas Pimentel --- .../DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs index 5608cf09b558..13c9431ce269 100644 --- a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs +++ b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs @@ -127,7 +127,7 @@ public void ExpectedCommentInjectedV1() [InlineData("full", "sqlclient", SamplingPriorityValues.UserKeep, true, "01000000000000BEEF0000000000000000000000000000CAFE")] [InlineData("full", "sqlclient", SamplingPriorityValues.UserReject, true, "00000000000000BEEF0000000000000000000000000000CAFE")] [InlineData("nope", "sqlclient", SamplingPriorityValues.UserKeep, false, null)] - // disabled for all db types except mysql for now + // disabled for all db types except sqlclient for now [InlineData("full", "npgsql", SamplingPriorityValues.UserKeep, false, null)] [InlineData("full", "sqlite", SamplingPriorityValues.UserKeep, false, null)] [InlineData("full", "oracle", SamplingPriorityValues.UserKeep, false, null)] From e5c6d9ce9879a528bfb04f6e2138a247f867a0c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Wed, 21 Aug 2024 17:51:00 +0200 Subject: [PATCH 11/23] bigger trace and span ID in test --- .../DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs index 13c9431ce269..b8c56776518c 100644 --- a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs +++ b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs @@ -124,8 +124,8 @@ public void ExpectedCommentInjectedV1() } [Theory] - [InlineData("full", "sqlclient", SamplingPriorityValues.UserKeep, true, "01000000000000BEEF0000000000000000000000000000CAFE")] - [InlineData("full", "sqlclient", SamplingPriorityValues.UserReject, true, "00000000000000BEEF0000000000000000000000000000CAFE")] + [InlineData("full", "sqlclient", SamplingPriorityValues.UserKeep, true, "01BEEFBEEFBEEFBEEFBABEBABEBABEBABECAFECAFECAFECAFE")] + [InlineData("full", "sqlclient", SamplingPriorityValues.UserReject, true, "00BEEFBEEFBEEFBEEFBABEBABEBABEBABECAFECAFECAFECAFE")] [InlineData("nope", "sqlclient", SamplingPriorityValues.UserKeep, false, null)] // disabled for all db types except sqlclient for now [InlineData("full", "npgsql", SamplingPriorityValues.UserKeep, false, null)] @@ -151,7 +151,7 @@ public void ExpectedContextSet(string propagationMode, string integration, int? parameterMock.SetupSet(p => p.Value = It.IsAny()) .Callback(value => context = (byte[])value); - var span = _v0Tracer.StartSpan("mysql.query", parent: SpanContext.None, serviceName: "pouet", traceId: (TraceId)0xCAFE, spanId: 0xBEEF); + var span = _v0Tracer.StartSpan("mysql.query", parent: SpanContext.None, serviceName: "pouet", traceId: new TraceId(Upper: 0xBABEBABEBABEBABE, Lower: 0xCAFECAFECAFECAFE), spanId: 0xBEEFBEEFBEEFBEEF); span.SetTraceSamplingPriority((SamplingPriority)samplingPriority.Value); DatabaseMonitoringPropagator.PropagateDataViaContext(_v0Tracer, dbmPropagationLevel, integrationId, connectionMock.Object, "pouet", new Scope(parent: null, span, scopeManager: null, finishOnClose: false), new SqlTags()); From 419a54f8c867dbfbe1620d9349f40af9bb4048d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Wed, 21 Aug 2024 18:18:23 +0200 Subject: [PATCH 12/23] use generic operation name in tests where it doesn't matter --- .../DatabaseMonitoringPropagatorTests.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs index b8c56776518c..eefdf2029d2d 100644 --- a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs +++ b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs @@ -56,7 +56,7 @@ public void ExpectedCommentInjected(string propagationMode, int? samplingPriorit IntegrationId integrationId; Enum.TryParse(integration, true, out integrationId); - var span = _v0Tracer.StartSpan(operationName: "mysql.query", parent: SpanContext.None, serviceName: dbServiceName, traceId: (TraceId)7021887840877922076, spanId: 407003698947780173); + var span = _v0Tracer.StartSpan(operationName: "db.query", parent: SpanContext.None, serviceName: dbServiceName, traceId: (TraceId)7021887840877922076, spanId: 407003698947780173); span.SetTraceSamplingPriority((SamplingPriority)samplingPriority.Value); var returnedComment = DatabaseMonitoringPropagator.PropagateDataViaComment(dbmPropagationLevel, "Test.Service", "MyDatabase", "MyHost", span, integrationId, out var traceParentInjectedValue); @@ -72,7 +72,7 @@ public void ExpectedCommentInjected(string propagationMode, int? samplingPriorit [InlineData("/*dddbs='Test.Service-mysql',ddps='Test.Service',dddb='MyDatabase',ddh='MyHost'*/", null, null)] public void ExpectedTagsInjected(string expectedComment, string env = null, string version = null) { - var span = _v0Tracer.StartSpan(operationName: "mysql.query", parent: SpanContext.None, serviceName: "Test.Service-mysql", traceId: (TraceId)7021887840877922076, spanId: 407003698947780173); + var span = _v0Tracer.StartSpan(operationName: "db.query", parent: SpanContext.None, serviceName: "Test.Service-mysql", traceId: (TraceId)7021887840877922076, spanId: 407003698947780173); span.Context.TraceContext.Environment = env; span.Context.TraceContext.ServiceVersion = version; span.SetTraceSamplingPriority(SamplingPriority.AutoKeep); @@ -91,7 +91,7 @@ public void ExpectedTagsInjected(string expectedComment, string env = null, stri [InlineData("/*dddbs='Test.Service%20%21%23%24%25%26%27%28%29%2A%2B%2C%2F%3A%3B%3D%3F%40%5B%5D-mysql',dde='te%23%27sti%2F%2Ang',ddps='Test.Service%20%21%23%24%25%26%27%28%29%2A%2B%2C%2F%3A%3B%3D%3F%40%5B%5D',dddb='My_Database',ddh='192.168.0.1',ddpv='1.%2A0.0'*/", "Test.Service !#$%&'()*+,/:;=?@[]", "My_Database", "192.168.0.1", "te#'sti/*ng", "1.*0.0")] public void ExpectedTagsEncoded(string expectedComment, string service, string dbName, string host, string env, string version) { - var span = _v0Tracer.StartSpan(operationName: "mysql.query", parent: SpanContext.None, serviceName: $"{service}-mysql", traceId: (TraceId)7021887840877922076, spanId: 407003698947780173); + var span = _v0Tracer.StartSpan(operationName: "db.query", parent: SpanContext.None, serviceName: $"{service}-mysql", traceId: (TraceId)7021887840877922076, spanId: 407003698947780173); span.Context.TraceContext.Environment = env; span.Context.TraceContext.ServiceVersion = version; span.SetTraceSamplingPriority(SamplingPriority.AutoKeep); @@ -114,7 +114,7 @@ public void ExpectedCommentInjectedV1() var traceParentInjected = false; var dbName = "dbname"; - var span = _v1Tracer.StartSpan(tags: new SqlV1Tags() { DbName = dbName }, operationName: "mysql.query", parent: SpanContext.None, serviceName: dbServiceName, traceId: (TraceId)7021887840877922076, spanId: 407003698947780173); + var span = _v1Tracer.StartSpan(tags: new SqlV1Tags() { DbName = dbName }, operationName: "db.query", parent: SpanContext.None, serviceName: dbServiceName, traceId: (TraceId)7021887840877922076, spanId: 407003698947780173); span.SetTraceSamplingPriority(samplingPriority); var returnedComment = DatabaseMonitoringPropagator.PropagateDataViaComment(dbmPropagationLevel, "Test.Service", "MyDatabase", "MyHost", span, integrationId, out var traceParentInjectedValue); @@ -151,7 +151,7 @@ public void ExpectedContextSet(string propagationMode, string integration, int? parameterMock.SetupSet(p => p.Value = It.IsAny()) .Callback(value => context = (byte[])value); - var span = _v0Tracer.StartSpan("mysql.query", parent: SpanContext.None, serviceName: "pouet", traceId: new TraceId(Upper: 0xBABEBABEBABEBABE, Lower: 0xCAFECAFECAFECAFE), spanId: 0xBEEFBEEFBEEFBEEF); + var span = _v0Tracer.StartSpan("db.query", parent: SpanContext.None, serviceName: "pouet", traceId: new TraceId(Upper: 0xBABEBABEBABEBABE, Lower: 0xCAFECAFECAFECAFE), spanId: 0xBEEFBEEFBEEFBEEF); span.SetTraceSamplingPriority((SamplingPriority)samplingPriority.Value); DatabaseMonitoringPropagator.PropagateDataViaContext(_v0Tracer, dbmPropagationLevel, integrationId, connectionMock.Object, "pouet", new Scope(parent: null, span, scopeManager: null, finishOnClose: false), new SqlTags()); From 111e37374f23c3bb3d6300be5f84f2340350e5d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Thu, 29 Aug 2024 15:01:36 +0200 Subject: [PATCH 13/23] change of plans: no span on the instrumentation --- .../AdoNet/DbScopeFactory.cs | 2 +- .../DatabaseMonitoringPropagator.cs | 54 +++++++++---------- tracer/src/Datadog.Trace/Tagging/ITags.cs | 19 ------- .../AdoNet/MicrosoftDataSqlClientTests.cs | 4 -- .../DatabaseMonitoringPropagatorTests.cs | 2 +- 5 files changed, 26 insertions(+), 55 deletions(-) diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs index c77ce8f03b50..17bd3cc504b7 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs @@ -105,7 +105,7 @@ internal static class DbScopeFactory } else { - var traceParentInjectedInContext = DatabaseMonitoringPropagator.PropagateDataViaContext(tracer, tracer.Settings.DbmPropagationMode, integrationId, command.Connection, serviceName, scope, tags); + var traceParentInjectedInContext = DatabaseMonitoringPropagator.PropagateDataViaContext(tracer.Settings.DbmPropagationMode, integrationId, command.Connection, scope.Span); var propagatedCommand = DatabaseMonitoringPropagator.PropagateDataViaComment(tracer.Settings.DbmPropagationMode, tracer.DefaultServiceName, tagsFromConnectionString.DbName, tagsFromConnectionString.OutHost, scope.Span, integrationId, out var traceParentInjectedInComment); if (!string.IsNullOrEmpty(propagatedCommand)) { diff --git a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs index 1a56d96c2976..b9a768a956dd 100644 --- a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs +++ b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs @@ -6,10 +6,12 @@ using System; using System.Data; using Datadog.Trace.Configuration; +using Datadog.Trace.Logging; using Datadog.Trace.Propagators; using Datadog.Trace.Tagging; using Datadog.Trace.Util; using Datadog.Trace.VendoredMicrosoftCode.System.Buffers.Binary; +using Datadog.Trace.Vendors.Serilog.Events; #nullable enable @@ -25,6 +27,8 @@ internal static class DatabaseMonitoringPropagator private const string SqlCommentEnv = "dde"; internal const string DbmPrefix = $"/*{SqlCommentSpanService}='"; + private static readonly IDatadogLogger Log = DatadogLogging.GetLoggerFor(typeof(DatabaseMonitoringPropagator)); + internal static string PropagateDataViaComment(DbmPropagationLevel propagationStyle, string configuredServiceName, string? dbName, string? outhost, Span span, IntegrationId integrationId, out bool traceParentInjected) { traceParentInjected = false; @@ -82,47 +86,37 @@ internal static string PropagateDataViaComment(DbmPropagationLevel propagationSt /// Currently only working for MSSQL (uses an instruction that is specific to it) /// /// True if the traceparent information was set - internal static bool PropagateDataViaContext(Tracer tracer, DbmPropagationLevel propagationLevel, IntegrationId integrationId, IDbConnection? connection, string serviceName, Scope scope, SqlTags tags) + internal static bool PropagateDataViaContext(DbmPropagationLevel propagationLevel, IntegrationId integrationId, IDbConnection? connection, Span span) { if (propagationLevel != DbmPropagationLevel.Full || integrationId != IntegrationId.SqlClient || connection == null) { return false; } - // we want the instrumentation span to be a sibling of the actual query span - var instrumentationParent = scope.Parent?.Span?.Context; - // copy the tags so that modifications on one span don't impact the other - var copyProcessor = new ITags.CopyProcessor(); - tags.EnumerateTags(ref copyProcessor); - using (var instrumentationScope = tracer.StartActiveInternal("set context_info", instrumentationParent, tags: copyProcessor.TagsCopy, serviceName: serviceName)) + byte version = 0; // version can have a maximum value of 15 in the current format + var sampled = SamplingPriorityValues.IsKeep(span.Context.GetOrMakeSamplingDecision() ?? SamplingPriorityValues.Default); + var contextValue = BuildContextValue(version, sampled, span.SpanId, span.TraceId128); + var injectionSql = "set context_info @context"; + + using (var injectionCommand = connection.CreateCommand()) { - instrumentationScope.Span.Type = SpanTypes.Sql; - // this tag serves as "documentation" for users to realize this is something done by the instrumentation - instrumentationScope.Span.Tags.SetTag("dd.instrumentation", "true"); - - byte version = 0; // version can have a maximum value of 15 in the current format - var sampled = SamplingPriorityValues.IsKeep(scope.Span.Context.GetOrMakeSamplingDecision() ?? SamplingPriorityValues.Default); - var contextValue = BuildContextValue(version, sampled, scope.Span.SpanId, scope.Span.TraceId128); - var injectionSql = "set context_info @context"; - // important to set the resource name before running the command so that we don't re-instrument - instrumentationScope.Span.ResourceName = injectionSql; - - using (var injectionCommand = connection.CreateCommand()) - { - injectionCommand.CommandText = injectionSql; + injectionCommand.CommandText = injectionSql; - var parameter = injectionCommand.CreateParameter(); - parameter.ParameterName = "@context"; - parameter.Value = contextValue; - parameter.DbType = DbType.Binary; - injectionCommand.Parameters.Add(parameter); + var parameter = injectionCommand.CreateParameter(); + parameter.ParameterName = "@context"; + parameter.Value = contextValue; + parameter.DbType = DbType.Binary; + injectionCommand.Parameters.Add(parameter); - injectionCommand.ExecuteNonQuery(); + injectionCommand.ExecuteNonQuery(); + + if (Log.IsEnabled(LogEventLevel.Debug)) + { + // avoid building the string representation in the general case where debug is disabled + Log.Debug("Span data for DBM propagated for {Integration} via context_info with value {ContextValue} (propagation level: {PropagationLevel}", integrationId, HexConverter.ToString(contextValue), propagationLevel); } - } // closing instrumentation span + } - // we don't want to measure the time spent in "set_context" in the actual query span - scope.Span.ResetStartTime(); return true; } diff --git a/tracer/src/Datadog.Trace/Tagging/ITags.cs b/tracer/src/Datadog.Trace/Tagging/ITags.cs index 2f93b1d74c21..50f9454a18c8 100644 --- a/tracer/src/Datadog.Trace/Tagging/ITags.cs +++ b/tracer/src/Datadog.Trace/Tagging/ITags.cs @@ -27,24 +27,5 @@ void EnumerateMetrics(ref TProcessor processor) void EnumerateMetaStruct(ref TProcessor processor) where TProcessor : struct, IItemProcessor; - - /// - /// To be used in combination with to create a copy of the tags. - /// - public readonly struct CopyProcessor : IItemProcessor - where T : ITags, new() - { - public readonly ITags TagsCopy; - - public CopyProcessor() - { - TagsCopy = new T(); - } - - public void Process(TagItem item) - { - TagsCopy.SetTag(item.Key, item.Value); - } - } } } diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AdoNet/MicrosoftDataSqlClientTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AdoNet/MicrosoftDataSqlClientTests.cs index 4a39d08ef8f9..4a41df6a9c2f 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AdoNet/MicrosoftDataSqlClientTests.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AdoNet/MicrosoftDataSqlClientTests.cs @@ -67,8 +67,6 @@ public async Task SubmitsTraces(string packageVersion, string metadataSchemaVers } var expectedSpanCount = isVersion4 ? 91 : 147; - // there are as many spans for the instrumentation as regular spans, since we create one extra for each query. - var expectedInstrumentationSpanCount = propagation == "full" ? expectedSpanCount : 0; const string dbType = "sql-server"; const string expectedOperationName = dbType + ".query"; @@ -84,10 +82,8 @@ public async Task SubmitsTraces(string packageVersion, string metadataSchemaVers var spans = agent.WaitForSpans(expectedSpanCount, operationName: expectedOperationName); var actualSpanCount = spans.Count(s => s.ParentId.HasValue); // Remove unexpected DB spans from the calculation - var instrumentationSpans = agent.WaitForSpans(expectedInstrumentationSpanCount, operationName: "set context_info"); Assert.Equal(expectedSpanCount, actualSpanCount); - Assert.Equal(expectedInstrumentationSpanCount, instrumentationSpans.Count); ValidateIntegrationSpans(spans, metadataSchemaVersion, expectedServiceName: clientSpanServiceName, isExternalSpan); telemetry.AssertIntegrationEnabled(IntegrationId.SqlClient); } diff --git a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs index eefdf2029d2d..a767d88bbca3 100644 --- a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs +++ b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs @@ -154,7 +154,7 @@ public void ExpectedContextSet(string propagationMode, string integration, int? var span = _v0Tracer.StartSpan("db.query", parent: SpanContext.None, serviceName: "pouet", traceId: new TraceId(Upper: 0xBABEBABEBABEBABE, Lower: 0xCAFECAFECAFECAFE), spanId: 0xBEEFBEEFBEEFBEEF); span.SetTraceSamplingPriority((SamplingPriority)samplingPriority.Value); - DatabaseMonitoringPropagator.PropagateDataViaContext(_v0Tracer, dbmPropagationLevel, integrationId, connectionMock.Object, "pouet", new Scope(parent: null, span, scopeManager: null, finishOnClose: false), new SqlTags()); + DatabaseMonitoringPropagator.PropagateDataViaContext(dbmPropagationLevel, integrationId, connectionMock.Object, span); if (shouldInject) { From 50aafe2ae0c07caab3be3ef9247f35aef521d0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Fri, 30 Aug 2024 12:55:12 +0200 Subject: [PATCH 14/23] save time spent on integration in span --- .../AdoNet/DbScopeFactory.cs | 2 +- .../DatabaseMonitoringPropagator.cs | 14 +- .../AdoNet/SystemDataSqlClientTests.cs | 1 + .../SpanMetadataV0Rules.cs | 1 + .../SpanMetadataV1Rules.cs | 1 + ...qlClientTests.tagged.SchemaV0.verified.txt | 168 ++++++ ...qlClientTests.tagged.SchemaV1.verified.txt | 504 ++++++++++++++++++ .../Program.cs | 2 +- .../integrations/Samples.SqlServer/Program.cs | 2 +- 9 files changed, 689 insertions(+), 6 deletions(-) diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs index 17bd3cc504b7..8d6402a7cd3e 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs @@ -47,7 +47,7 @@ internal static class DbScopeFactory if (parent is { Type: SpanTypes.Sql } && HasDbType(parent, dbType) && - (parent.ResourceName == commandText || commandText.StartsWith(DatabaseMonitoringPropagator.DbmPrefix))) + (parent.ResourceName == commandText || commandText.StartsWith(DatabaseMonitoringPropagator.DbmPrefix) || commandText == DatabaseMonitoringPropagator.SetContextCommand)) { // we are already instrumenting this, // don't instrument nested methods that belong to the same stacktrace diff --git a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs index b9a768a956dd..c9a4c4f2f9ac 100644 --- a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs +++ b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs @@ -12,6 +12,7 @@ using Datadog.Trace.Util; using Datadog.Trace.VendoredMicrosoftCode.System.Buffers.Binary; using Datadog.Trace.Vendors.Serilog.Events; +using Datadog.Trace.Vendors.StatsdClient; #nullable enable @@ -26,6 +27,8 @@ internal static class DatabaseMonitoringPropagator private const string SqlCommentVersion = "ddpv"; private const string SqlCommentEnv = "dde"; internal const string DbmPrefix = $"/*{SqlCommentSpanService}='"; + private const string ContextInfoParameterName = "@dd_trace_context"; + internal const string SetContextCommand = $"set context_info {ContextInfoParameterName}"; private static readonly IDatadogLogger Log = DatadogLogging.GetLoggerFor(typeof(DatabaseMonitoringPropagator)); @@ -93,17 +96,18 @@ internal static bool PropagateDataViaContext(DbmPropagationLevel propagationLeve return false; } + var sw = System.Diagnostics.Stopwatch.StartNew(); + byte version = 0; // version can have a maximum value of 15 in the current format var sampled = SamplingPriorityValues.IsKeep(span.Context.GetOrMakeSamplingDecision() ?? SamplingPriorityValues.Default); var contextValue = BuildContextValue(version, sampled, span.SpanId, span.TraceId128); - var injectionSql = "set context_info @context"; using (var injectionCommand = connection.CreateCommand()) { - injectionCommand.CommandText = injectionSql; + injectionCommand.CommandText = SetContextCommand; var parameter = injectionCommand.CreateParameter(); - parameter.ParameterName = "@context"; + parameter.ParameterName = ContextInfoParameterName; parameter.Value = contextValue; parameter.DbType = DbType.Binary; injectionCommand.Parameters.Add(parameter); @@ -117,6 +121,10 @@ internal static bool PropagateDataViaContext(DbmPropagationLevel propagationLeve } } + // Since sending the query to the DB can be a bit long, we register the time it took for transparency. + // Not using _dd because we want the customers to be able to see that tag. + span.SetMetric("dd.instrumentation.time_ms", sw.Elapsed.TotalMilliseconds); + return true; } diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AdoNet/SystemDataSqlClientTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AdoNet/SystemDataSqlClientTests.cs index 7f8449e4e910..a42ea057056e 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AdoNet/SystemDataSqlClientTests.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AdoNet/SystemDataSqlClientTests.cs @@ -89,6 +89,7 @@ public async Task SubmitsTraces(string packageVersion, string metadataSchemaVers settings.AddSimpleScrubber("peer.service: localhost", "peer.service: sqlserver"); settings.AddSimpleScrubber("peer.service: (localdb)\\MSSQLLocalDB", "peer.service: sqlserver"); settings.AddSimpleScrubber("peer.service: sqledge_arm64", "peer.service: sqlserver"); + settings.AddRegexScrubber(new Regex("dd.instrumentation.time_ms: \\d+.\\d+"), "dd.instrumentation.time_ms: 123.456"); var fileName = nameof(SystemDataSqlClientTests); diff --git a/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV0Rules.cs b/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV0Rules.cs index 61cd18949234..f9fee104ec11 100644 --- a/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV0Rules.cs +++ b/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV0Rules.cs @@ -647,6 +647,7 @@ public static Result IsSqlClientV0(this MockSpan span) => Result.FromSpan(span) .IsPresent("out.host") .IsOptional("_dd.base_service") .IsOptional("_dd.dbm_trace_injected") + .IsOptional("dd.instrumentation.time_ms") .Matches("db.type", "sql-server") .Matches("component", "SqlClient") .Matches("span.kind", "client")); diff --git a/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV1Rules.cs b/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV1Rules.cs index 27ff3aed7af8..00333d1121b6 100644 --- a/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV1Rules.cs +++ b/tracer/test/Datadog.Trace.TestHelpers/SpanMetadataV1Rules.cs @@ -889,6 +889,7 @@ public static Result IsSqlClientV1(this MockSpan span) => Result.FromSpan(span) .IsOptional("_dd.base_service") .MatchesOneOf("_dd.peer.service.source", "db.name", "out.host", "peer.service") .IsOptional("_dd.dbm_trace_injected") + .IsOptional("dd.instrumentation.time_ms") .Matches("component", "SqlClient") .Matches("span.kind", "client")); diff --git a/tracer/test/snapshots/SystemDataSqlClientTests.tagged.SchemaV0.verified.txt b/tracer/test/snapshots/SystemDataSqlClientTests.tagged.SchemaV0.verified.txt index 5d7c1b7cde61..6bbcb953397e 100644 --- a/tracer/test/snapshots/SystemDataSqlClientTests.tagged.SchemaV0.verified.txt +++ b/tracer/test/snapshots/SystemDataSqlClientTests.tagged.SchemaV0.verified.txt @@ -18,6 +18,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -40,6 +41,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -62,6 +64,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -84,6 +87,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -106,6 +110,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -128,6 +133,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -150,6 +156,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -172,6 +179,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -194,6 +202,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -216,6 +225,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -238,6 +248,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -260,6 +271,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -282,6 +294,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -304,6 +317,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -326,6 +340,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -348,6 +363,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -370,6 +386,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -392,6 +409,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -414,6 +432,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -436,6 +455,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -458,6 +478,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -480,6 +501,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -502,6 +524,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -524,6 +547,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -546,6 +570,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -568,6 +593,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -590,6 +616,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -612,6 +639,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -634,6 +662,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -656,6 +685,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -678,6 +708,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -700,6 +731,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -722,6 +754,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -744,6 +777,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -766,6 +800,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -788,6 +823,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -810,6 +846,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -832,6 +869,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -854,6 +892,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -876,6 +915,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -898,6 +938,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -920,6 +961,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -942,6 +984,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -964,6 +1007,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -986,6 +1030,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1008,6 +1053,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1030,6 +1076,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1052,6 +1099,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1074,6 +1122,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1096,6 +1145,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1118,6 +1168,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1140,6 +1191,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1162,6 +1214,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1184,6 +1237,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1206,6 +1260,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1228,6 +1283,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1250,6 +1306,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1272,6 +1329,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1294,6 +1352,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1316,6 +1375,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1338,6 +1398,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1360,6 +1421,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1382,6 +1444,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1404,6 +1467,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1426,6 +1490,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1448,6 +1513,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1470,6 +1536,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1492,6 +1559,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1514,6 +1582,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1536,6 +1605,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1558,6 +1628,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1580,6 +1651,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1602,6 +1674,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1624,6 +1697,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1646,6 +1720,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1668,6 +1743,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1690,6 +1766,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1712,6 +1789,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1734,6 +1812,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1756,6 +1835,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1778,6 +1858,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1800,6 +1881,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1822,6 +1904,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1844,6 +1927,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1866,6 +1950,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1888,6 +1973,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1910,6 +1996,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1932,6 +2019,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1954,6 +2042,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1976,6 +2065,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -1998,6 +2088,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2020,6 +2111,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2042,6 +2134,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2064,6 +2157,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2086,6 +2180,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2108,6 +2203,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2130,6 +2226,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2152,6 +2249,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2174,6 +2272,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2196,6 +2295,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2218,6 +2318,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2240,6 +2341,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2262,6 +2364,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2284,6 +2387,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2306,6 +2410,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2328,6 +2433,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2350,6 +2456,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2372,6 +2479,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2394,6 +2502,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2416,6 +2525,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2438,6 +2548,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2460,6 +2571,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2482,6 +2594,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2504,6 +2617,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2526,6 +2640,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2548,6 +2663,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2570,6 +2686,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2592,6 +2709,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2614,6 +2732,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2636,6 +2755,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2658,6 +2778,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2680,6 +2801,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2702,6 +2824,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2724,6 +2847,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2746,6 +2870,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2768,6 +2893,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2790,6 +2916,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2812,6 +2939,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2834,6 +2962,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2856,6 +2985,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2878,6 +3008,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2900,6 +3031,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2922,6 +3054,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2944,6 +3077,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2966,6 +3100,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -2988,6 +3123,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3010,6 +3146,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3032,6 +3169,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3054,6 +3192,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3076,6 +3215,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3098,6 +3238,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3120,6 +3261,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3142,6 +3284,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3164,6 +3307,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3186,6 +3330,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3208,6 +3353,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3230,6 +3376,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3252,6 +3399,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3274,6 +3422,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3296,6 +3445,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3318,6 +3468,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3340,6 +3491,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3362,6 +3514,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3384,6 +3537,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3406,6 +3560,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3428,6 +3583,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3450,6 +3606,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3472,6 +3629,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3494,6 +3652,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3516,6 +3675,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3538,6 +3698,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3560,6 +3721,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3582,6 +3744,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3604,6 +3767,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3626,6 +3790,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3648,6 +3813,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3670,6 +3836,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } }, @@ -3692,6 +3859,7 @@ _dd.dbm_trace_injected: true }, Metrics: { + dd.instrumentation.time_ms: 123.456, _dd.top_level: 1.0 } } diff --git a/tracer/test/snapshots/SystemDataSqlClientTests.tagged.SchemaV1.verified.txt b/tracer/test/snapshots/SystemDataSqlClientTests.tagged.SchemaV1.verified.txt index d050f12948a9..2450c8572185 100644 --- a/tracer/test/snapshots/SystemDataSqlClientTests.tagged.SchemaV1.verified.txt +++ b/tracer/test/snapshots/SystemDataSqlClientTests.tagged.SchemaV1.verified.txt @@ -18,6 +18,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -39,6 +42,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -60,6 +66,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -81,6 +90,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -102,6 +114,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -123,6 +138,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -144,6 +162,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -165,6 +186,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -186,6 +210,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -207,6 +234,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -228,6 +258,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -249,6 +282,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -270,6 +306,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -291,6 +330,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -312,6 +354,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -333,6 +378,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -354,6 +402,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -375,6 +426,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -396,6 +450,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -417,6 +474,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -438,6 +498,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -459,6 +522,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -480,6 +546,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -501,6 +570,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -522,6 +594,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -543,6 +618,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -564,6 +642,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -585,6 +666,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -606,6 +690,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -627,6 +714,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -648,6 +738,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -669,6 +762,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -690,6 +786,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -711,6 +810,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -732,6 +834,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -753,6 +858,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -774,6 +882,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -795,6 +906,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -816,6 +930,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -837,6 +954,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -858,6 +978,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -879,6 +1002,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -900,6 +1026,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -921,6 +1050,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -942,6 +1074,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -963,6 +1098,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -984,6 +1122,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1005,6 +1146,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1026,6 +1170,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1047,6 +1194,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1068,6 +1218,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1089,6 +1242,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1110,6 +1266,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1131,6 +1290,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1152,6 +1314,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1173,6 +1338,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1194,6 +1362,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1215,6 +1386,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1236,6 +1410,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1257,6 +1434,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1278,6 +1458,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1299,6 +1482,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1320,6 +1506,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1341,6 +1530,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1362,6 +1554,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1383,6 +1578,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1404,6 +1602,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1425,6 +1626,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1446,6 +1650,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1467,6 +1674,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1488,6 +1698,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1509,6 +1722,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1530,6 +1746,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1551,6 +1770,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1572,6 +1794,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1593,6 +1818,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1614,6 +1842,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1635,6 +1866,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1656,6 +1890,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1677,6 +1914,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1698,6 +1938,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1719,6 +1962,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1740,6 +1986,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1761,6 +2010,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1782,6 +2034,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1803,6 +2058,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1824,6 +2082,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1845,6 +2106,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1866,6 +2130,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1887,6 +2154,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1908,6 +2178,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1929,6 +2202,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1950,6 +2226,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1971,6 +2250,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -1992,6 +2274,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2013,6 +2298,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2034,6 +2322,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2055,6 +2346,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2076,6 +2370,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2097,6 +2394,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2118,6 +2418,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2139,6 +2442,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2160,6 +2466,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2181,6 +2490,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2202,6 +2514,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2223,6 +2538,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2244,6 +2562,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2265,6 +2586,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2286,6 +2610,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2307,6 +2634,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2328,6 +2658,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2349,6 +2682,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2370,6 +2706,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2391,6 +2730,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2412,6 +2754,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2433,6 +2778,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2454,6 +2802,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2475,6 +2826,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2496,6 +2850,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2517,6 +2874,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2538,6 +2898,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2559,6 +2922,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2580,6 +2946,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2601,6 +2970,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2622,6 +2994,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2643,6 +3018,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2664,6 +3042,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2685,6 +3066,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2706,6 +3090,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2727,6 +3114,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2748,6 +3138,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2769,6 +3162,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2790,6 +3186,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2811,6 +3210,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2832,6 +3234,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2853,6 +3258,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2874,6 +3282,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2895,6 +3306,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2916,6 +3330,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2937,6 +3354,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2958,6 +3378,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -2979,6 +3402,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3000,6 +3426,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3021,6 +3450,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3042,6 +3474,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3063,6 +3498,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3084,6 +3522,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3105,6 +3546,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3126,6 +3570,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3147,6 +3594,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3168,6 +3618,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3189,6 +3642,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3210,6 +3666,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3231,6 +3690,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3252,6 +3714,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3273,6 +3738,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3294,6 +3762,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3315,6 +3786,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3336,6 +3810,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3357,6 +3834,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3378,6 +3858,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3399,6 +3882,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3420,6 +3906,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3441,6 +3930,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3462,6 +3954,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3483,6 +3978,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3504,6 +4002,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } }, { @@ -3525,6 +4026,9 @@ version: 1.0.0, _dd.dbm_trace_injected: true, _dd.peer.service.source: out.host + }, + Metrics: { + dd.instrumentation.time_ms: 123.456 } } ] \ No newline at end of file diff --git a/tracer/test/test-applications/integrations/Samples.Microsoft.Data.SqlClient/Program.cs b/tracer/test/test-applications/integrations/Samples.Microsoft.Data.SqlClient/Program.cs index 1bf587f04f86..4bdf500cc1bc 100644 --- a/tracer/test/test-applications/integrations/Samples.Microsoft.Data.SqlClient/Program.cs +++ b/tracer/test/test-applications/integrations/Samples.Microsoft.Data.SqlClient/Program.cs @@ -40,7 +40,7 @@ private static DbConnection OpenConnection(Type connectionType) { int numAttempts = 3; var connectionString = Environment.GetEnvironmentVariable("SQLSERVER_CONNECTION_STRING") ?? -@"Server=(localdb)\MSSQLLocalDB;Integrated Security=true;Connection Timeout=60"; + @"Server=sqlserver;User=sa;Password=Strong!Passw0rd"; for (int i = 0; i < numAttempts; i++) { diff --git a/tracer/test/test-applications/integrations/Samples.SqlServer/Program.cs b/tracer/test/test-applications/integrations/Samples.SqlServer/Program.cs index 52fe869f6976..5a477595de8e 100644 --- a/tracer/test/test-applications/integrations/Samples.SqlServer/Program.cs +++ b/tracer/test/test-applications/integrations/Samples.SqlServer/Program.cs @@ -42,7 +42,7 @@ private static DbConnection OpenConnection(Type connectionType) { int numAttempts = 3; var connectionString = Environment.GetEnvironmentVariable("SQLSERVER_CONNECTION_STRING") ?? -@"Server=(localdb)\MSSQLLocalDB;Integrated Security=true;Connection Timeout=60"; + @"Server=sqlserver;User=sa;Password=Strong!Passw0rd"; for (int i = 0; i < numAttempts; i++) { From afe8145efa4d8f66dd3f387c15222197a8cca45d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Fri, 30 Aug 2024 13:00:09 +0200 Subject: [PATCH 15/23] longer variable name --- .../DatabaseMonitoring/DatabaseMonitoringPropagator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs index c9a4c4f2f9ac..83850aa3eeb6 100644 --- a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs +++ b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs @@ -96,7 +96,7 @@ internal static bool PropagateDataViaContext(DbmPropagationLevel propagationLeve return false; } - var sw = System.Diagnostics.Stopwatch.StartNew(); + var stopwatch = System.Diagnostics.Stopwatch.StartNew(); byte version = 0; // version can have a maximum value of 15 in the current format var sampled = SamplingPriorityValues.IsKeep(span.Context.GetOrMakeSamplingDecision() ?? SamplingPriorityValues.Default); @@ -123,7 +123,7 @@ internal static bool PropagateDataViaContext(DbmPropagationLevel propagationLeve // Since sending the query to the DB can be a bit long, we register the time it took for transparency. // Not using _dd because we want the customers to be able to see that tag. - span.SetMetric("dd.instrumentation.time_ms", sw.Elapsed.TotalMilliseconds); + span.SetMetric("dd.instrumentation.time_ms", stopwatch.Elapsed.TotalMilliseconds); return true; } From 2eecd397c33751c1c676e3ee846b8b4706f23505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Fri, 30 Aug 2024 14:18:53 +0200 Subject: [PATCH 16/23] undo changes to samples that were not meant to be commited --- .../integrations/Samples.Microsoft.Data.SqlClient/Program.cs | 2 +- .../test-applications/integrations/Samples.SqlServer/Program.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tracer/test/test-applications/integrations/Samples.Microsoft.Data.SqlClient/Program.cs b/tracer/test/test-applications/integrations/Samples.Microsoft.Data.SqlClient/Program.cs index 4bdf500cc1bc..1bf587f04f86 100644 --- a/tracer/test/test-applications/integrations/Samples.Microsoft.Data.SqlClient/Program.cs +++ b/tracer/test/test-applications/integrations/Samples.Microsoft.Data.SqlClient/Program.cs @@ -40,7 +40,7 @@ private static DbConnection OpenConnection(Type connectionType) { int numAttempts = 3; var connectionString = Environment.GetEnvironmentVariable("SQLSERVER_CONNECTION_STRING") ?? - @"Server=sqlserver;User=sa;Password=Strong!Passw0rd"; +@"Server=(localdb)\MSSQLLocalDB;Integrated Security=true;Connection Timeout=60"; for (int i = 0; i < numAttempts; i++) { diff --git a/tracer/test/test-applications/integrations/Samples.SqlServer/Program.cs b/tracer/test/test-applications/integrations/Samples.SqlServer/Program.cs index 5a477595de8e..52fe869f6976 100644 --- a/tracer/test/test-applications/integrations/Samples.SqlServer/Program.cs +++ b/tracer/test/test-applications/integrations/Samples.SqlServer/Program.cs @@ -42,7 +42,7 @@ private static DbConnection OpenConnection(Type connectionType) { int numAttempts = 3; var connectionString = Environment.GetEnvironmentVariable("SQLSERVER_CONNECTION_STRING") ?? - @"Server=sqlserver;User=sa;Password=Strong!Passw0rd"; +@"Server=(localdb)\MSSQLLocalDB;Integrated Security=true;Connection Timeout=60"; for (int i = 0; i < numAttempts; i++) { From 03bef4fb15280152b3e57fc76623293edd70b629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Mon, 2 Sep 2024 15:58:14 +0200 Subject: [PATCH 17/23] don't include instrumentation time in the query span --- .../ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs index 8d6402a7cd3e..7b82a1bb269f 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs @@ -123,6 +123,10 @@ internal static class DbScopeFactory Log.Error(ex, "Error propagating span data for DBM"); } + // we have to start the span before doing the DBM propagation work (to have the span ID) + // but ultimately, we don't want to measure the time spent instrumenting. + scope.Span.ResetStartTime(); + return scope; static bool HasDbType(Span span, string dbType) From 98e3690b89c6fe7e7cf61ac31ed7b551c52707ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Wed, 4 Sep 2024 09:35:24 +0200 Subject: [PATCH 18/23] const Co-authored-by: Lucas Pimentel --- .../DatabaseMonitoring/DatabaseMonitoringPropagator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs index 83850aa3eeb6..f923dfffdd6d 100644 --- a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs +++ b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs @@ -98,7 +98,7 @@ internal static bool PropagateDataViaContext(DbmPropagationLevel propagationLeve var stopwatch = System.Diagnostics.Stopwatch.StartNew(); - byte version = 0; // version can have a maximum value of 15 in the current format + const byte version = 0; // version can have a maximum value of 15 in the current format var sampled = SamplingPriorityValues.IsKeep(span.Context.GetOrMakeSamplingDecision() ?? SamplingPriorityValues.Default); var contextValue = BuildContextValue(version, sampled, span.SpanId, span.TraceId128); From af3efd848937cae820622ee5bffdf1c742fa0280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Wed, 4 Sep 2024 09:35:37 +0200 Subject: [PATCH 19/23] avoid nullcheck Co-authored-by: Lucas Pimentel --- .../DatabaseMonitoring/DatabaseMonitoringPropagator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs index f923dfffdd6d..7dd1a422a25f 100644 --- a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs +++ b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs @@ -99,7 +99,7 @@ internal static bool PropagateDataViaContext(DbmPropagationLevel propagationLeve var stopwatch = System.Diagnostics.Stopwatch.StartNew(); const byte version = 0; // version can have a maximum value of 15 in the current format - var sampled = SamplingPriorityValues.IsKeep(span.Context.GetOrMakeSamplingDecision() ?? SamplingPriorityValues.Default); + var sampled = SamplingPriorityValues.IsKeep(span.Context.TraceContext.GetOrMakeSamplingDecision()); var contextValue = BuildContextValue(version, sampled, span.SpanId, span.TraceId128); using (var injectionCommand = connection.CreateCommand()) From 36459054f50d2d0ad09e715494072187cba3c34d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Wed, 4 Sep 2024 09:40:55 +0200 Subject: [PATCH 20/23] imports cleanup --- .../ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs | 5 ----- .../DatabaseMonitoring/DatabaseMonitoringPropagator.cs | 1 - 2 files changed, 6 deletions(-) diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs index 7b82a1bb269f..1ec5bb1138de 100644 --- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs +++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AdoNet/DbScopeFactory.cs @@ -8,16 +8,11 @@ using System; using System.Collections.Generic; using System.Data; -using System.Data.SqlTypes; using System.Diagnostics.CodeAnalysis; -using System.Linq; using System.Threading; using Datadog.Trace.AppSec; -using Datadog.Trace.AppSec.Rasp; using Datadog.Trace.Configuration; using Datadog.Trace.DatabaseMonitoring; -using Datadog.Trace.ExtensionMethods; -using Datadog.Trace.Iast; using Datadog.Trace.Logging; using Datadog.Trace.Tagging; using Datadog.Trace.Util; diff --git a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs index 7dd1a422a25f..a275f1f4abff 100644 --- a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs +++ b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs @@ -12,7 +12,6 @@ using Datadog.Trace.Util; using Datadog.Trace.VendoredMicrosoftCode.System.Buffers.Binary; using Datadog.Trace.Vendors.Serilog.Events; -using Datadog.Trace.Vendors.StatsdClient; #nullable enable From 9c0d70e5512e54f877db357081f06187954463f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Wed, 4 Sep 2024 09:44:11 +0200 Subject: [PATCH 21/23] set sampling prio from trace context in tests --- .../DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs index a767d88bbca3..94bbd25f576b 100644 --- a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs +++ b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs @@ -132,7 +132,7 @@ public void ExpectedCommentInjectedV1() [InlineData("full", "sqlite", SamplingPriorityValues.UserKeep, false, null)] [InlineData("full", "oracle", SamplingPriorityValues.UserKeep, false, null)] [InlineData("full", "mysql", SamplingPriorityValues.UserKeep, false, null)] - public void ExpectedContextSet(string propagationMode, string integration, int? samplingPriority, bool shouldInject, string expectedContext) + public void ExpectedContextSet(string propagationMode, string integration, int samplingPriority, bool shouldInject, string expectedContext) { Enum.TryParse(propagationMode, ignoreCase: true, out DbmPropagationLevel dbmPropagationLevel); Enum.TryParse(integration, ignoreCase: true, out IntegrationId integrationId); @@ -152,7 +152,7 @@ public void ExpectedContextSet(string propagationMode, string integration, int? .Callback(value => context = (byte[])value); var span = _v0Tracer.StartSpan("db.query", parent: SpanContext.None, serviceName: "pouet", traceId: new TraceId(Upper: 0xBABEBABEBABEBABE, Lower: 0xCAFECAFECAFECAFE), spanId: 0xBEEFBEEFBEEFBEEF); - span.SetTraceSamplingPriority((SamplingPriority)samplingPriority.Value); + span.Context.TraceContext.SetSamplingPriority(samplingPriority); DatabaseMonitoringPropagator.PropagateDataViaContext(dbmPropagationLevel, integrationId, connectionMock.Object, span); From bc85d08bf57d89ec87635295a6ff702a2297d8ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Wed, 4 Sep 2024 11:17:45 +0200 Subject: [PATCH 22/23] reduce new object creation --- .../DatabaseMonitoringPropagator.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs index a275f1f4abff..4a7e496b77a7 100644 --- a/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs +++ b/tracer/src/Datadog.Trace/DatabaseMonitoring/DatabaseMonitoringPropagator.cs @@ -137,16 +137,10 @@ private static byte[] BuildContextValue(byte version, bool isSampled, ulong span var versionAndSampling = (byte)(((version << 4) & 0b1111_0000) | (sampled & 0b0000_0001)); var contextBytes = new byte[1 + sizeof(ulong) + TraceId.Size]; - contextBytes[0] = versionAndSampling; - BinaryPrimitives.WriteUInt64BigEndian( - new VendoredMicrosoftCode.System.Span(contextBytes, start: 1, sizeof(ulong)), - spanId); - BinaryPrimitives.WriteUInt64BigEndian( - new VendoredMicrosoftCode.System.Span(contextBytes, 1 + sizeof(ulong), sizeof(ulong)), - traceId.Upper); - BinaryPrimitives.WriteUInt64BigEndian( - new VendoredMicrosoftCode.System.Span(contextBytes, 1 + sizeof(ulong) + sizeof(ulong), sizeof(ulong)), - traceId.Lower); + var span = new VendoredMicrosoftCode.System.Span(contextBytes) { [0] = versionAndSampling }; + BinaryPrimitives.WriteUInt64BigEndian(span.Slice(1), spanId); + BinaryPrimitives.WriteUInt64BigEndian(span.Slice(1 + sizeof(ulong)), traceId.Upper); + BinaryPrimitives.WriteUInt64BigEndian(span.Slice(1 + sizeof(ulong) + sizeof(ulong)), traceId.Lower); return contextBytes; } From d7429c6dd1415f8792412ad447c2d65c43ab90ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Thu, 5 Sep 2024 09:49:02 +0200 Subject: [PATCH 23/23] test for both tracer versions --- .../DatabaseMonitoringPropagatorTests.cs | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs index 94bbd25f576b..3f6ed33a5fac 100644 --- a/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs +++ b/tracer/test/Datadog.Trace.Tests/DatabaseMonitoring/DatabaseMonitoringPropagatorTests.cs @@ -151,20 +151,23 @@ public void ExpectedContextSet(string propagationMode, string integration, int s parameterMock.SetupSet(p => p.Value = It.IsAny()) .Callback(value => context = (byte[])value); - var span = _v0Tracer.StartSpan("db.query", parent: SpanContext.None, serviceName: "pouet", traceId: new TraceId(Upper: 0xBABEBABEBABEBABE, Lower: 0xCAFECAFECAFECAFE), spanId: 0xBEEFBEEFBEEFBEEF); - span.Context.TraceContext.SetSamplingPriority(samplingPriority); - - DatabaseMonitoringPropagator.PropagateDataViaContext(dbmPropagationLevel, integrationId, connectionMock.Object, span); - - if (shouldInject) - { - sql.Should().StartWith("set context_info "); - BitConverter.ToString(context).Replace("-", string.Empty).Should().Be(expectedContext); - } - else + foreach (var tracer in new[] { _v0Tracer, _v1Tracer }) { - sql.Should().BeNull(); - context.Should().BeNull(); + var span = tracer.StartSpan("db.query", parent: SpanContext.None, serviceName: "pouet", traceId: new TraceId(Upper: 0xBABEBABEBABEBABE, Lower: 0xCAFECAFECAFECAFE), spanId: 0xBEEFBEEFBEEFBEEF); + span.Context.TraceContext.SetSamplingPriority(samplingPriority); + + DatabaseMonitoringPropagator.PropagateDataViaContext(dbmPropagationLevel, integrationId, connectionMock.Object, span); + + if (shouldInject) + { + sql.Should().StartWith("set context_info "); + BitConverter.ToString(context).Replace("-", string.Empty).Should().Be(expectedContext); + } + else + { + sql.Should().BeNull(); + context.Should().BeNull(); + } } } }