Skip to content

Update OtlpSnapshotHelper in place; migrate remaining traces-only OTLP suites off Docker - #9118

Merged
chojomok merged 4 commits into
otlp-http-mocktracerfrom
otlp-http-mocktracer-traces-migration
Aug 25, 2026
Merged

Update OtlpSnapshotHelper in place; migrate remaining traces-only OTLP suites off Docker#9118
chojomok merged 4 commits into
otlp-http-mocktracerfrom
otlp-http-mocktracer-traces-migration

Conversation

@chojomok

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #9097 (base branch otlp-http-mocktracer). This is the "optional follow-up" that PR called out, taking a different implementation approach than the additive one used there:

  • Updates OtlpSnapshotHelper's methods in place instead of adding parallel typed methods alongside the JToken-based ones: MergeDatadogRequests and GetAttributeStringValue now take the typed MockOtlp model directly; the old JToken overloads and the unused SetAttributeStringValue are deleted. Normalization (NormalizeResourceAttributes/NormalizeSpans/etc.) still operates on the final JSON, since it writes placeholder text into fields (trace/span IDs) whose real protobuf types can't hold arbitrary strings — that part is unchanged and still shared with any remaining JSON/Docker consumer.
  • Migrates OpenTelemetryWebRequestTests and OpenTelemetryHttpClientTests fully off the Docker ddapm-test-agent onto MockTracerAgent's OTLP support (neither drives a Kestrel fixture — both launch their own sample process directly and now point OTLP export at the mock agent's own port before launch).
  • Migrates OpenTelemetrySdkTests.SubmitsOtlpTraces the same way. Its three sibling methods (SubmitsOtlpMetrics, SubmitsOtlpRuntimeMetrics, SubmitsOtlpLogs) stay on Docker — they exercise gRPC and metrics/logs decoding, both explicit non-goals of MockTracerAgent's OTLP support, and none of them call OtlpSnapshotHelper at all, so they're unaffected by the signature changes.
  • Adds MockTracerAgent.WaitForOtlpTraceRequestsAsync (in the base otlp-http-mocktracer branch already) as the entry point all four migrated suites use.

Fixes found while validating

Two real bugs surfaced while getting existing snapshots to match unmodified:

  • MergeDatadogRequests's default span sort accidentally used StringComparer.Ordinal; the original implementation used a bare OrderBy (culture-aware default), and switching comparers reordered names differing only by leading-letter case.
  • AddProtobufToJsonScrubbers (enum-as-string → int) was only called for http/protobuf rows; since everything now round-trips through the same JsonFormatter rendering regardless of original wire protocol, it needs to run unconditionally.

Also added a scrubber for whole-number doubleValue formatting ("1" vs "1.0" — both valid representations of the same double).

Test plan

  • OpenTelemetryWebRequestTests.SubmitsOtlpTraces (2 cases) — pass against existing, unmodified snapshots.
  • OpenTelemetryHttpClientTests.SubmitsOtlpTraces (2 cases) — pass against existing, unmodified snapshots.
  • OpenTelemetrySdkTests.SubmitsOtlpTraces (8 cases, all protocol/backup/semantics combinations, packageVersion="") — pass against existing, unmodified snapshots.
  • OtlpAspNetCoreMvc31Tests/OtlpAspNetCoreMinimalApisTests (108 cases) re-verified alongside the above — no regression.
  • OpenTelemetrySdkTests.SubmitsOtlpTraces not yet run across the full GetOtlpTracesTestData() matrix (multiple OTel SDK package versions) — only spot-tested with the default version locally; should be verified in CI.

🤖 Generated with Claude Code

chojomok and others added 2 commits August 25, 2026 09:58
…f Docker

Alternate approach to the additive one in otlp-http-mocktracer: instead
of keeping the JToken-based OtlpSnapshotHelper methods alongside new
typed ones, update them in place (MergeDatadogRequests and
GetAttributeStringValue now take the typed MockOtlp model; the old
JToken overloads and the unused SetAttributeStringValue are deleted).

OpenTelemetryWebRequestTests and OpenTelemetryHttpClientTests are fully
migrated off the Docker ddapm-test-agent onto MockTracerAgent -- both
verified passing locally against unmodified snapshots.

OpenTelemetrySdkTests.SubmitsOtlpTraces is migrated too (its sibling
methods SubmitsOtlpMetrics/SubmitsOtlpRuntimeMetrics/SubmitsOtlpLogs
stay on Docker: gRPC + metrics/logs decoding are still non-goals for
MockTracerAgent's OTLP support), but its existing snapshots do NOT yet
match:
- doubleValue formatting differs ("1" vs "1.0") -- Google.Protobuf's
  JsonFormatter renders whole-number doubles without a trailing ".0",
  the old ddapm-agent rendering (or the scrubber pipeline) apparently
  preserved it.
- Span content/order mismatch in the non-Datadog-SDK (otelTracesEnabled)
  branch -- span identity looks scrambled relative to the verified
  file, needs investigation (likely a merge/sort or scope-grouping
  difference between the old JToken-array-of-requests shape and the
  new typed-then-formatted approach for that branch specifically).

Still TODO before this is mergeable:
- Root-cause and fix both diffs above.
- Decide whether to regenerate OpenTelemetrySdkTests.SubmitsOtlpTraces*
  snapshots (likely required for the doubleValue formatting change,
  which is a legitimate representation difference, not a bug) vs. fix
  in code (the span-order issue is likely a real bug to fix, not a
  snapshot update).
- OpenTelemetrySdkTests.SubmitsOtlpTraces only spot-tested with
  packageVersion="" (default); not yet run across the full
  GetOtlpTracesTestData() matrix (multiple OTel SDK package versions).
- Not yet pushed / no PR opened for this branch.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Two real bugs found while validating the migration, both fixed:

- MergeDatadogRequests's default span sort used StringComparer.Ordinal,
  but the original JToken-based implementation used a bare OrderBy
  (culture-aware default comparer). Ordinal reorders names that differ
  only by the case of a leading letter (e.g. "SomeSpan" vs
  "some.name"), which looked like a real span-identity mismatch
  against existing snapshots. Dropped the explicit comparer to match
  the original default exactly.
- AddProtobufToJsonScrubbers (which converts protobuf's enum-as-string
  rendering, e.g. "SPAN_KIND_INTERNAL", to the int form existing
  snapshots expect) was only called for http/protobuf rows. Since
  MockTracerAgent always re-serializes via Google.Protobuf's
  JsonFormatter regardless of which wire protocol the request arrived
  over, that mismatch now shows up on every row, not just protobuf
  ones -- call it unconditionally, matching every other migrated
  suite.

Also added a scrubber for a real formatting difference: JsonFormatter
renders a whole-number double as "1" rather than the "1.0" existing
snapshots expect (both are valid representations of the same double
value).

All 8 SubmitsOtlpTraces rows (all protocol/backup/semantics
combinations) now pass against the existing, unmodified snapshots.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@chojomok chojomok added AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos area:opentelemetry OpenTelemetry support area:tests unit tests, integration tests type:cleanup Minor code clean up labels Aug 25, 2026
@bouwkast bouwkast removed the AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos label Aug 25, 2026
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
var settings = VerifyHelper.GetSpanVerifierSettings();
settings.AddRegexScrubber(_exceptionStacktraceOtlpRegex, @"string_value"": ""System.ArgumentException: Example argument exception""");
settings.AddRegexScrubber(_exceptionStacktraceOtlpJsonRegex, @"stringValue"": ""System.ArgumentException: Example argument exception""");
settings.AddRegexScrubber(_wholeNumberDoubleValueRegex, @"""doubleValue"": $1.0");

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This scrubber isn't masking real data loss — it's reconciling two valid textual representations of the same double value.

Google.Protobuf's JsonFormatter renders a whole-number double as 1 instead of 1.0 (matching how e.g. (1.0).ToString() behaves in C#). The existing .verified.txt snapshots were captured against a renderer that always kept the trailing .0. Both 1 and 1.0 parse back to the identical IEEE-754 double, so nothing is being truncated.

Evidence this is purely cosmetic: doubles with a genuine fractional part (e.g. 1.5) already matched the snapshots with zero scrubbing needed — the regex only ever fires on whole numbers missing the decimal point, never on values with real precision to lose.

@pr-commenter

pr-commenter Bot commented Aug 25, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-25 18:38:18

Comparing candidate commit 0fde821 in PR branch otlp-http-mocktracer-traces-migration with baseline commit c16bc13 in branch master.

📊 Benchmarking dashboard

Found 1 performance improvements and 1 performance regressions! Performance is the same for 70 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 [-27771.959op/s; -24745.673op/s] or [-7.822%; -6.970%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net6.0

  • 🟩 throughput [+9077.689op/s; +10298.694op/s] or [+6.167%; +6.996%]

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.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472

  • 🟥 throughput [-10315.608op/s; -9480.553op/s] or [-6.718%; -6.174%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-9849.968op/s; -9256.225op/s] or [-11.679%; -10.975%]

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

  • 🟥 throughput [-8824.142op/s; -7720.926op/s] or [-8.972%; -7.850%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 allocated_mem [+1.541KB; +1.541KB] or [+46.817%; +46.831%]
  • 🟥 execution_time [+312.626ms; +316.387ms] or [+155.136%; +157.002%]
  • 🟥 throughput [-62.050op/s; -57.208op/s] or [-11.164%; -10.293%]

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

  • 🟥 allocated_mem [+1.012KB; +1.012KB] or [+37.524%; +37.537%]
  • 🟥 execution_time [+379.881ms; +384.450ms] or [+300.129%; +303.739%]
  • 🟩 throughput [+77.191op/s; +78.991op/s] or [+10.177%; +10.415%]

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

  • 🟥 allocated_mem [+1.088KB; +1.088KB] or [+40.343%; +40.355%]
  • 🟥 execution_time [+396.090ms; +399.048ms] or [+350.524%; +353.142%]

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

  • 🟥 allocated_mem [+4.692KB; +4.693KB] or [+98.785%; +98.801%]
  • 🟥 throughput [-60776.168op/s; -60357.916op/s] or [-47.287%; -46.962%]

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

  • 🟥 allocated_mem [+3.816KB; +3.816KB] or [+80.699%; +80.711%]
  • 🟩 execution_time [-15.776ms; -11.599ms] or [-7.368%; -5.417%]
  • 🟥 throughput [-59992.124op/s; -57218.769op/s] or [-43.791%; -41.766%]

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

  • 🟥 allocated_mem [+4.544KB; +4.544KB] or [+98.261%; +98.274%]
  • 🟥 throughput [-49189.566op/s; -46924.423op/s] or [-44.473%; -42.425%]

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

  • 🟥 allocated_mem [+1.315KB; +1.315KB] or [+106.388%; +106.404%]
  • 🟥 throughput [-263274.152op/s; -259922.179op/s] or [-26.882%; -26.539%]

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

  • 🟥 allocated_mem [+479 bytes; +480 bytes] or [+39.212%; +39.221%]
  • unstable execution_time [-27.328ms; -3.116ms] or [-12.187%; -1.390%]
  • 🟥 throughput [-102756.168op/s; -48980.804op/s] or [-10.978%; -5.233%]

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

  • 🟥 allocated_mem [+1.280KB; +1.280KB] or [+105.947%; +105.963%]
  • 🟥 throughput [-165384.547op/s; -149304.020op/s] or [-23.763%; -21.452%]

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

  • 🟥 allocated_mem [+3.378KB; +3.378KB] or [+89.003%; +89.017%]
  • 🟥 throughput [-73129.429op/s; -72360.327op/s] or [-49.215%; -48.698%]

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

  • 🟥 allocated_mem [+3.336KB; +3.336KB] or [+88.150%; +88.161%]
  • 🟥 throughput [-73887.274op/s; -70986.379op/s] or [-47.013%; -45.167%]

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

  • 🟥 allocated_mem [+3.264KB; +3.264KB] or [+88.493%; +88.506%]
  • 🟥 throughput [-55452.191op/s; -52837.241op/s] or [-44.175%; -42.092%]

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

  • unstable execution_time [-4.483ms; +18.912ms] or [-2.216%; +9.351%]
  • 🟩 throughput [+155922.133op/s; +343326.576op/s] or [+5.199%; +11.448%]

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

  • 🟩 execution_time [-19.176ms; -14.847ms] or [-8.840%; -6.844%]

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

  • 🟩 allocated_mem [-13.759KB; -13.756KB] or [-42.324%; -42.316%]
  • 🟥 execution_time [+300.070ms; +300.867ms] or [+149.935%; +150.333%]
  • 🟩 throughput [+942.629op/s; +957.457op/s] or [+10.411%; +10.575%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+299.744ms; +302.845ms] or [+151.162%; +152.725%]
  • 🟩 throughput [+2363.923op/s; +2578.299op/s] or [+18.080%; +19.720%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+300.262ms; +302.622ms] or [+151.249%; +152.437%]
  • 🟩 throughput [+1798.119op/s; +1923.162op/s] or [+17.360%; +18.567%]

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

  • 🟥 execution_time [+295.462ms; +296.549ms] or [+145.119%; +145.653%]
  • 🟩 throughput [+563.088op/s; +578.111op/s] or [+14.928%; +15.326%]

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

  • 🟥 execution_time [+296.678ms; +298.549ms] or [+145.035%; +145.950%]
  • 🟩 throughput [+2775.739op/s; +2841.879op/s] or [+40.326%; +41.287%]

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

  • 🟥 execution_time [+301.034ms; +301.681ms] or [+150.456%; +150.780%]
  • 🟩 throughput [+1346.770op/s; +1391.593op/s] or [+26.732%; +27.622%]

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

  • 🟩 execution_time [-145.924µs; -139.828µs] or [-29.960%; -28.709%]
  • 🟩 throughput [+832.546op/s; +876.092op/s] or [+40.549%; +42.670%]

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

  • 🟩 execution_time [-141.189µs; -114.577µs] or [-32.382%; -26.278%]
  • 🟩 throughput [+885.098op/s; +1006.319op/s] or [+38.481%; +43.751%]

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

  • 🟩 execution_time [-143.069µs; -120.931µs] or [-30.653%; -25.910%]
  • 🟩 throughput [+779.328op/s; +864.816op/s] or [+35.975%; +39.922%]

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

  • 🟩 execution_time [-126.282µs; -121.950µs] or [-34.095%; -32.926%]
  • 🟩 throughput [+1336.730op/s; +1387.635op/s] or [+49.506%; +51.392%]

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

  • 🟩 execution_time [-98.841µs; -75.062µs] or [-31.555%; -23.963%]
  • 🟩 throughput [+1110.297op/s; +1318.915op/s] or [+34.611%; +41.114%]

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

  • 🟩 execution_time [-138.018µs; -115.602µs] or [-37.756%; -31.624%]
  • 🟩 throughput [+1334.083op/s; +1472.294op/s] or [+47.875%; +52.835%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.886ms; +300.633ms] or [+149.674%; +150.047%]

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

  • 🟥 execution_time [+407.091ms; +414.741ms] or [+442.321%; +450.633%]
  • 🟩 throughput [+870.584op/s; +1067.917op/s] or [+7.154%; +8.775%]

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

  • unstable execution_time [+294.447ms; +344.613ms] or [+223.571%; +261.662%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+314.200ms; +357.462ms] or [+144.466%; +164.358%]
  • 🟥 throughput [-508.366op/s; -466.704op/s] or [-46.063%; -42.288%]

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

  • unstable execution_time [+206.618ms; +339.889ms] or [+88.052%; +144.846%]
  • 🟥 throughput [-665.175op/s; -581.760op/s] or [-44.367%; -38.804%]

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

  • 🟥 execution_time [+336.391ms; +349.858ms] or [+201.201%; +209.256%]
  • 🟥 throughput [-375.014op/s; -337.751op/s] or [-26.112%; -23.517%]

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

  • 🟩 execution_time [-190.275µs; -122.519µs] or [-9.639%; -6.206%]
  • 🟩 throughput [+37.011op/s; +54.235op/s] or [+7.306%; +10.706%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+301.527ms; +302.900ms] or [+151.843%; +152.535%]

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

  • 🟥 execution_time [+294.612ms; +298.236ms] or [+147.630%; +149.447%]

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

  • 🟥 execution_time [+301.113ms; +304.648ms] or [+151.266%; +153.042%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+301.473ms; +303.163ms] or [+151.390%; +152.238%]

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

  • 🟥 execution_time [+294.872ms; +297.398ms] or [+145.801%; +147.050%]

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

  • 🟥 execution_time [+302.943ms; +307.805ms] or [+153.545%; +156.009%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+302.399ms; +303.734ms] or [+151.777%; +152.447%]

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

  • 🟥 execution_time [+298.226ms; +301.716ms] or [+148.638%; +150.378%]
  • 🟩 throughput [+33620.594op/s; +41994.741op/s] or [+6.676%; +8.339%]

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

  • 🟥 execution_time [+300.204ms; +303.051ms] or [+149.349%; +150.765%]

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

  • 🟩 execution_time [-16.704ms; -13.055ms] or [-7.767%; -6.071%]
  • 🟩 throughput [+19961.350op/s; +27064.582op/s] or [+5.476%; +7.425%]

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

  • unstable execution_time [+12.258µs; +55.473µs] or [+3.028%; +13.702%]

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

  • 🟩 allocated_mem [-19.193KB; -19.171KB] or [-7.001%; -6.993%]
  • unstable execution_time [-10.151µs; +44.478µs] or [-2.006%; +8.791%]

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

  • unstable execution_time [-74.003µs; -13.306µs] or [-12.824%; -2.306%]

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

  • unstable execution_time [+7.799µs; +12.428µs] or [+18.434%; +29.376%]
  • 🟥 throughput [-5443.933op/s; -3521.300op/s] or [-22.917%; -14.824%]

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

  • unstable execution_time [-15.448µs; -7.822µs] or [-23.967%; -12.135%]
  • 🟩 throughput [+2063.672op/s; +3691.939op/s] or [+12.661%; +22.651%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.104ms; +304.299ms] or [+152.700%; +153.810%]

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

  • 🟥 execution_time [+302.346ms; +304.531ms] or [+153.893%; +155.005%]

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

  • 🟥 execution_time [+300.243ms; +303.712ms] or [+150.309%; +152.045%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472

  • 🟥 throughput [-25689.767op/s; -22880.001op/s] or [-7.112%; -6.334%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+298.093ms; +300.098ms] or [+148.573%; +149.572%]

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

  • 🟥 execution_time [+301.225ms; +303.037ms] or [+151.261%; +152.171%]

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

  • 🟥 execution_time [+304.134ms; +306.660ms] or [+154.237%; +155.518%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.530ms; +300.665ms] or [+149.407%; +149.973%]
  • 🟩 throughput [+61002697.370op/s; +61385020.741op/s] or [+44.426%; +44.704%]

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

  • unstable execution_time [+322.932ms; +392.013ms] or [+401.624%; +487.538%]

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

  • 🟥 execution_time [+299.337ms; +300.433ms] or [+149.302%; +149.849%]

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

  • 🟩 throughput [+101564.758op/s; +113094.718op/s] or [+9.483%; +10.559%]

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

  • 🟩 throughput [+84678.749op/s; +116773.068op/s] or [+6.554%; +9.038%]

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

  • 🟩 throughput [+80510.692op/s; +88000.449op/s] or [+7.996%; +8.740%]

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

  • 🟩 throughput [+51923.565op/s; +57753.381op/s] or [+9.428%; +10.487%]

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

  • 🟩 throughput [+57732.574op/s; +75650.561op/s] or [+6.450%; +8.452%]

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 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.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 net6.0
  • 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.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

Keep wording close to main where it already existed; tighten new
comments to be proportional to the code they explain.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@chojomok
chojomok merged commit 0fde821 into otlp-http-mocktracer Aug 25, 2026
63 of 70 checks passed
@chojomok
chojomok deleted the otlp-http-mocktracer-traces-migration branch August 25, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:opentelemetry OpenTelemetry support area:tests unit tests, integration tests type:cleanup Minor code clean up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants