Skip to content

[Tracing] Update mapping from Datadog to OTLP spans#8385

Open
zacharycmontoya wants to merge 4 commits intomasterfrom
zach.montoya/otlp-add-core-attributes
Open

[Tracing] Update mapping from Datadog to OTLP spans#8385
zacharycmontoya wants to merge 4 commits intomasterfrom
zach.montoya/otlp-add-core-attributes

Conversation

@zacharycmontoya
Copy link
Copy Markdown
Contributor

Summary of changes

Add core Datadog semantics as span attributes. This ensures that the core semantics are identified when the Datadog Agent / backend receives OTLP spans and translates them into Datadog spans that power the backend.

Reason for change

We should keep the same Datadog experience regardless of the tracing protocol used. These changes facilitate that.

Implementation details

Updates Datadog.Trace.OpenTelemetry.OtlpMapper.EmitAttributesFromSpan to add several span attributes sourced from Datadog.Trace.Span properties:

  • Span.ServiceName => OtlpSpan.Attributes["service.name"]
  • Span.OperationName => OtlpSpan.Attributes["operation.name"]
  • Span.ResourceName => OtlpSpan.Attributes["resource.name"]
  • Span.Type => OtlpSpan.Attributes["span.type"]

Test coverage

  • Unit tests: Added unit tests for Datadog.Trace.OpenTelemetry.OtlpMapper which handles the mapping from Datadog-specific concepts into OTLP attributes
  • Integration tests: Updated the snapshot for OpenTelemetrySdkTests

Other details

N/A

@zacharycmontoya zacharycmontoya added the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label Mar 27, 2026
@zacharycmontoya zacharycmontoya requested a review from a team as a code owner March 27, 2026 21:43
@zacharycmontoya zacharycmontoya added the area:opentelemetry OpenTelemetry support label Mar 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Snapshots difference summary

The following differences have been observed in committed snapshots. It is meant to help the reviewer.
The diff is simplistic, so please check some files anyway while we improve it.

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "internal"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "DeprecatedHttpStatusTagName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "internal"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "InnerSpanError"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "internal"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "InnerSpanOk"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "internal"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "InnerSpanUpdated"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "internal"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "OperationNameRootSpan"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },
+                {
+                  "key": "runtime-id",
+                  "value": {
+                    "stringValue": "Guid_1"
+                  }
+                },

5 occurrences of :

-                },
-                {
-                  "key": "runtime-id",
-                  "value": {
-                    "stringValue": "Guid_1"
-                  }

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "http.server.request"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "web"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "http.client.request"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "http"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "redis.query"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "db"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "kafka.receive"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "http"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "kafka.receive"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "web"
+                  }
+                },

2 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "kafka.receive"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "aws.s3.request"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "http"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "aws.client.request"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "http"
+                  }
+                },

1 occurrences of :

-                  "key": "span.kind",
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "grpc.client.request"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "http"
+                  }
+                },
+                {
+                  "key": "span.kind",

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "grpc.server.request"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "web"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "aws.my_function.invoke"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "http"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "datasource.invoke"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "web"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "graphql.server.request"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "web"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "amqp.server.request"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "web"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "server.request"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "web"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "amqp.client.request"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "http"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "client.request"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "http"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "internal"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "consumer"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "producer"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceName"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "servicenameoverride"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "operationnameoverride"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "ResourceNameOverride"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "SpanTypeOverride"
+                  }
+                },
+                {
+                  "key": "runtime-id",
+                  "value": {
+                    "stringValue": "Guid_1"
+                  }
+                },

2 occurrences of :

-                {
-                  "key": "runtime-id",
-                  "value": {
-                    "stringValue": "Guid_1"
-                  }
-                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "internal"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "Response"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "saying_hello"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "SayHello"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },
+                {
+                  "key": "runtime-id",
+                  "value": {
+                    "stringValue": "Guid_1"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "internal"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "SayHello2"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },
+                {
+                  "key": "runtime-id",
+                  "value": {
+                    "stringValue": "Guid_1"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "internal"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "SayHello3"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },
+                {
+                  "key": "runtime-id",
+                  "value": {
+                    "stringValue": "Guid_1"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "samples.opentelemetrysdk"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "internal"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "service.name should be the DefaultServiceName value"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },
+                {
+                  "key": "runtime-id",
+                  "value": {
+                    "stringValue": "Guid_1"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "internal"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "SomeHttpSpan"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "internal"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "StartActiveSpan.Child"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "internal"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "StartRootSpan"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "internal"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "StartSpan"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "myservicename"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "internal"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "StartSpan2"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },

1 occurrences of :

+                {
+                  "key": "service.name",
+                  "value": {
+                    "stringValue": "samples.opentelemetrysdk"
+                  }
+                },
+                {
+                  "key": "operation.name",
+                  "value": {
+                    "stringValue": "internal"
+                  }
+                },
+                {
+                  "key": "resource.name",
+                  "value": {
+                    "stringValue": "Transform"
+                  }
+                },
+                {
+                  "key": "span.type",
+                  "value": {
+                    "stringValue": "custom"
+                  }
+                },
+                {
+                  "key": "runtime-id",
+                  "value": {
+                    "stringValue": "Guid_1"
+                  }
+                },

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 069cf30216

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


var tagWriter = new TagWriter(writeKeyValue, tagProcessors, count, limit);
spanModel.Span.Tags.EnumerateTags(ref tagWriter);
count += tagWriter.Count;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Stop double-counting attributes before writing metrics

In EmitAttributesFromSpan, TagWriter.Count is initialized with the current count, so after the new service/operation/resource/type attributes are written, count += tagWriter.Count double-counts already-emitted attributes. This inflated count is then passed to the metrics writer, which causes metric attributes to be dropped earlier than limit (for example, with a low limit, metrics can all be dropped even when there is still real capacity left).

Useful? React with 👍 / 👎.

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Mar 27, 2026

Benchmarks

Benchmark execution time: 2026-03-27 22:26:56

Comparing candidate commit 069cf30 in PR branch zach.montoya/otlp-add-core-attributes with baseline commit 5ff69b3 in branch master.

Found 9 performance improvements and 7 performance regressions! Performance is the same for 259 metrics, 13 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • 🟩 execution_time [-21.181ms; -20.818ms] or [-16.990%; -16.698%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net6.0

  • 🟩 execution_time [-21.958ms; -15.509ms] or [-10.232%; -7.227%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1

  • 🟥 execution_time [+17.572ms; +23.712ms] or [+8.965%; +12.097%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest netcoreapp3.1

  • 🟩 throughput [+597.487op/s; +1315.122op/s] or [+6.194%; +13.633%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 throughput [-145.434op/s; -114.123op/s] or [-12.571%; -9.864%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • 🟩 execution_time [-26.776ms; -22.319ms] or [-14.570%; -12.145%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+48.342ms; +53.340ms] or [+34.593%; +38.169%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1

  • 🟥 throughput [-195.634op/s; -145.768op/s] or [-37.118%; -27.657%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync netcoreapp3.1

  • 🟩 execution_time [-54.073ms; -51.261ms] or [-26.761%; -25.369%]
  • 🟩 throughput [+31081.068op/s; +38488.098op/s] or [+7.702%; +9.537%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1

  • 🟩 allocated_mem [-20.102KB; -20.070KB] or [-7.245%; -7.233%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+13.691ms; +14.967ms] or [+7.325%; +8.008%]

scenario:Benchmarks.Trace.NLogBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+10.814ms; +13.028ms] or [+5.795%; +6.982%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+10.103ms; +12.386ms] or [+5.118%; +6.275%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0

  • 🟩 execution_time [-114.753ms; -108.480ms] or [-58.106%; -54.930%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1

  • 🟩 execution_time [-19.639ms; -15.502ms] or [-9.211%; -7.270%]

@dd-trace-dotnet-ci-bot
Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8385) and master.

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration72.02 ± (71.87 - 72.20) ms71.79 ± (71.78 - 72.12) ms-0.3%
.NET Framework 4.8 - Bailout
duration75.90 ± (75.92 - 76.28) ms75.71 ± (75.49 - 75.87) ms-0.3%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1071.19 ± (1073.40 - 1080.69) ms1069.89 ± (1071.87 - 1078.03) ms-0.1%
.NET Core 3.1 - Baseline
process.internal_duration_ms22.31 ± (22.27 - 22.36) ms22.29 ± (22.26 - 22.33) ms-0.1%
process.time_to_main_ms83.95 ± (83.77 - 84.13) ms83.50 ± (83.30 - 83.70) ms-0.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.90 ± (10.90 - 10.90) MB10.90 ± (10.90 - 10.91) MB+0.0%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.29 ± (22.26 - 22.33) ms22.36 ± (22.32 - 22.39) ms+0.3%✅⬆️
process.time_to_main_ms84.76 ± (84.56 - 84.95) ms84.79 ± (84.61 - 84.98) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.94 ± (10.94 - 10.95) MB10.94 ± (10.94 - 10.95) MB+0.0%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms223.72 ± (222.51 - 224.93) ms225.84 ± (224.74 - 226.94) ms+0.9%✅⬆️
process.time_to_main_ms533.23 ± (532.05 - 534.41) ms536.66 ± (535.30 - 538.03) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.28 ± (48.25 - 48.31) MB48.21 ± (48.18 - 48.25) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.2%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.02 ± (20.98 - 21.06) ms21.02 ± (20.99 - 21.06) ms+0.0%✅⬆️
process.time_to_main_ms72.28 ± (72.08 - 72.47) ms72.47 ± (72.30 - 72.65) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.62 ± (10.62 - 10.62) MB10.64 ± (10.63 - 10.64) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.97 ± (20.92 - 21.02) ms21.01 ± (20.97 - 21.05) ms+0.2%✅⬆️
process.time_to_main_ms73.15 ± (72.98 - 73.31) ms73.35 ± (73.18 - 73.52) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.72 ± (10.72 - 10.73) MB10.74 ± (10.74 - 10.75) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms389.35 ± (386.97 - 391.72) ms389.61 ± (387.16 - 392.07) ms+0.1%✅⬆️
process.time_to_main_ms533.36 ± (532.47 - 534.25) ms531.54 ± (530.57 - 532.52) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.33 ± (50.30 - 50.35) MB50.33 ± (50.30 - 50.36) MB+0.0%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.25 ± (19.22 - 19.28) ms19.27 ± (19.24 - 19.31) ms+0.1%✅⬆️
process.time_to_main_ms72.01 ± (71.86 - 72.17) ms71.79 ± (71.60 - 71.97) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.68 ± (7.68 - 7.69) MB7.68 ± (7.68 - 7.69) MB+0.0%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.40 ± (19.36 - 19.45) ms19.23 ± (19.18 - 19.27) ms-0.9%
process.time_to_main_ms73.12 ± (72.93 - 73.31) ms72.36 ± (72.20 - 72.52) ms-1.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.74 ± (7.73 - 7.75) MB7.73 ± (7.73 - 7.74) MB-0.1%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms308.11 ± (305.82 - 310.41) ms307.91 ± (305.84 - 309.97) ms-0.1%
process.time_to_main_ms492.18 ± (491.46 - 492.90) ms490.72 ± (489.98 - 491.46) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.25 ± (37.23 - 37.27) MB37.29 ± (37.27 - 37.31) MB+0.1%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.1%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration218.49 ± (218.04 - 219.56) ms203.77 ± (203.91 - 204.78) ms-6.7%
.NET Framework 4.8 - Bailout
duration223.69 ± (223.62 - 225.44) ms209.26 ± (209.18 - 210.23) ms-6.4%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1251.39 ± (1249.52 - 1257.15) ms1202.50 ± (1202.64 - 1209.65) ms-3.9%
.NET Core 3.1 - Baseline
process.internal_duration_ms213.28 ± (212.53 - 214.04) ms200.46 ± (199.92 - 201.00) ms-6.0%
process.time_to_main_ms91.48 ± (91.21 - 91.75) ms85.88 ± (85.63 - 86.13) ms-6.1%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.90 ± (15.89 - 15.92) MB15.99 ± (15.97 - 16.01) MB+0.5%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (19 - 20)-1.8%
.NET Core 3.1 - Bailout
process.internal_duration_ms210.85 ± (210.11 - 211.59) ms198.64 ± (198.13 - 199.15) ms-5.8%
process.time_to_main_ms92.41 ± (92.15 - 92.68) ms86.70 ± (86.45 - 86.95) ms-6.2%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.91 ± (15.90 - 15.93) MB16.07 ± (16.05 - 16.10) MB+1.0%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (20 - 21)-1.9%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms425.02 ± (423.70 - 426.33) ms408.59 ± (407.35 - 409.83) ms-3.9%
process.time_to_main_ms572.59 ± (571.31 - 573.86) ms548.04 ± (546.94 - 549.14) ms-4.3%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed59.14 ± (59.10 - 59.17) MB59.01 ± (58.96 - 59.07) MB-0.2%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.1%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms221.38 ± (220.55 - 222.20) ms205.74 ± (205.14 - 206.33) ms-7.1%
process.time_to_main_ms79.55 ± (79.26 - 79.85) ms75.04 ± (74.82 - 75.26) ms-5.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.14 ± (16.12 - 16.16) MB16.27 ± (16.25 - 16.29) MB+0.8%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 20)19 ± (19 - 19)-1.5%
.NET 6 - Bailout
process.internal_duration_ms222.88 ± (221.85 - 223.91) ms205.69 ± (205.14 - 206.23) ms-7.7%
process.time_to_main_ms81.52 ± (81.18 - 81.85) ms75.87 ± (75.66 - 76.07) ms-6.9%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.13 ± (16.11 - 16.14) MB16.31 ± (16.29 - 16.33) MB+1.1%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 21)20 ± (20 - 20)-0.7%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms611.49 ± (606.78 - 616.21) ms598.86 ± (596.27 - 601.46) ms-2.1%
process.time_to_main_ms574.44 ± (573.28 - 575.60) ms548.16 ± (546.90 - 549.41) ms-4.6%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.75 ± (61.66 - 61.83) MB62.00 ± (61.89 - 62.10) MB+0.4%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (30 - 31)-1.4%
.NET 8 - Baseline
process.internal_duration_ms224.41 ± (223.24 - 225.57) ms202.69 ± (202.21 - 203.16) ms-9.7%
process.time_to_main_ms79.04 ± (78.79 - 79.30) ms73.73 ± (73.52 - 73.94) ms-6.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.47 ± (11.45 - 11.48) MB11.63 ± (11.62 - 11.65) MB+1.5%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-1.2%
.NET 8 - Bailout
process.internal_duration_ms220.71 ± (219.48 - 221.94) ms202.43 ± (201.93 - 202.94) ms-8.3%
process.time_to_main_ms80.42 ± (80.17 - 80.68) ms74.97 ± (74.80 - 75.13) ms-6.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.53 ± (11.51 - 11.55) MB11.70 ± (11.68 - 11.71) MB+1.5%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-1.8%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms622.94 ± (618.70 - 627.19) ms526.71 ± (520.54 - 532.88) ms-15.4%
process.time_to_main_ms528.91 ± (527.62 - 530.21) ms503.75 ± (502.67 - 504.83) ms-4.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed51.99 ± (51.95 - 52.04) MB50.91 ± (50.82 - 51.00) MB-2.1%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.3%
Comparison explanation

Execution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

Duration charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8385) - mean (72ms)  : 69, 74
    master - mean (72ms)  : 70, 74

    section Bailout
    This PR (8385) - mean (76ms)  : 74, 78
    master - mean (76ms)  : 74, 78

    section CallTarget+Inlining+NGEN
    This PR (8385) - mean (1,075ms)  : 1031, 1119
    master - mean (1,077ms)  : 1025, 1129

Loading
FakeDbCommand (.NET Core 3.1)
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8385) - mean (113ms)  : 109, 116
    master - mean (113ms)  : 110, 116

    section Bailout
    This PR (8385) - mean (114ms)  : 111, 117
    master - mean (114ms)  : 111, 116

    section CallTarget+Inlining+NGEN
    This PR (8385) - mean (799ms)  : 780, 818
    master - mean (795ms)  : 770, 820

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8385) - mean (100ms)  : 97, 103
    master - mean (100ms)  : 96, 104

    section Bailout
    This PR (8385) - mean (101ms)  : 97, 104
    master - mean (100ms)  : 98, 103

    section CallTarget+Inlining+NGEN
    This PR (8385) - mean (948ms)  : 913, 983
    master - mean (951ms)  : 902, 1000

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8385) - mean (99ms)  : 95, 102
    master - mean (99ms)  : 96, 102

    section Bailout
    This PR (8385) - mean (99ms)  : 97, 101
    master - mean (100ms)  : 98, 102

    section CallTarget+Inlining+NGEN
    This PR (8385) - mean (830ms)  : 792, 869
    master - mean (832ms)  : 791, 872

Loading
HttpMessageHandler (.NET Framework 4.8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8385) - mean (204ms)  : 198, 210
    master - mean (219ms)  : 208, 230

    section Bailout
    This PR (8385) - mean (210ms)  : 203, 216
    master - mean (225ms)  : 212, 237

    section CallTarget+Inlining+NGEN
    This PR (8385) - mean (1,206ms)  : 1156, 1256
    master - mean (1,253ms)  : 1197, 1309

Loading
HttpMessageHandler (.NET Core 3.1)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8385) - mean (296ms)  : 287, 305
    master - mean (315ms)  : 298, 332

    section Bailout
    This PR (8385) - mean (294ms)  : 288, 301
    master - mean (313ms)  : 299, 327

    section CallTarget+Inlining+NGEN
    This PR (8385) - mean (991ms)  : 960, 1022
    master - mean (1,038ms)  : 1003, 1072

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8385) - mean (289ms)  : 278, 301
    master - mean (311ms)  : 295, 326

    section Bailout
    This PR (8385) - mean (291ms)  : 280, 301
    master - mean (315ms)  : 294, 335

    section CallTarget+Inlining+NGEN
    This PR (8385) - mean (1,179ms)  : 1145, 1212
    master - mean (1,220ms)  : 1144, 1296

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8385) - mean (287ms)  : 277, 297
    master - mean (314ms)  : 291, 338

    section Bailout
    This PR (8385) - mean (288ms)  : 280, 296
    master - mean (313ms)  : 292, 334

    section CallTarget+Inlining+NGEN
    This PR (8385) - mean (1,067ms)  : 990, 1144
    master - mean (1,184ms)  : 1112, 1257

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:opentelemetry OpenTelemetry support area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant