Skip to content

Refactor GraphQL error response building and add pre-emptive truncation#8647

Merged
andrewlock merged 6 commits into
masterfrom
andrew/graphql-limit
Jul 1, 2026
Merged

Refactor GraphQL error response building and add pre-emptive truncation#8647
andrewlock merged 6 commits into
masterfrom
andrew/graphql-limit

Conversation

@andrewlock

@andrewlock andrewlock commented May 15, 2026

Copy link
Copy Markdown
Member

Summary of changes

  • Reduce allocations by avoiding string interpolation when using StringBuilder
  • Use const instead of parameter to reduce allocations on concat
  • Bail out of building error tag if it gets too large

Reason for change

Technically the building of the error tag could become very large. This PR bails out of building the error response if it gets too large. The bail out is not super strict, as this is on a hot path, we just stop adding errors etc if the value exceeds the truncation threshold (25k chars, so pretty unlikely).

While I was in there, I noticed a bunch of places we were not using constants where we could have been, and places where we were using interpolation, which allocates a string, before adding the result to a StringBuilder, so cleaned that up at the same time.

Implementation details

  • Make Tab a constant on the common base, so we don't have to pass it to functions as a variable, meaning we have compile-time constants added to the builder.
  • Remove interpolation for any non-constant strings
  • Fix invalid trailing comma in the JSON
  • Add checks at various points for exceeding tag truncation limit. Checks are quick and rough
  • If we do exceed the count, only create a string of the final correct size, as it would be truncated in the agent/backend anyway

Test coverage

Add a couple of simple checks for the basic truncation.

https://datadoghq.atlassian.net/browse/APMSP-3519

@andrewlock andrewlock added the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label May 15, 2026
@andrewlock
andrewlock requested review from a team as code owners May 15, 2026 11:27
@andrewlock andrewlock added type:performance Performance, speed, latency, resource usage (CPU, memory) type:reliability identified-by:ai labels May 15, 2026

@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: 7444a8bcae

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

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented May 15, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8647) 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
duration73.32 ± (73.46 - 73.95) ms72.10 ± (72.25 - 72.63) ms-1.7%
.NET Framework 4.8 - Bailout
duration77.70 ± (77.62 - 77.96) ms78.12 ± (78.05 - 78.49) ms+0.5%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1088.22 ± (1089.31 - 1095.38) ms1091.13 ± (1091.64 - 1097.22) ms+0.3%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.49 ± (22.45 - 22.53) ms22.59 ± (22.54 - 22.64) ms+0.5%✅⬆️
process.time_to_main_ms83.70 ± (83.48 - 83.92) ms84.79 ± (84.55 - 85.04) ms+1.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.92 ± (10.91 - 10.92) MB10.90 ± (10.89 - 10.90) MB-0.2%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.36 ± (22.32 - 22.40) ms22.47 ± (22.42 - 22.52) ms+0.5%✅⬆️
process.time_to_main_ms84.58 ± (84.39 - 84.76) ms86.66 ± (86.43 - 86.89) ms+2.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.95 ± (10.94 - 10.95) MB10.95 ± (10.94 - 10.95) MB-0.0%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms215.44 ± (214.41 - 216.47) ms213.32 ± (212.44 - 214.20) ms-1.0%
process.time_to_main_ms540.69 ± (539.52 - 541.85) ms540.72 ± (539.47 - 541.97) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.65 ± (48.62 - 48.69) MB48.65 ± (48.62 - 48.69) MB-0.0%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.2%
.NET 6 - Baseline
process.internal_duration_ms21.16 ± (21.12 - 21.19) ms21.35 ± (21.31 - 21.40) ms+0.9%✅⬆️
process.time_to_main_ms72.63 ± (72.46 - 72.80) ms73.51 ± (73.31 - 73.71) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.63 ± (10.63 - 10.63) MB10.63 ± (10.62 - 10.63) MB-0.0%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.57 ± (21.52 - 21.62) ms21.49 ± (21.44 - 21.54) ms-0.4%
process.time_to_main_ms76.91 ± (76.67 - 77.14) ms75.85 ± (75.60 - 76.10) ms-1.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.74 ± (10.73 - 10.74) MB10.75 ± (10.75 - 10.75) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms372.66 ± (370.71 - 374.60) ms373.21 ± (370.73 - 375.68) ms+0.1%✅⬆️
process.time_to_main_ms549.86 ± (548.70 - 551.02) ms546.79 ± (545.67 - 547.90) ms-0.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.14 ± (50.12 - 50.16) MB50.02 ± (49.99 - 50.05) MB-0.2%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.2%
.NET 8 - Baseline
process.internal_duration_ms19.39 ± (19.35 - 19.42) ms19.56 ± (19.53 - 19.60) ms+0.9%✅⬆️
process.time_to_main_ms72.18 ± (72.02 - 72.33) ms72.81 ± (72.67 - 72.94) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.67 ± (7.66 - 7.67) MB7.67 ± (7.67 - 7.68) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.24 ± (19.21 - 19.28) ms19.57 ± (19.51 - 19.62) ms+1.7%✅⬆️
process.time_to_main_ms72.81 ± (72.67 - 72.95) ms73.99 ± (73.84 - 74.15) ms+1.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.72 ± (7.71 - 7.72) MB7.71 ± (7.71 - 7.72) MB-0.1%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms295.32 ± (293.05 - 297.58) ms295.75 ± (293.59 - 297.90) ms+0.1%✅⬆️
process.time_to_main_ms493.98 ± (493.09 - 494.87) ms498.19 ± (497.19 - 499.19) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.09 ± (37.06 - 37.12) MB37.16 ± (37.13 - 37.19) MB+0.2%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.8%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration199.75 ± (198.85 - 199.85) ms200.73 ± (200.33 - 201.22) ms+0.5%✅⬆️
.NET Framework 4.8 - Bailout
duration202.52 ± (202.26 - 203.38) ms204.06 ± (203.64 - 204.49) ms+0.8%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1197.87 ± (1196.19 - 1202.00) ms1199.07 ± (1200.43 - 1207.22) ms+0.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms194.01 ± (193.56 - 194.46) ms193.79 ± (193.33 - 194.25) ms-0.1%
process.time_to_main_ms84.95 ± (84.61 - 85.29) ms84.26 ± (83.92 - 84.60) ms-0.8%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.12 ± (16.10 - 16.15) MB16.12 ± (16.10 - 16.14) MB-0.0%
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+0.3%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms192.76 ± (192.34 - 193.17) ms193.21 ± (192.76 - 193.66) ms+0.2%✅⬆️
process.time_to_main_ms85.17 ± (84.90 - 85.45) ms85.46 ± (85.20 - 85.72) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.16 ± (16.13 - 16.19) MB16.16 ± (16.13 - 16.19) MB+0.0%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)+0.1%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms386.33 ± (385.05 - 387.62) ms386.84 ± (385.40 - 388.29) ms+0.1%✅⬆️
process.time_to_main_ms537.29 ± (536.14 - 538.43) ms537.42 ± (536.09 - 538.75) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.83 ± (57.62 - 58.04) MB58.07 ± (57.84 - 58.30) MB+0.4%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.4%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms199.57 ± (199.11 - 200.02) ms198.71 ± (198.16 - 199.26) ms-0.4%
process.time_to_main_ms73.40 ± (73.16 - 73.63) ms72.95 ± (72.67 - 73.22) ms-0.6%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.39 ± (16.36 - 16.41) MB16.39 ± (16.36 - 16.41) MB-0.0%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.2%
.NET 6 - Bailout
process.internal_duration_ms197.97 ± (197.67 - 198.27) ms198.07 ± (197.55 - 198.59) ms+0.0%✅⬆️
process.time_to_main_ms74.03 ± (73.88 - 74.19) ms74.45 ± (74.19 - 74.72) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.43 ± (16.41 - 16.45) MB16.44 ± (16.42 - 16.46) MB+0.1%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.4%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms581.44 ± (579.18 - 583.71) ms585.48 ± (582.45 - 588.52) ms+0.7%✅⬆️
process.time_to_main_ms547.67 ± (546.57 - 548.77) ms549.71 ± (548.29 - 551.13) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.26 ± (61.18 - 61.33) MB61.48 ± (61.36 - 61.60) MB+0.4%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)+0.4%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms196.66 ± (196.17 - 197.14) ms197.71 ± (197.25 - 198.17) ms+0.5%✅⬆️
process.time_to_main_ms72.54 ± (72.29 - 72.80) ms72.98 ± (72.76 - 73.20) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.72 ± (11.70 - 11.74) MB11.79 ± (11.77 - 11.81) MB+0.6%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+0.4%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms196.37 ± (195.96 - 196.78) ms197.59 ± (197.15 - 198.02) ms+0.6%✅⬆️
process.time_to_main_ms73.11 ± (72.93 - 73.30) ms74.05 ± (73.81 - 74.29) ms+1.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.77 ± (11.74 - 11.79) MB11.78 ± (11.76 - 11.80) MB+0.1%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.1%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms512.83 ± (510.22 - 515.44) ms513.76 ± (511.12 - 516.41) ms+0.2%✅⬆️
process.time_to_main_ms498.78 ± (497.91 - 499.65) ms499.18 ± (498.29 - 500.07) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.97 ± (50.94 - 51.01) MB51.01 ± (50.97 - 51.04) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.1%✅⬆️
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 (8647) - mean (72ms)  : 70, 75
    master - mean (74ms)  : 70, 77

    section Bailout
    This PR (8647) - mean (78ms)  : 75, 81
    master - mean (78ms)  : 76, 80

    section CallTarget+Inlining+NGEN
    This PR (8647) - mean (1,094ms)  : 1054, 1134
    master - mean (1,092ms)  : 1049, 1136

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 (8647) - mean (115ms)  : 110, 120
    master - mean (114ms)  : 109, 118

    section Bailout
    This PR (8647) - mean (117ms)  : 114, 120
    master - mean (115ms)  : 111, 118

    section CallTarget+Inlining+NGEN
    This PR (8647) - mean (795ms)  : 776, 814
    master - mean (794ms)  : 766, 823

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8647) - mean (102ms)  : 98, 106
    master - mean (101ms)  : 97, 104

    section Bailout
    This PR (8647) - mean (105ms)  : 100, 109
    master - mean (106ms)  : 101, 110

    section CallTarget+Inlining+NGEN
    This PR (8647) - mean (952ms)  : 902, 1003
    master - mean (957ms)  : 916, 997

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

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

    section CallTarget+Inlining+NGEN
    This PR (8647) - mean (824ms)  : 783, 865
    master - mean (821ms)  : 784, 857

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 (8647) - mean (201ms)  : 195, 207
    master - mean (199ms)  : 193, 206

    section Bailout
    This PR (8647) - mean (204ms)  : 200, 208
    master - mean (203ms)  : 196, 210

    section CallTarget+Inlining+NGEN
    This PR (8647) - mean (1,204ms)  : 1154, 1253
    master - mean (1,199ms)  : 1159, 1239

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 (8647) - mean (288ms)  : 282, 295
    master - mean (288ms)  : 283, 294

    section Bailout
    This PR (8647) - mean (288ms)  : 284, 293
    master - mean (288ms)  : 283, 293

    section CallTarget+Inlining+NGEN
    This PR (8647) - mean (963ms)  : 943, 983
    master - mean (966ms)  : 948, 983

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8647) - mean (281ms)  : 274, 288
    master - mean (282ms)  : 277, 287

    section Bailout
    This PR (8647) - mean (282ms)  : 273, 291
    master - mean (281ms)  : 277, 285

    section CallTarget+Inlining+NGEN
    This PR (8647) - mean (1,166ms)  : 1131, 1202
    master - mean (1,160ms)  : 1127, 1192

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8647) - mean (281ms)  : 274, 287
    master - mean (280ms)  : 273, 286

    section Bailout
    This PR (8647) - mean (282ms)  : 277, 287
    master - mean (279ms)  : 274, 284

    section CallTarget+Inlining+NGEN
    This PR (8647) - mean (1,044ms)  : 1005, 1083
    master - mean (1,043ms)  : 995, 1090

Loading

@pr-commenter

pr-commenter Bot commented May 15, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-06-30 10:02:30

Comparing candidate commit 07bd802 in PR branch andrew/graphql-limit with baseline commit f0fbab0 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 72 metrics, 0 unstable metrics, 59 known flaky benchmarks, 67 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 ----------------------------------'

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 [-7122.709op/s; -6711.559op/s] or [-8.445%; -7.958%]

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

  • 🟥 throughput [-7272.308op/s; -6024.472op/s] or [-7.394%; -6.126%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+301.379ms; +307.441ms] or [+149.555%; +152.563%]
  • 🟥 throughput [-45.403op/s; -41.622op/s] or [-8.169%; -7.489%]

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

  • 🟥 execution_time [+381.456ms; +385.404ms] or [+301.374%; +304.493%]
  • 🟩 throughput [+85.497op/s; +92.014op/s] or [+11.272%; +12.132%]

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

  • 🟥 execution_time [+390.671ms; +393.067ms] or [+345.729%; +347.849%]

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

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.528%; +27.540%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+9.976%; +9.987%]
  • 🟩 execution_time [-15.688ms; -11.512ms] or [-7.327%; -5.376%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.500%; +27.510%]

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

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.743%; +105.758%]
  • 🟥 throughput [-282363.786op/s; -279441.106op/s] or [-28.831%; -28.532%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.557%; +38.566%]
  • 🟩 execution_time [-25.684ms; -20.836ms] or [-11.454%; -9.292%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • 🟥 throughput [-148483.598op/s; -132376.904op/s] or [-21.334%; -19.020%]

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

  • 🟩 throughput [+9248.575op/s; +11871.570op/s] or [+7.368%; +9.457%]

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

  • 🟩 throughput [+488794.887op/s; +500701.027op/s] or [+16.299%; +16.696%]

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

  • 🟩 execution_time [-18.935ms; -14.604ms] or [-8.728%; -6.732%]
  • 🟩 throughput [+143897.194op/s; +200716.297op/s] or [+5.712%; +7.967%]

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

  • 🟥 execution_time [+300.344ms; +301.011ms] or [+150.072%; +150.405%]

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

  • 🟥 execution_time [+299.845ms; +303.802ms] or [+151.213%; +153.208%]

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

  • 🟥 execution_time [+300.412ms; +302.887ms] or [+151.324%; +152.571%]

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

  • 🟥 execution_time [+296.981ms; +298.328ms] or [+145.865%; +146.527%]

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

  • 🟥 execution_time [+292.446ms; +294.305ms] or [+142.966%; +143.875%]

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

  • 🟥 execution_time [+302.750ms; +304.566ms] or [+151.314%; +152.222%]

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

  • 🟥 execution_time [+22.081µs; +45.880µs] or [+7.049%; +14.647%]
  • 🟥 throughput [-426.934op/s; -226.758op/s] or [-13.309%; -7.069%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.150ms; +300.029ms] or [+149.307%; +149.745%]

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

  • unstable execution_time [+409.125ms; +418.689ms] or [+444.531%; +454.923%]
  • 🟩 throughput [+704.271op/s; +861.168op/s] or [+5.787%; +7.076%]

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

  • unstable execution_time [+223.683ms; +280.306ms] or [+169.840%; +212.834%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+400.284ms; +480.972ms] or [+184.047%; +221.146%]
  • 🟥 throughput [-610.323op/s; -550.271op/s] or [-55.301%; -49.860%]

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

  • unstable execution_time [+144.628ms; +290.691ms] or [+61.635%; +123.880%]
  • 🟥 throughput [-670.696op/s; -587.270op/s] or [-44.736%; -39.171%]

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

  • 🟥 execution_time [+323.793ms; +338.636ms] or [+193.666%; +202.544%]
  • 🟥 throughput [-409.615op/s; -369.426op/s] or [-28.521%; -25.723%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472

  • 🟩 execution_time [-126.943µs; -103.458µs] or [-6.388%; -5.206%]
  • 🟩 throughput [+27.984op/s; +34.460op/s] or [+5.561%; +6.848%]

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

  • 🟩 throughput [+29.184op/s; +48.455op/s] or [+5.761%; +9.566%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+303.277ms; +304.792ms] or [+152.725%; +153.487%]

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

  • 🟥 execution_time [+300.581ms; +302.353ms] or [+150.622%; +151.510%]

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

  • 🟥 execution_time [+301.838ms; +304.994ms] or [+151.630%; +153.216%]
  • 🟩 throughput [+25076.746op/s; +32928.490op/s] or [+5.282%; +6.936%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+302.967ms; +305.403ms] or [+152.140%; +153.363%]

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

  • 🟥 execution_time [+299.201ms; +300.810ms] or [+147.942%; +148.737%]

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

  • 🟥 execution_time [+305.614ms; +309.808ms] or [+154.899%; +157.024%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+301.481ms; +304.101ms] or [+151.316%; +152.631%]

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

  • 🟥 execution_time [+299.936ms; +303.443ms] or [+149.491%; +151.238%]
  • 🟩 throughput [+31093.847op/s; +38428.846op/s] or [+6.174%; +7.631%]

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

  • 🟥 execution_time [+300.567ms; +303.541ms] or [+149.529%; +151.009%]

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

  • 🟩 execution_time [-16.388ms; -12.754ms] or [-7.620%; -5.931%]

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

  • unstable execution_time [+3.879µs; +49.200µs] or [+0.958%; +12.153%]

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

  • 🟩 allocated_mem [-18.732KB; -18.708KB] or [-6.833%; -6.824%]
  • unstable execution_time [-25.032µs; +33.867µs] or [-4.947%; +6.694%]
  • unstable throughput [-119.731op/s; +84.913op/s] or [-5.975%; +4.237%]

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

  • unstable execution_time [-52.618µs; +7.197µs] or [-9.118%; +1.247%]

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

  • unstable execution_time [+8.036µs; +13.043µs] or [+18.995%; +30.829%]
  • 🟥 throughput [-5572.742op/s; -3629.320op/s] or [-23.459%; -15.278%]

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

  • unstable execution_time [-13.994µs; -6.224µs] or [-21.711%; -9.657%]
  • unstable throughput [+1532.896op/s; +3251.952op/s] or [+9.405%; +19.952%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.872ms; +302.710ms] or [+152.077%; +153.007%]

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

  • 🟥 execution_time [+301.088ms; +303.534ms] or [+153.253%; +154.498%]

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

  • 🟥 execution_time [+298.498ms; +300.410ms] or [+149.435%; +150.392%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+296.716ms; +298.426ms] or [+147.886%; +148.739%]

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

  • 🟥 execution_time [+300.510ms; +302.500ms] or [+150.902%; +151.901%]

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

  • 🟥 execution_time [+303.078ms; +305.439ms] or [+153.702%; +154.899%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.698ms; +300.595ms] or [+149.491%; +149.939%]
  • 🟩 throughput [+61076644.889op/s; +61428249.406op/s] or [+44.480%; +44.736%]

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

  • 🟥 execution_time [+423.709ms; +427.634ms] or [+526.957%; +531.839%]

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

  • 🟥 execution_time [+299.457ms; +300.621ms] or [+149.362%; +149.943%]

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

  • 🟩 throughput [+73816.867op/s; +83689.794op/s] or [+6.892%; +7.814%]

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

  • 🟩 throughput [+52615.717op/s; +71889.801op/s] or [+6.090%; +8.321%]

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

  • 🟩 throughput [+88967.712op/s; +96804.839op/s] or [+8.836%; +9.614%]

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

  • 🟩 throughput [+49467.573op/s; +54634.735op/s] or [+8.982%; +9.921%]

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

  • 🟩 throughput [+24852.333op/s; +34577.124op/s] or [+5.563%; +7.739%]

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

  • 🟩 throughput [+86543.391op/s; +105205.357op/s] or [+9.669%; +11.754%]

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.ObjectExtractorMoreComplexBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
  • 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 net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0
  • 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

@andrewlock
andrewlock marked this pull request as draft May 15, 2026 13:06
@andrewlock
andrewlock force-pushed the andrew/graphql-limit branch from 7444a8b to ee8e624 Compare May 18, 2026 10:27
@github-actions

Copy link
Copy Markdown
Contributor

Snapshots difference summary

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

@andrewlock
andrewlock marked this pull request as ready for review May 18, 2026 12:14
@andrewlock
andrewlock force-pushed the andrew/graphql-limit branch 2 times, most recently from 4fb23ce to 8efad41 Compare June 19, 2026 09:06
@datadog-datadog-prod-us1

This comment has been minimized.

@andrewlock
andrewlock force-pushed the andrew/graphql-limit branch from 8efad41 to 07bd802 Compare June 30, 2026 09:11
@andrewlock

Copy link
Copy Markdown
Member Author

@codex review

@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: 07bd802541

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

}

// pre-truncate if we got too large
var result = builder.ToString(startIndex: 0, length: TruncatorTagsProcessor.MaxMetaValLen);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3 Badge Preserve the truncation marker on oversized errors

For long ASCII GraphQL errors, this slices error.stack down to MaxMetaValLen before the normal tag processor sees it. Since TruncatorTagsProcessor only appends ... when the value still exceeds that limit, these oversized GraphQL errors are silently cut mid-message without the truncation marker used for other span metadata, making diagnostics misleading. Append the ellipsis here or leave the value over the limit for the tag processor to handle.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Meh. I'm not really sure the ellipsis appending is actually the correct approach tbh

@andrewlock
andrewlock merged commit 7d4e607 into master Jul 1, 2026
141 checks passed
@andrewlock
andrewlock deleted the andrew/graphql-limit branch July 1, 2026 15:03
@github-actions github-actions Bot added this to the vNext-v3 milestone Jul 1, 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) identified-by:ai type:performance Performance, speed, latency, resource usage (CPU, memory) type:reliability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants