Skip to content

feat(tracer): Update the TagsList infrastructure to store int properties on ITags implementations - #8941

Merged
zacharycmontoya merged 12 commits into
masterfrom
rfc-impl-httpstatuscodetag
Aug 3, 2026
Merged

feat(tracer): Update the TagsList infrastructure to store int properties on ITags implementations#8941
zacharycmontoya merged 12 commits into
masterfrom
rfc-impl-httpstatuscodetag

Conversation

@zacharycmontoya

@zacharycmontoya zacharycmontoya commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

Updates the TagsListGenerator and code analyzers to allow ITags implementations to specify a TagAttribute with a int property, in addition to the existing string property support. This allows us to maintain the original int primitive so in the future we can emit int primitives in our tracing protocols, such as OTLP.

To ensure that all of the code generation and serialization are implemented correctly, this PR also migrates the http.status_code tag to this new feature.

Reason for change

We want to support emitting spans that align with OpenTelemetry semantic conventions. Since span attributes may be specified as integers in the OpenTelemetry spec, we need a mechanism for storing and emitting integers tags. This mechanism allows our internal integrations to do that by storing a backing int? property for those concepts so they can be emitted as integers when emitting OTLP.

Implementation details

TagsListGenerator changes

int? properties are now supported with the following details:

  • The generated GetTag(string key) now calls value?.ToString(System.Globalization.CultureInfo.InvariantCulture) for int properties
  • The generated SetTag(string key) now calls int.TryParse(value, System.Globalization.NumberStyles.Integer, System.Globalization.CultureInfo.InvariantCulture, out var intValue) to convert the input string for int properties. If the conversion fails or the input was null, the tag is unset
  • The generated EnumerateTags<TProcessor>(ref TProcessor processor) now emits the key-value pair as a TagItem<int> so consumers can customize how they handle integer tags

ITags changes

  • Updates ITags.EnumerateTags<TProcessor>(ref TProcessor processor) to require TProcessor arguments to implement IItemProcessor<int>. Affected classes include
    • SpanMessagePackFormatter.TagWriter
    • OtlpMapper.TagWriter
    • TraceFilter.RegexTagFilterProcessor
    • TruncatorTagsProcessor

HTTP status code updates

  • Updates the IHasStatusCode interface to require a int? HttpStatusCode property
  • Updates the HttpStatusCode properties to type int? for the following classes:
    • AwsSdkTags
    • HttpTags
    • InferredProxyTags
    • WebTags
  • Replaces calls to Span.GetTag(Tags.HttpStatusCode) with a call to a new extension method Span.GetHttpStatusCode() that directly returns an int?. This affects stats aggregators (which build stats aggregation keys), the NormalizerTraceProcessor (only runs during client-side stats to validate status code tags) and API Security.
  • Adds in-line code comments for integration tests that directly assert against Tags.HttpStatusCode (i.e. "http.status_code") so we do not lose track of them when introducing HTTP semantics

Test coverage

To test the code generator, unit tests have been added TagsListGeneratorTests.cs.

The existing HTTP and OpenTelemetry SDK integration tests will exercise the updated TagsList implementation by emitting the same tracing data over DD MsgPack and OTLP as before.

Other details

N/A

…Nullable<int> type, in addition to string type.

This also includes updating classes that implement IItemProcessor<string> to also implement IItemProcessor<int>. Various types include SpanMessagePackFormatter.TagWriter classes, OtlpMapper.TagWriter, TruncatorTagsProcessor, and TraceFilter
…on methods:

- int? GetHttpStatusCode
- string GetRawHttpStatusCodeString
@zacharycmontoya zacharycmontoya added the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label Jul 24, 2026
@zacharycmontoya
zacharycmontoya requested review from a team as code owners July 24, 2026 23:46
@zacharycmontoya
zacharycmontoya requested review from vandonr and removed request for a team July 24, 2026 23:46

@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: 9e5a63d155

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

Comment thread tracer/test/Datadog.Trace.SourceGenerators.Tests/TagsListGeneratorTests.cs Outdated
@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Jul 25, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8941) 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) ms74.05 ± (73.86 - 74.47) ms+3.1%✅⬆️
.NET Framework 4.8 - Bailout
duration80.27 ± (80.46 - 81.58) ms76.30 ± (76.23 - 76.55) ms-4.9%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1094.89 ± (1093.39 - 1099.55) ms1098.54 ± (1095.26 - 1102.74) ms+0.3%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.40 ± (22.35 - 22.45) ms22.31 ± (22.26 - 22.35) ms-0.4%
process.time_to_main_ms84.76 ± (84.47 - 85.06) ms83.37 ± (83.09 - 83.65) ms-1.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed11.03 ± (11.03 - 11.04) MB11.00 ± (11.00 - 11.01) MB-0.3%
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) ms22.08 ± (22.04 - 22.11) ms-1.1%
process.time_to_main_ms85.28 ± (85.01 - 85.56) ms83.00 ± (82.82 - 83.17) ms-2.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed11.06 ± (11.06 - 11.07) MB11.05 ± (11.04 - 11.05) 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.23 ± (210.28 - 212.17) ms+0.5%✅⬆️
process.time_to_main_ms538.93 ± (537.63 - 540.23) ms542.11 ± (540.89 - 543.32) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.64 ± (49.60 - 49.67) MB49.50 ± (49.46 - 49.54) MB-0.3%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.1%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.25 ± (21.20 - 21.30) ms20.95 ± (20.90 - 20.99) ms-1.4%
process.time_to_main_ms74.78 ± (74.49 - 75.07) ms71.69 ± (71.48 - 71.90) ms-4.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.72 ± (10.72 - 10.73) MB10.73 ± (10.73 - 10.73) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.82 ± (20.79 - 20.86) ms20.88 ± (20.85 - 20.92) ms+0.3%✅⬆️
process.time_to_main_ms72.52 ± (72.35 - 72.69) ms73.25 ± (73.07 - 73.44) ms+1.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.83 ± (10.83 - 10.84) MB10.84 ± (10.84 - 10.84) MB+0.1%✅⬆️
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) ms370.84 ± (368.60 - 373.08) ms-0.3%
process.time_to_main_ms546.78 ± (545.59 - 547.96) ms546.96 ± (545.83 - 548.10) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.65 ± (50.63 - 50.68) MB50.62 ± (50.60 - 50.64) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.21 ± (19.17 - 19.25) ms19.47 ± (19.42 - 19.51) ms+1.3%✅⬆️
process.time_to_main_ms71.47 ± (71.20 - 71.74) ms73.41 ± (73.15 - 73.67) ms+2.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.76 ± (7.76 - 7.76) MB7.79 ± (7.78 - 7.80) MB+0.4%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.44 ± (19.40 - 19.49) ms19.19 ± (19.17 - 19.22) ms-1.3%
process.time_to_main_ms74.88 ± (74.62 - 75.13) ms72.09 ± (71.94 - 72.23) ms-3.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.83 ± (7.82 - 7.84) MB7.84 ± (7.83 - 7.85) MB+0.1%✅⬆️
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) ms297.88 ± (295.78 - 299.98) ms+0.4%✅⬆️
process.time_to_main_ms492.46 ± (491.49 - 493.44) ms496.75 ± (495.64 - 497.87) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed38.07 ± (38.04 - 38.10) MB38.08 ± (38.05 - 38.10) MB+0.0%✅⬆️
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
duration210.98 ± (210.61 - 211.56) ms211.03 ± (211.05 - 212.01) ms+0.0%✅⬆️
.NET Framework 4.8 - Bailout
duration214.99 ± (214.44 - 215.34) ms216.31 ± (215.83 - 216.72) ms+0.6%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1265.27 ± (1264.17 - 1271.43) ms1269.03 ± (1267.76 - 1274.09) ms+0.3%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms203.57 ± (203.12 - 204.02) ms203.93 ± (203.44 - 204.42) ms+0.2%✅⬆️
process.time_to_main_ms89.89 ± (89.58 - 90.20) ms90.20 ± (89.86 - 90.53) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.07 ± (16.05 - 16.09) MB16.11 ± (16.09 - 16.13) MB+0.3%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.2%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms202.98 ± (202.52 - 203.44) ms204.45 ± (204.00 - 204.90) ms+0.7%✅⬆️
process.time_to_main_ms91.51 ± (91.27 - 91.76) ms92.00 ± (91.73 - 92.27) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.08 ± (16.06 - 16.09) MB16.13 ± (16.11 - 16.16) MB+0.3%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.4%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms401.33 ± (399.93 - 402.73) ms401.75 ± (400.48 - 403.02) ms+0.1%✅⬆️
process.time_to_main_ms566.20 ± (565.03 - 567.37) ms567.18 ± (565.95 - 568.40) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed59.80 ± (59.70 - 59.91) MB59.86 ± (59.81 - 59.92) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.3%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms208.47 ± (208.06 - 208.87) ms207.13 ± (206.70 - 207.56) ms-0.6%
process.time_to_main_ms78.92 ± (78.61 - 79.23) ms78.00 ± (77.75 - 78.26) ms-1.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.46 ± (16.44 - 16.48) MB16.45 ± (16.43 - 16.47) MB-0.1%
runtime.dotnet.threads.count20 ± (19 - 20)19 ± (19 - 20)-0.1%
.NET 6 - Bailout
process.internal_duration_ms207.40 ± (206.88 - 207.93) ms207.63 ± (207.17 - 208.08) ms+0.1%✅⬆️
process.time_to_main_ms79.58 ± (79.36 - 79.80) ms79.80 ± (79.56 - 80.05) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.48 ± (16.46 - 16.50) MB16.51 ± (16.49 - 16.53) MB+0.2%✅⬆️
runtime.dotnet.threads.count21 ± (20 - 21)20 ± (20 - 21)-0.3%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms579.91 ± (577.66 - 582.17) ms579.14 ± (576.98 - 581.29) ms-0.1%
process.time_to_main_ms579.70 ± (578.49 - 580.91) ms580.04 ± (578.59 - 581.49) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.61 ± (61.53 - 61.69) MB61.43 ± (61.36 - 61.50) MB-0.3%
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.5%
.NET 8 - Baseline
process.internal_duration_ms209.30 ± (208.84 - 209.75) ms208.39 ± (207.86 - 208.91) ms-0.4%
process.time_to_main_ms78.75 ± (78.48 - 79.01) ms78.08 ± (77.77 - 78.39) ms-0.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.76 - 11.80) MB11.72 ± (11.69 - 11.74) MB-0.6%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.6%
.NET 8 - Bailout
process.internal_duration_ms209.21 ± (208.71 - 209.70) ms208.51 ± (208.03 - 208.98) ms-0.3%
process.time_to_main_ms80.08 ± (79.86 - 80.29) ms80.11 ± (79.85 - 80.38) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.83 ± (11.81 - 11.85) MB11.79 ± (11.77 - 11.82) MB-0.3%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.2%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms517.32 ± (511.82 - 522.81) ms514.00 ± (510.01 - 517.99) ms-0.6%
process.time_to_main_ms531.98 ± (531.07 - 532.89) ms531.15 ± (530.11 - 532.19) ms-0.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed51.36 ± (51.31 - 51.41) MB51.37 ± (51.33 - 51.42) MB+0.0%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.2%
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 (8941) - mean (74ms)  : 69, 79
    master - mean (72ms)  : 69, 75

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

    section CallTarget+Inlining+NGEN
    This PR (8941) - mean (1,099ms)  : 1046, 1152
    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 (8941) - mean (113ms)  : 106, 120
    master - mean (115ms)  : 108, 121

    section Bailout
    This PR (8941) - mean (112ms)  : 109, 114
    master - mean (115ms)  : 108, 122

    section CallTarget+Inlining+NGEN
    This PR (8941) - mean (792ms)  : 771, 813
    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 (8941) - mean (99ms)  : 94, 104
    master - mean (103ms)  : 97, 109

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

    section CallTarget+Inlining+NGEN
    This PR (8941) - mean (955ms)  : 915, 994
    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 (8941) - mean (100ms)  : 95, 106
    master - mean (98ms)  : 92, 105

    section Bailout
    This PR (8941) - mean (98ms)  : 96, 100
    master - mean (102ms)  : 96, 108

    section CallTarget+Inlining+NGEN
    This PR (8941) - mean (828ms)  : 788, 868
    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 (8941) - mean (212ms)  : 205, 218
    master - mean (211ms)  : 205, 217

    section Bailout
    This PR (8941) - mean (216ms)  : 212, 220
    master - mean (215ms)  : 211, 219

    section CallTarget+Inlining+NGEN
    This PR (8941) - mean (1,271ms)  : 1225, 1316
    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 (8941) - mean (304ms)  : 295, 313
    master - mean (303ms)  : 294, 312

    section Bailout
    This PR (8941) - mean (307ms)  : 300, 313
    master - mean (305ms)  : 295, 315

    section CallTarget+Inlining+NGEN
    This PR (8941) - mean (1,012ms)  : 983, 1041
    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 (8941) - mean (295ms)  : 289, 302
    master - mean (298ms)  : 291, 305

    section Bailout
    This PR (8941) - mean (297ms)  : 292, 303
    master - mean (297ms)  : 291, 303

    section CallTarget+Inlining+NGEN
    This PR (8941) - mean (1,196ms)  : 1167, 1225
    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 (8941) - mean (298ms)  : 292, 304
    master - mean (300ms)  : 294, 306

    section Bailout
    This PR (8941) - mean (299ms)  : 291, 307
    master - mean (301ms)  : 293, 308

    section CallTarget+Inlining+NGEN
    This PR (8941) - mean (1,080ms)  : 1023, 1137
    master - mean (1,094ms)  : 989, 1199

Loading

@pr-commenter

pr-commenter Bot commented Jul 25, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-31 18:09:10

Comparing candidate commit bb1a249 in PR branch rfc-impl-httpstatuscodetag with baseline commit 1dbaad3 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 1 performance regressions! Performance is the same for 71 metrics, 0 unstable metrics, 66 known flaky benchmarks, 60 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 [-26364.964op/s; -23482.070op/s] or [-7.426%; -6.614%]

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 [-8961.387op/s; -8268.130op/s] or [-10.626%; -9.804%]

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

  • 🟥 throughput [-10999.804op/s; -9780.607op/s] or [-11.184%; -9.945%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+298.492ms; +299.924ms] or [+148.122%; +148.833%]
  • 🟥 throughput [-46.318op/s; -42.766op/s] or [-8.334%; -7.694%]

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

  • 🟥 execution_time [+377.210ms; +378.570ms] or [+298.019%; +299.094%]
  • 🟩 throughput [+96.734op/s; +99.102op/s] or [+12.754%; +13.066%]

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

  • 🟥 execution_time [+395.641ms; +398.809ms] or [+350.128%; +352.931%]

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

  • 🟥 allocated_mem [+4.692KB; +4.693KB] or [+98.785%; +98.801%]
  • 🟥 throughput [-60788.029op/s; -60423.023op/s] or [-47.296%; -47.012%]

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

  • 🟥 allocated_mem [+3.816KB; +3.816KB] or [+80.699%; +80.711%]
  • 🟩 execution_time [-15.617ms; -11.414ms] or [-7.294%; -5.331%]
  • 🟥 throughput [-60049.243op/s; -57287.839op/s] or [-43.833%; -41.817%]

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

  • 🟥 allocated_mem [+4.544KB; +4.544KB] or [+98.261%; +98.274%]
  • 🟩 execution_time [-16.686ms; -10.633ms] or [-7.946%; -5.063%]
  • 🟥 throughput [-48813.240op/s; -46540.596op/s] or [-44.133%; -42.078%]

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

  • 🟥 allocated_mem [+1.315KB; +1.315KB] or [+106.388%; +106.404%]
  • 🟥 throughput [-285393.057op/s; -279426.328op/s] or [-29.140%; -28.531%]

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

  • 🟥 allocated_mem [+479 bytes; +480 bytes] or [+39.212%; +39.221%]
  • 🟩 execution_time [-26.523ms; -21.652ms] or [-11.828%; -9.656%]
  • 🟥 throughput [-75622.655op/s; -52260.573op/s] or [-8.079%; -5.583%]

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

  • 🟥 allocated_mem [+1.280KB; +1.280KB] or [+105.947%; +105.963%]
  • 🟥 throughput [-161495.238op/s; -145200.883op/s] or [-23.204%; -20.863%]

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

  • 🟥 allocated_mem [+3.378KB; +3.378KB] or [+89.003%; +89.017%]
  • 🟥 throughput [-73187.234op/s; -72417.169op/s] or [-49.254%; -48.736%]

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

  • 🟥 allocated_mem [+3.336KB; +3.336KB] or [+88.150%; +88.161%]
  • 🟥 throughput [-74159.309op/s; -71276.265op/s] or [-47.186%; -45.352%]

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

  • 🟥 allocated_mem [+3.264KB; +3.264KB] or [+88.493%; +88.506%]
  • 🟥 throughput [-56353.359op/s; -53728.183op/s] or [-44.893%; -42.801%]

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

  • 🟩 throughput [+285273.444op/s; +302759.030op/s] or [+9.512%; +10.095%]

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

  • 🟩 execution_time [-18.728ms; -14.353ms] or [-8.633%; -6.616%]

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

  • 🟩 allocated_mem [-13.759KB; -13.757KB] or [-42.326%; -42.318%]
  • 🟥 execution_time [+299.646ms; +300.252ms] or [+149.723%; +150.026%]
  • 🟩 throughput [+1001.631op/s; +1021.581op/s] or [+11.063%; +11.283%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+300.218ms; +303.316ms] or [+151.400%; +152.963%]
  • 🟩 throughput [+2319.602op/s; +2529.346op/s] or [+17.741%; +19.346%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+300.130ms; +302.671ms] or [+151.182%; +152.462%]
  • 🟩 throughput [+1766.360op/s; +1893.072op/s] or [+17.053%; +18.277%]

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

  • 🟥 execution_time [+297.536ms; +298.907ms] or [+146.138%; +146.811%]
  • 🟩 throughput [+558.283op/s; +570.008op/s] or [+14.800%; +15.111%]

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

  • 🟥 execution_time [+297.015ms; +298.567ms] or [+145.200%; +145.958%]
  • 🟩 throughput [+2724.027op/s; +2773.592op/s] or [+39.575%; +40.295%]

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

  • 🟥 execution_time [+300.526ms; +301.242ms] or [+150.203%; +150.561%]
  • 🟩 throughput [+1390.961op/s; +1410.696op/s] or [+27.609%; +28.001%]

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

  • 🟩 execution_time [-145.887µs; -141.657µs] or [-29.953%; -29.084%]
  • 🟩 throughput [+846.180op/s; +874.973op/s] or [+41.213%; +42.615%]

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

  • 🟩 execution_time [-135.206µs; -108.525µs] or [-31.010%; -24.890%]
  • 🟩 throughput [+822.620op/s; +945.130op/s] or [+35.764%; +41.091%]

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

  • 🟩 execution_time [-138.867µs; -116.693µs] or [-29.753%; -25.002%]
  • 🟩 throughput [+741.999op/s; +827.946op/s] or [+34.252%; +38.220%]

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

  • 🟩 execution_time [-127.372µs; -123.088µs] or [-34.389%; -33.233%]
  • 🟩 throughput [+1355.392op/s; +1405.761op/s] or [+50.197%; +52.063%]

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

  • 🟩 execution_time [-100.392µs; -76.755µs] or [-32.050%; -24.504%]
  • 🟩 throughput [+1143.134op/s; +1346.513op/s] or [+35.635%; +41.975%]

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

  • 🟩 execution_time [-134.385µs; -111.959µs] or [-36.762%; -30.628%]
  • 🟩 throughput [+1271.150op/s; +1409.595op/s] or [+45.617%; +50.585%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.927ms; +300.753ms] or [+149.694%; +150.106%]

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

  • unstable execution_time [+418.639ms; +429.582ms] or [+454.868%; +466.759%]
  • 🟩 throughput [+625.520op/s; +806.819op/s] or [+5.140%; +6.630%]

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

  • 🟥 execution_time [+370.754ms; +376.323ms] or [+281.510%; +285.739%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+218.281ms; +263.394ms] or [+100.364%; +121.106%]
  • 🟥 throughput [-562.149op/s; -502.993op/s] or [-50.936%; -45.576%]

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

  • unstable execution_time [+208.911ms; +342.125ms] or [+89.029%; +145.799%]
  • 🟥 throughput [-675.506op/s; -591.876op/s] or [-45.056%; -39.478%]

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

  • 🟥 execution_time [+325.457ms; +337.116ms] or [+194.661%; +201.635%]
  • 🟥 throughput [-381.472op/s; -346.455op/s] or [-26.561%; -24.123%]

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

  • 🟩 execution_time [-487.189µs; -220.679µs] or [-16.949%; -7.677%]
  • unstable throughput [+39.604op/s; +96.197op/s] or [+11.384%; +27.652%]

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

  • 🟩 throughput [+28.825op/s; +47.097op/s] or [+5.690%; +9.297%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+301.270ms; +302.573ms] or [+151.714%; +152.370%]

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

  • 🟥 execution_time [+301.552ms; +303.990ms] or [+151.108%; +152.330%]

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

  • 🟥 execution_time [+300.910ms; +304.060ms] or [+151.164%; +152.747%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+302.214ms; +304.379ms] or [+151.762%; +152.849%]

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

  • 🟥 execution_time [+299.332ms; +301.159ms] or [+148.006%; +148.910%]

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

  • 🟥 execution_time [+301.912ms; +306.286ms] or [+153.022%; +155.239%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+300.396ms; +302.813ms] or [+150.772%; +151.985%]

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

  • 🟥 execution_time [+297.307ms; +300.189ms] or [+148.180%; +149.617%]
  • 🟩 throughput [+47388.087op/s; +51746.049op/s] or [+9.410%; +10.275%]

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

  • 🟥 execution_time [+300.873ms; +303.580ms] or [+149.681%; +151.028%]

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

  • 🟩 execution_time [-16.758ms; -13.113ms] or [-7.793%; -6.097%]
  • 🟩 throughput [+25692.667op/s; +32953.518op/s] or [+7.048%; +9.040%]

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

  • unstable execution_time [+17.643µs; +60.308µs] or [+4.358%; +14.897%]

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

  • 🟩 allocated_mem [-18.659KB; -18.633KB] or [-6.806%; -6.797%]
  • unstable execution_time [-22.224µs; +34.727µs] or [-4.392%; +6.864%]

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

  • 🟩 allocated_mem [-25.836KB; -25.818KB] or [-9.418%; -9.412%]
  • unstable execution_time [-49.091µs; +15.086µs] or [-8.507%; +2.614%]
  • unstable throughput [-29.082op/s; +148.688op/s] or [-1.661%; +8.495%]

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

  • unstable execution_time [+10.896µs; +16.775µs] or [+25.755%; +39.650%]
  • 🟥 throughput [-6635.511op/s; -4510.882op/s] or [-27.933%; -18.989%]

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

  • unstable execution_time [-14.975µs; -7.463µs] or [-23.233%; -11.579%]
  • unstable throughput [+1897.946op/s; +3552.334op/s] or [+11.645%; +21.795%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.301ms; +303.604ms] or [+152.800%; +153.458%]

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

  • 🟥 execution_time [+302.685ms; +305.099ms] or [+154.066%; +155.294%]

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

  • 🟥 execution_time [+298.627ms; +301.251ms] or [+149.499%; +150.813%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472

  • 🟥 throughput [-20823.638op/s; -18740.607op/s] or [-5.765%; -5.188%]

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

  • 🟩 throughput [+45041.179op/s; +49667.140op/s] or [+8.525%; +9.401%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+297.656ms; +299.455ms] or [+148.355%; +149.251%]

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

  • 🟥 execution_time [+298.622ms; +300.959ms] or [+149.954%; +151.127%]

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

  • 🟥 execution_time [+306.389ms; +309.096ms] or [+155.381%; +156.754%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.579ms; +300.476ms] or [+149.431%; +149.879%]
  • 🟩 throughput [+61159312.480op/s; +61555330.034op/s] or [+44.540%; +44.828%]

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

  • unstable execution_time [+322.516ms; +393.818ms] or [+401.106%; +489.783%]

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

  • 🟥 execution_time [+299.313ms; +300.396ms] or [+149.290%; +149.830%]

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

  • 🟩 throughput [+80256.805op/s; +93537.301op/s] or [+7.493%; +8.733%]

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

  • 🟩 throughput [+76209.595op/s; +84614.518op/s] or [+7.569%; +8.404%]

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

  • 🟩 throughput [+40671.683op/s; +49830.372op/s] or [+7.385%; +9.048%]

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

  • 🟩 throughput [+23312.598op/s; +33322.478op/s] or [+5.218%; +7.459%]

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 net6.0
  • 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 netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1
  • 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 net6.0
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

@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.

Looking good to me - a couple of minor questions etc and the AI flagged a couple of genuine bugs I think, but otherwise LGTM

{
if (item.SerializedKey.IsEmpty)
{
_formatter.WriteTag(ref Bytes, ref Offset, item.Key, item.Value.ToString(System.Globalization.CultureInfo.InvariantCulture), _tagProcessors);

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.

I wonder if there's a more efficient API we could use here to avoid the extra ToString() 🤔 Not a problem if not or if it's too much hassle, just wondering out loud

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

See 7754485 for a Datadog.Trace.Util.IntStringCache solution

@andrewlock andrewlock Jul 31, 2026

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.

Ah, interesting, I was thinking of an API that wrote the int directly to bytes instead of going through the intermediate string 🤔 I'm pretty sure .NET (at least newer versions) already has something similar for small (<10) ints baked into the runtime. Seems reasonable to me, though I guess it could well be a case of premature optimization on our part 🤷‍♂️

Comment thread tracer/src/Datadog.Trace/Agent/TraceSamplers/TraceFilter.cs Outdated
Comment thread tracer/src/Datadog.Trace/ExtensionMethods/SpanExtensions.cs Outdated
Comment thread tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/HttpMessageHandlerTests.cs Outdated
Comment thread tracer/test/Datadog.Trace.SourceGenerators.Tests/TagsListGeneratorTests.cs Outdated
…Code tag retrieval, similar to SpanExtensions.GetHttpStatusCode
…resentation of tags backed by int values.

This change affects:
- SpanMessagePackFormatter serializing an int value
- TraceFilter applying to an int value
- Setting a status code as a string tag in SpanExtensions.SetHttpStatusCode
- The SetTag(string key) implementation emitted by the TagsListGenerator

@bouwkast bouwkast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM just a question on how it works with a manual span (assuming someone sets the status code tag)

Which I think was discussed but I forget 😅

Comment thread tracer/src/Datadog.Trace/OpenTelemetry/OtlpMapper.cs
@zacharycmontoya
zacharycmontoya merged commit 49b6f91 into master Aug 3, 2026
140 checks passed
@zacharycmontoya
zacharycmontoya deleted the rfc-impl-httpstatuscodetag branch August 3, 2026 17:53
@github-actions github-actions Bot added this to the vNext-v3 milestone Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

5 participants