Skip to content

feat(tracer): Update the TagsList infrastructure to allow a secondary OtelName - #8971

Open
zacharycmontoya wants to merge 11 commits into
rfc-impl-httpstatuscodetagfrom
otel-tag-name
Open

feat(tracer): Update the TagsList infrastructure to allow a secondary OtelName#8971
zacharycmontoya wants to merge 11 commits into
rfc-impl-httpstatuscodetagfrom
otel-tag-name

Conversation

@zacharycmontoya

@zacharycmontoya zacharycmontoya commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

Updates the ITags infrastructure so a single ITags property can support generating a tag with either the Datadog-specific tag name or a secondary OpenTelemetry-specific tag. This allows our integrations and cross-product features to read/write a concept without depending on the "physical" tag name in GetTag/SetTag.

Reason for change

We want to support emitting spans that align with OpenTelemetry semantic conventions. Since we already store some shared concepts with ITags properties, we can use the strongly-typed properties to store the underlying information and then emit the tag with the requested semantics (Datadog vs OpenTelemetry). This also means that we readers/writers do not have to update their code with hard-coded tag names (e.g. DD http.status_code vs OTel http.response.status_code) when accessing contextual data via spans -- instead they can access the corresponding strongly-typed property.

Implementation details

Note: This PR is best reviewed commit-by-commit due to the large number of generated files and correctness refactors.

TagsListGenerator

  • The generated TagAttribute class now has an optional OtelName string property
  • The OtelName property receives the same GetTag/SetTag/cached key bytes just like the TagName` property
  • EnumerateTags<TProcessor> now has a bool openTelemetrySemanticsEnabled parameter. For generated ITags implementations
  • Updates the TagsListGeneratorThis update also adds a bool openTelemetrySemanticsEnabled parameter to EnumerateTags<TProcessor> that indicates whether the Datadog or OpenTeleme, which carries the key to be emitted when OpenTelemetry semantics are enabled. The TagsListGenerator update

Tags updated

The following classes use the OtelName to handle emitting the OpenTelemetry attribute http.response.status_code:

  • AwsSdTags
  • HttpTags
  • InferredProxyTags
  • WebTags

Additional changes

  • Unify SpanExtensions and MockSpanExtensions to use the method GetHttpStatusCodeString() for extract the HTTP status code tags with a string return value
  • The AspNetCoreHttpRequestHandler has been updated to make sure that http.response.status_code is not copied from the Activity into our backing span, which is set on .NET 8+
  • Stop propagating the OpenTelemetry semantics mode bool to the OTLP trace serializers, so that only the Span object carries this information. This prevents a possible state where the serializer and span disagree on the semantics mode.
  • Document an outstanding issue when applying Datadog trace filters where traces can be kept/dropped based on tag literals and regexes. With the current design, applying a filter with a tag literal will work for either DD or OTel tag name (since the lookup is unified) but applying a tag regex will only work for the selected semantics. This could be potentially be solved by the filter providing a third state to EnumerateTags to check both tag names rather than an exclusive bool that currently exists.

Test coverage

  • tracer/test/Datadog.Trace.SourceGenerators.Tests/TagsListGeneratorTests.cs adds unit tests to cover the TagsListGenerator changes
  • tracer/test/Datadog.Trace.Tests/Tagging/TagsListTests.cs adds unit tests to demonstrate the changes by asserting WebTags.HttpStatusCode can be read/written through the property and the two tag keys http.status_code and http.response.status_code

Other details

N/A

@zacharycmontoya zacharycmontoya added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) area:opentelemetry OpenTelemetry support labels Jul 31, 2026
@zacharycmontoya
zacharycmontoya requested review from a team as code owners July 31, 2026 18:41
@zacharycmontoya
zacharycmontoya requested review from vandonr and removed request for a team July 31, 2026 18:41

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

Copy link
Copy Markdown

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: 0fe888ba1c

ℹ️ 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".

{
if (openTelemetrySemanticsEnabled)
{
processor.Process(new TagItem<string>(""otel.k"", Id, IdOTelBytes));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Align golden references with generated Otel field names

Whenever either new OTel-alias generator test runs, the generator emits fields such as IdOtelBytes, but this expected output references IdOTelBytes, so the golden comparison always fails. Running the filtered TagsListGeneratorTests produced the same casing failure on net6.0 through net10.0; make this reference and the equivalent nullable-int reference consistent with the generated field name.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fixed AFAICT

Comment on lines +141 to 142
var rawHttpStatusCode = span.GetHttpStatusCodeString();
if (!string.IsNullOrEmpty(rawHttpStatusCode) && !TraceUtil.IsValidStatusCode(span.GetHttpStatusCode()))

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 Clear the OTel status-code alias after rejecting it

When a span uses the default TagsList rather than an IHasStatusCode implementation and contains only an invalid http.response.status_code value, this new fallback detects that value, but the branch still clears only http.status_code. The invalid OTel attribute therefore remains on the span and is serialized despite normalization; clear the alias that matched, or clear both physical keys.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably makes sense to me?

…emantics) and a OTelName property on the TagAttribute.

This also updates the interface method  ITags.EnumerateTags<TProcessor>() and its consumers. Now, when a TagsList provides each tag as key-value pair, it will provide the TagName as the key if openTelemetrySemanticsEnabled==false, otherwise it will provide the OTelName as the key.

Notes:
- None of these changes apply to MetricAttribute
- This commit does _not_ update the generated tags implementations (that will be a follow-up commit
- This commit does not apply the OTelName to any tags objects
…and add unit tests to demonstrate that setting/unsetting tags with the strong-typing or either tag name works and the last edit overrides an existing backing value.

Affected tags classes are:
- AwsSdkTags
- HttpTags
- InferredProxyTags
- WebTags
- Add Tags.HttpResponseStatusCode to IsKnownWebTag to avoid carrying over a 'http.response.status_code' set on Activity in .NET 8+
- Implement the updated ITags interface in test class  Datadog.Trace.Security.Unit.Tests.IAST.TestTags
- Update OtlpTracesJsonSerializer and OtlpTracesProtobufSerializer so they do not have their own stateful openTelemetrySemanticsEnabled setting. Instead, always rely on the setting provided by the Span
- In product code and test code, unify on Span|MockSpan.GetHttpStatusCodeString() to return a string with either the tag contents of Tags.HttpStatusCode or Tags.HttpResponseStatusCode
- StatsTests: group.HttpStatusCode is an int, so keep comparing against GetHttpStatusCode() rather than the string-returning GetHttpStatusCodeString()
- TagsListGeneratorTests: fix OTelBytes/OtelBytes casing typo in expected generator output so it matches the generator's actual naming
Two Append calls used an escaped \n instead of an embedded literal
newline. Every other newline in this generator relies on git's
line-ending checkout normalization matching between Sources.cs and
the test's expected strings, so a hardcoded LF only diverges from the
checked-out CRLF on Windows, breaking CanGenerateTagsListWithOTelAlias
and CanGenerateTagsListWithOTelAliasForNullableIntTag there.
@pr-commenter

pr-commenter Bot commented Jul 31, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-31 21:21:05

Comparing candidate commit 9712b4a in PR branch otel-tag-name with baseline commit 1dbaad3 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 2 performance regressions! Performance is the same for 70 metrics, 0 unstable metrics, 67 known flaky benchmarks, 59 flaky benchmarks without significant changes.

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.DbCommandBenchmark.ExecuteNonQuery net472

  • 🟥 throughput [-40906.135op/s; -37077.589op/s] or [-11.521%; -10.443%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net472

  • 🟥 throughput [-5180.287op/s; -4820.074op/s] or [-5.914%; -5.502%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-8896.889op/s; -8177.162op/s] or [-10.549%; -9.696%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1

  • 🟥 throughput [-10673.249op/s; -9331.971op/s] or [-10.852%; -9.489%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+310.901ms; +319.031ms] or [+154.280%; +158.315%]
  • 🟥 throughput [-43.383op/s; -39.777op/s] or [-7.805%; -7.157%]

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

  • 🟥 execution_time [+378.373ms; +380.806ms] or [+298.938%; +300.860%]
  • 🟩 throughput [+93.030op/s; +97.139op/s] or [+12.266%; +12.807%]

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

  • 🟥 execution_time [+395.875ms; +399.829ms] or [+350.335%; +353.833%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net472

  • 🟥 allocated_mem [+4.693KB; +4.694KB] or [+98.806%; +98.821%]
  • 🟥 throughput [-61733.738op/s; -61066.609op/s] or [-48.032%; -47.513%]

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

  • 🟥 allocated_mem [+3.816KB; +3.816KB] or [+80.699%; +80.711%]
  • 🟩 execution_time [-15.574ms; -11.394ms] or [-7.274%; -5.321%]
  • 🟥 throughput [-59793.107op/s; -57020.924op/s] or [-43.646%; -41.622%]

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

  • 🟥 allocated_mem [+4.544KB; +4.544KB] or [+98.261%; +98.274%]
  • 🟥 throughput [-48522.649op/s; -46271.122op/s] or [-43.870%; -41.834%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net472

  • 🟥 allocated_mem [+1.315KB; +1.315KB] or [+106.388%; +106.404%]
  • 🟥 throughput [-271930.466op/s; -268406.327op/s] or [-27.765%; -27.406%]

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

  • 🟥 allocated_mem [+479 bytes; +480 bytes] or [+39.212%; +39.221%]
  • 🟩 execution_time [-25.520ms; -20.001ms] or [-11.381%; -8.920%]
  • 🟥 throughput [-83902.450op/s; -58888.019op/s] or [-8.963%; -6.291%]

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

  • 🟥 allocated_mem [+1.280KB; +1.280KB] or [+105.947%; +105.963%]
  • 🟥 throughput [-160359.430op/s; -144208.009op/s] or [-23.041%; -20.720%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472

  • 🟥 allocated_mem [+3.378KB; +3.378KB] or [+89.003%; +89.017%]
  • 🟥 throughput [-75116.442op/s; -73938.628op/s] or [-50.552%; -49.760%]

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

  • 🟥 allocated_mem [+3.336KB; +3.336KB] or [+88.150%; +88.161%]
  • 🟥 throughput [-73523.269op/s; -70641.472op/s] or [-46.782%; -44.948%]

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

  • 🟥 allocated_mem [+3.264KB; +3.264KB] or [+88.493%; +88.506%]
  • 🟥 throughput [-56213.996op/s; -53599.037op/s] or [-44.782%; -42.699%]

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

  • 🟩 throughput [+312375.469op/s; +336718.703op/s] or [+10.416%; +11.228%]

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

  • 🟩 execution_time [-18.727ms; -14.391ms] or [-8.633%; -6.634%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net472

  • 🟩 allocated_mem [-13.759KB; -13.756KB] or [-42.324%; -42.316%]
  • 🟥 execution_time [+300.326ms; +300.871ms] or [+150.063%; +150.335%]
  • 🟩 throughput [+1022.537op/s; +1038.504op/s] or [+11.294%; +11.470%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net6.0

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+300.417ms; +303.524ms] or [+151.501%; +153.068%]
  • 🟩 throughput [+2396.487op/s; +2606.221op/s] or [+18.330%; +19.934%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs netcoreapp3.1

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+300.588ms; +303.115ms] or [+151.413%; +152.686%]
  • 🟩 throughput [+1812.382op/s; +1940.252op/s] or [+17.498%; +18.732%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net472

  • 🟥 execution_time [+297.062ms; +298.169ms] or [+145.905%; +146.449%]
  • 🟩 throughput [+568.209op/s; +583.238op/s] or [+15.063%; +15.462%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0

  • 🟥 execution_time [+298.975ms; +300.425ms] or [+146.158%; +146.866%]
  • 🟩 throughput [+2730.266op/s; +2783.042op/s] or [+39.666%; +40.432%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1

  • 🟥 execution_time [+300.773ms; +301.867ms] or [+150.326%; +150.873%]
  • 🟩 throughput [+1404.130op/s; +1424.720op/s] or [+27.871%; +28.280%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472

  • 🟩 execution_time [-145.755µs; -141.613µs] or [-29.925%; -29.075%]
  • 🟩 throughput [+845.763op/s; +873.790op/s] or [+41.192%; +42.558%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0

  • 🟩 execution_time [-137.696µs; -111.075µs] or [-31.581%; -25.475%]
  • 🟩 throughput [+848.624op/s; +970.016op/s] or [+36.895%; +42.172%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1

  • 🟩 execution_time [-140.961µs; -118.967µs] or [-30.201%; -25.489%]
  • 🟩 throughput [+762.143op/s; +844.829op/s] or [+35.182%; +38.999%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472

  • 🟩 execution_time [-123.734µs; -119.338µs] or [-33.407%; -32.221%]
  • 🟩 throughput [+1294.485op/s; +1345.790op/s] or [+47.942%; +49.842%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net6.0

  • 🟩 execution_time [-103.841µs; -80.273µs] or [-33.151%; -25.627%]
  • 🟩 throughput [+1213.828op/s; +1414.318op/s] or [+37.839%; +44.088%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1

  • 🟩 execution_time [-137.478µs; -115.098µs] or [-37.608%; -31.486%]
  • 🟩 throughput [+1325.431op/s; +1461.908op/s] or [+47.564%; +52.462%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.308ms; +300.121ms] or [+149.385%; +149.791%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0

  • 🟥 execution_time [+420.122ms; +426.824ms] or [+456.479%; +463.762%]
  • 🟩 throughput [+720.724op/s; +925.782op/s] or [+5.922%; +7.607%]

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

  • 🟥 execution_time [+370.382ms; +374.187ms] or [+281.227%; +284.117%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+287.200ms; +321.483ms] or [+132.052%; +147.815%]
  • 🟥 throughput [-482.911op/s; -449.594op/s] or [-43.756%; -40.738%]

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

  • unstable execution_time [+206.687ms; +339.919ms] or [+88.081%; +144.859%]
  • 🟥 throughput [-671.704op/s; -588.076op/s] or [-44.803%; -39.225%]

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

  • 🟥 allocated_mem [+2.305KB; +2.308KB] or [+5.442%; +5.450%]
  • 🟥 execution_time [+344.225ms; +355.211ms] or [+205.887%; +212.458%]
  • 🟥 throughput [-395.056op/s; -358.590op/s] or [-27.507%; -24.968%]

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

  • unstable throughput [+15.708op/s; +60.527op/s] or [+4.515%; +17.398%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0

  • 🟩 execution_time [-61.260µs; -54.334µs] or [-5.682%; -5.039%]
  • 🟩 throughput [+49.430op/s; +55.767op/s] or [+5.330%; +6.013%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net6.0

  • 🟩 execution_time [-167.324µs; -124.586µs] or [-8.476%; -6.311%]
  • 🟩 throughput [+35.478op/s; +47.134op/s] or [+7.004%; +9.305%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+301.930ms; +304.106ms] or [+152.046%; +153.142%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net6.0

  • 🟥 execution_time [+301.120ms; +302.706ms] or [+150.892%; +151.686%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch netcoreapp3.1

  • 🟥 execution_time [+303.202ms; +307.125ms] or [+152.316%; +154.286%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+301.684ms; +302.932ms] or [+151.496%; +152.122%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net6.0

  • 🟥 execution_time [+294.612ms; +297.617ms] or [+145.672%; +147.158%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync netcoreapp3.1

  • 🟥 execution_time [+302.882ms; +306.404ms] or [+153.514%; +155.299%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+299.774ms; +301.348ms] or [+150.460%; +151.250%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net6.0

  • 🟥 execution_time [+296.875ms; +311.136ms] or [+147.965%; +155.073%]
  • 🟩 throughput [+32131.751op/s; +46016.007op/s] or [+6.380%; +9.137%]

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

  • 🟥 execution_time [+301.119ms; +304.532ms] or [+149.804%; +151.502%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472

  • unstable execution_time [+13.763µs; +59.704µs] or [+3.399%; +14.747%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net6.0

  • 🟩 allocated_mem [-20.527KB; -20.505KB] or [-7.488%; -7.480%]
  • unstable execution_time [-60.742µs; -5.379µs] or [-12.005%; -1.063%]

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

  • unstable execution_time [-52.526µs; +8.289µs] or [-9.102%; +1.436%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net6.0

  • unstable execution_time [+6.792µs; +11.747µs] or [+16.054%; +27.766%]
  • 🟥 throughput [-5101.525op/s; -3188.890op/s] or [-21.476%; -13.424%]

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

  • unstable execution_time [-13.501µs; -5.065µs] or [-20.946%; -7.858%]
  • unstable throughput [+1318.515op/s; +3147.444op/s] or [+8.090%; +19.311%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.392ms; +304.141ms] or [+152.846%; +153.730%]

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

  • 🟥 execution_time [+302.910ms; +305.123ms] or [+154.180%; +155.307%]

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

  • 🟥 execution_time [+301.128ms; +304.877ms] or [+150.752%; +152.628%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0

  • 🟩 throughput [+42889.946op/s; +46538.085op/s] or [+8.118%; +8.809%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+301.211ms; +303.623ms] or [+150.126%; +151.329%]

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

  • 🟥 execution_time [+301.680ms; +304.180ms] or [+151.489%; +152.745%]

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

  • 🟥 execution_time [+302.475ms; +304.978ms] or [+153.396%; +154.665%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.645ms; +300.716ms] or [+149.464%; +149.999%]
  • 🟩 throughput [+66104509.077op/s; +66465080.575op/s] or [+48.141%; +48.404%]

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

  • unstable execution_time [+322.509ms; +392.248ms] or [+401.097%; +487.830%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1

  • 🟥 execution_time [+300.041ms; +301.118ms] or [+149.654%; +150.191%]
  • 🟩 throughput [+18204106.455op/s; +19182032.928op/s] or [+8.063%; +8.496%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0

  • 🟩 throughput [+83355.904op/s; +95741.404op/s] or [+7.783%; +8.939%]

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

  • 🟩 throughput [+53613.546op/s; +72925.409op/s] or [+6.206%; +8.441%]

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

  • 🟩 throughput [+70443.356op/s; +79406.456op/s] or [+6.996%; +7.886%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net6.0

  • 🟩 throughput [+50803.175op/s; +56579.777op/s] or [+9.225%; +10.274%]

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

  • 🟩 throughput [+22414.710op/s; +32182.987op/s] or [+5.017%; +7.204%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0

  • 🟩 throughput [+57493.070op/s; +75884.426op/s] or [+6.423%; +8.478%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

@dd-trace-dotnet-ci-bot

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8971) 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
duration71.83 ± (71.79 - 72.13) ms72.93 ± (73.14 - 73.72) ms+1.5%✅⬆️
.NET Framework 4.8 - Bailout
duration80.27 ± (80.46 - 81.58) ms75.85 ± (75.72 - 76.06) ms-5.5%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1094.89 ± (1093.39 - 1099.55) ms1089.31 ± (1092.78 - 1101.24) ms-0.5%
.NET Core 3.1 - Baseline
process.internal_duration_ms22.40 ± (22.35 - 22.45) ms22.13 ± (22.09 - 22.18) ms-1.2%
process.time_to_main_ms84.76 ± (84.47 - 85.06) ms82.76 ± (82.46 - 83.05) ms-2.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed11.03 ± (11.03 - 11.04) MB11.02 ± (11.02 - 11.02) MB-0.1%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.33 ± (22.29 - 22.37) ms21.99 ± (21.96 - 22.02) ms-1.5%
process.time_to_main_ms85.28 ± (85.01 - 85.56) ms82.73 ± (82.55 - 82.90) ms-3.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed11.06 ± (11.06 - 11.07) MB11.05 ± (11.05 - 11.06) MB-0.1%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms210.28 ± (209.34 - 211.21) ms211.28 ± (210.47 - 212.08) ms+0.5%✅⬆️
process.time_to_main_ms538.93 ± (537.63 - 540.23) ms542.62 ± (541.29 - 543.94) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.64 ± (49.60 - 49.67) MB49.69 ± (49.67 - 49.72) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.2%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.25 ± (21.20 - 21.30) ms20.89 ± (20.86 - 20.92) ms-1.7%
process.time_to_main_ms74.78 ± (74.49 - 75.07) ms72.00 ± (71.77 - 72.23) ms-3.7%
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.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.82 ± (20.79 - 20.86) ms21.14 ± (21.09 - 21.19) ms+1.5%✅⬆️
process.time_to_main_ms72.52 ± (72.35 - 72.69) ms75.49 ± (75.24 - 75.73) ms+4.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.83 ± (10.83 - 10.84) MB10.86 ± (10.86 - 10.86) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms371.98 ± (369.86 - 374.09) ms369.96 ± (367.90 - 372.03) ms-0.5%
process.time_to_main_ms546.78 ± (545.59 - 547.96) ms544.75 ± (543.53 - 545.98) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.65 ± (50.63 - 50.68) MB50.67 ± (50.65 - 50.69) MB+0.0%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 8 - Baseline
process.internal_duration_ms19.21 ± (19.17 - 19.25) ms19.07 ± (19.04 - 19.10) ms-0.7%
process.time_to_main_ms71.47 ± (71.20 - 71.74) ms70.02 ± (69.89 - 70.15) ms-2.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.76 ± (7.76 - 7.76) MB7.80 ± (7.79 - 7.81) MB+0.6%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.44 ± (19.40 - 19.49) ms19.05 ± (19.02 - 19.09) ms-2.0%
process.time_to_main_ms74.88 ± (74.62 - 75.13) ms71.56 ± (71.42 - 71.70) ms-4.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.83 ± (7.82 - 7.84) MB7.83 ± (7.82 - 7.85) MB+0.0%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms296.66 ± (294.51 - 298.81) ms300.34 ± (297.94 - 302.74) ms+1.2%✅⬆️
process.time_to_main_ms492.46 ± (491.49 - 493.44) ms494.49 ± (493.39 - 495.60) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed38.07 ± (38.04 - 38.10) MB38.12 ± (38.09 - 38.15) MB+0.1%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.2%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration210.98 ± (210.61 - 211.56) ms207.62 ± (207.41 - 208.25) ms-1.6%
.NET Framework 4.8 - Bailout
duration214.99 ± (214.44 - 215.34) ms211.06 ± (210.54 - 211.27) ms-1.8%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1265.27 ± (1264.17 - 1271.43) ms1237.71 ± (1237.69 - 1243.73) ms-2.2%
.NET Core 3.1 - Baseline
process.internal_duration_ms203.57 ± (203.12 - 204.02) ms199.57 ± (199.16 - 199.99) ms-2.0%
process.time_to_main_ms89.89 ± (89.58 - 90.20) ms87.50 ± (87.16 - 87.84) ms-2.7%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.07 ± (16.05 - 16.09) MB16.19 ± (16.16 - 16.21) MB+0.7%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.1%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms202.98 ± (202.52 - 203.44) ms198.22 ± (197.82 - 198.63) ms-2.3%
process.time_to_main_ms91.51 ± (91.27 - 91.76) ms88.73 ± (88.50 - 88.97) ms-3.0%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.08 ± (16.06 - 16.09) MB16.26 ± (16.24 - 16.28) MB+1.2%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (20 - 21)-1.7%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms401.33 ± (399.93 - 402.73) ms395.28 ± (394.17 - 396.40) ms-1.5%
process.time_to_main_ms566.20 ± (565.03 - 567.37) ms557.69 ± (556.40 - 558.99) ms-1.5%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed59.80 ± (59.70 - 59.91) MB59.87 ± (59.74 - 59.99) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.1%
.NET 6 - Baseline
process.internal_duration_ms208.47 ± (208.06 - 208.87) ms204.51 ± (204.14 - 204.88) ms-1.9%
process.time_to_main_ms78.92 ± (78.61 - 79.23) ms76.77 ± (76.50 - 77.03) ms-2.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.46 ± (16.44 - 16.48) MB16.41 ± (16.39 - 16.43) MB-0.3%
runtime.dotnet.threads.count20 ± (19 - 20)19 ± (19 - 19)-1.5%
.NET 6 - Bailout
process.internal_duration_ms207.40 ± (206.88 - 207.93) ms204.24 ± (203.80 - 204.67) ms-1.5%
process.time_to_main_ms79.58 ± (79.36 - 79.80) ms77.92 ± (77.72 - 78.12) ms-2.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.48 ± (16.46 - 16.50) MB16.43 ± (16.41 - 16.45) MB-0.3%
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (20 - 21)-0.2%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms579.91 ± (577.66 - 582.17) ms578.57 ± (576.28 - 580.86) ms-0.2%
process.time_to_main_ms579.70 ± (578.49 - 580.91) ms569.58 ± (568.49 - 570.66) ms-1.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.61 ± (61.53 - 61.69) MB61.64 ± (61.57 - 61.71) MB+0.0%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)+0.4%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms209.30 ± (208.84 - 209.75) ms202.32 ± (201.93 - 202.71) ms-3.3%
process.time_to_main_ms78.75 ± (78.48 - 79.01) ms75.84 ± (75.53 - 76.15) ms-3.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.76 - 11.80) MB11.78 ± (11.75 - 11.80) MB-0.0%
runtime.dotnet.threads.count19 ± (19 - 19)18 ± (18 - 19)-3.1%
.NET 8 - Bailout
process.internal_duration_ms209.21 ± (208.71 - 209.70) ms201.48 ± (201.04 - 201.93) ms-3.7%
process.time_to_main_ms80.08 ± (79.86 - 80.29) ms76.63 ± (76.43 - 76.83) ms-4.3%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.83 ± (11.81 - 11.85) MB11.88 ± (11.85 - 11.90) MB+0.4%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-1.9%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms517.32 ± (511.82 - 522.81) ms510.58 ± (507.36 - 513.79) ms-1.3%
process.time_to_main_ms531.98 ± (531.07 - 532.89) ms521.02 ± (520.11 - 521.93) ms-2.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed51.36 ± (51.31 - 51.41) MB51.45 ± (51.41 - 51.49) MB+0.2%✅⬆️
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 (8971) - mean (73ms)  : 69, 78
    master - mean (72ms)  : 69, 75

    section Bailout
    This PR (8971) - mean (76ms)  : 74, 77
    master - mean (81ms)  : 73, 89

    section CallTarget+Inlining+NGEN
    This PR (8971) - mean (1,097ms)  : 1034, 1160
    master - mean (1,096ms)  : 1052, 1141

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 (8971) - mean (112ms)  : 106, 118
    master - mean (115ms)  : 108, 121

    section Bailout
    This PR (8971) - mean (111ms)  : 109, 113
    master - mean (115ms)  : 108, 122

    section CallTarget+Inlining+NGEN
    This PR (8971) - mean (791ms)  : 765, 818
    master - mean (785ms)  : 763, 807

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

    section Bailout
    This PR (8971) - mean (104ms)  : 99, 108
    master - mean (99ms)  : 96, 103

    section CallTarget+Inlining+NGEN
    This PR (8971) - mean (945ms)  : 901, 989
    master - mean (950ms)  : 901, 999

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8971) - mean (96ms)  : 93, 99
    master - mean (98ms)  : 92, 105

    section Bailout
    This PR (8971) - mean (97ms)  : 95, 99
    master - mean (102ms)  : 96, 108

    section CallTarget+Inlining+NGEN
    This PR (8971) - mean (827ms)  : 780, 874
    master - mean (822ms)  : 782, 862

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 (8971) - mean (208ms)  : 203, 212
    master - mean (211ms)  : 205, 217

    section Bailout
    This PR (8971) - mean (211ms)  : 208, 214
    master - mean (215ms)  : 211, 219

    section CallTarget+Inlining+NGEN
    This PR (8971) - mean (1,241ms)  : 1198, 1284
    master - mean (1,268ms)  : 1214, 1321

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 (8971) - mean (297ms)  : 290, 304
    master - mean (303ms)  : 294, 312

    section Bailout
    This PR (8971) - mean (297ms)  : 291, 303
    master - mean (305ms)  : 295, 315

    section CallTarget+Inlining+NGEN
    This PR (8971) - mean (996ms)  : 972, 1019
    master - mean (1,009ms)  : 984, 1035

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8971) - mean (290ms)  : 284, 296
    master - mean (298ms)  : 291, 305

    section Bailout
    This PR (8971) - mean (291ms)  : 284, 298
    master - mean (297ms)  : 291, 303

    section CallTarget+Inlining+NGEN
    This PR (8971) - mean (1,189ms)  : 1142, 1235
    master - mean (1,200ms)  : 1160, 1239

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8971) - mean (289ms)  : 281, 296
    master - mean (300ms)  : 294, 306

    section Bailout
    This PR (8971) - mean (289ms)  : 283, 295
    master - mean (301ms)  : 293, 308

    section CallTarget+Inlining+NGEN
    This PR (8971) - mean (1,064ms)  : 1016, 1112
    master - mean (1,094ms)  : 989, 1199

Loading

@andrewlock andrewlock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, just a couple of minor questions/clarifications

@@ -32,6 +32,11 @@ public TagAttribute(string tagName) =>
/// Gets the name of the datadog tag the property corresponds to

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In the case where a tag is only used by Otel, we'd still set TagName. I'm wondering if it will confuse anyone 🤔 Maybe we could/should call it out explicitly in doc comments for TagName? WDYT?

private static ReadOnlySpan<byte> HttpStatusCodeBytes => [176, 104, 116, 116, 112, 46, 115, 116, 97, 116, 117, 115, 95, 99, 111, 100, 101];

// HttpStatusCodeOTelBytes = MessagePack.Serialize("http.response.status_code");
private static ReadOnlySpan<byte> HttpStatusCodeOTelBytes => [185, 104, 116, 116, 112, 46, 114, 101, 115, 112, 111, 110, 115, 101, 46, 115, 116, 97, 116, 117, 115, 95, 99, 111, 100, 101];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thinking out loud: Seeing as these all map to the same seqeuence of bytes I assume the compiler only embeds them in the assembly once, and maps everything to the same sequence, but maybe we should check?

Comment on lines 75 to +76
"http.status_code" => HttpStatusCode is null ? null : Datadog.Trace.Util.IntStringCache.ToInvariantString(HttpStatusCode.Value),
"http.response.status_code" => HttpStatusCode is null ? null : Datadog.Trace.Util.IntStringCache.ToInvariantString(HttpStatusCode.Value),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we keep this like this, or change it to be the more compact/less duplicatey version?

Suggested change
"http.status_code" => HttpStatusCode is null ? null : Datadog.Trace.Util.IntStringCache.ToInvariantString(HttpStatusCode.Value),
"http.response.status_code" => HttpStatusCode is null ? null : Datadog.Trace.Util.IntStringCache.ToInvariantString(HttpStatusCode.Value),
"http.status_code" or "http.response.status_code" => HttpStatusCode is null ? null : Datadog.Trace.Util.IntStringCache.ToInvariantString(HttpStatusCode.Value),

}
}

internal static string GetHttpStatusCodeString(this Span span)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this be called by production code, or is it just for testing? If the latter, add the attribute to guard access

Suggested change
internal static string GetHttpStatusCodeString(this Span span)
[TestingAndPrivateOnly]
internal static string GetHttpStatusCodeString(this Span span)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like it's called by NormalizeTraceProcessor, so I guess it is meant to be called. Makes me wonder if we could/should try to refactor the trace processor, but I'm not sure, and meh 😅

/// Note: When a tag has both a DD and OTel name and is strongly typed in our ITags implementations,
/// there are two diverging behaviors:
/// - When applying a filter tag, the search checks both DD and OTel tag keys (and the singular tag value)
/// - When applying a filter tag regex, the search only checks one tag key (DD or Otel) based on the span's configured semantics setting.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We could tweak that, so that it applies to both cases, at the expense of an additional enumeration for every span, regardless of the setting. Given the performance impact for everyone, and the generally low usage, I think the current approach makes total sense, even though it is potentially a bit confusing.

{
if (openTelemetrySemanticsEnabled)
{
processor.Process(new TagItem<string>(""otel.k"", Id, IdOTelBytes));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fixed AFAICT

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.

2 participants