Skip to content

[Debugger] Reuse singleton no-op symbol uploader#8570

Open
dudikeleti wants to merge 2 commits intomasterfrom
dudik/noop-symbol-uploader-singleton
Open

[Debugger] Reuse singleton no-op symbol uploader#8570
dudikeleti wants to merge 2 commits intomasterfrom
dudik/noop-symbol-uploader-singleton

Conversation

@dudikeleti
Copy link
Copy Markdown
Contributor

@dudikeleti dudikeleti commented May 6, 2026

Summary of changes

  • Add a shared NoOpSymbolUploader.Instance.
  • Return the shared no-op uploader from SymbolsUploader.Create when symbol database upload is disabled or third-party module loading failed.

Reason for change

  • NoOpSymbolUploader is stateless, so callers do not need distinct instances for disabled symbol upload paths.
  • This keeps the disabled/fallback behavior unchanged while simplifying object ownership.

Implementation details

  • The singleton instance is internal static readonly and only exposes the existing no-op behavior: StartFlushingAsync() returns Task.CompletedTask, and Dispose() does nothing.
  • No logging, configuration, snapshot, or symbol upload output shape changes are intended.

Test coverage

  • No dedicated test needed.

@dudikeleti dudikeleti requested a review from a team as a code owner May 6, 2026 10:04
@github-actions github-actions Bot added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) area:debugger labels May 6, 2026
@dudikeleti dudikeleti marked this pull request as draft May 6, 2026 10:31
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 6, 2026

Benchmarks

Benchmark execution time: 2026-05-06 15:38:31

Comparing candidate commit 3e6ea3c in PR branch dudik/noop-symbol-uploader-singleton with baseline commit 1e6fec9 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 27 metrics, 0 unstable metrics, 60 known flaky benchmarks, 27 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 [-9026.897op/s; -8457.392op/s] or [-10.703%; -10.028%]

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

  • 🟥 throughput [-8106.305op/s; -6852.285op/s] or [-8.242%; -6.967%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+320.554ms; +324.198ms] or [+159.070%; +160.879%]
  • 🟥 throughput [-41.475op/s; -37.873op/s] or [-7.462%; -6.814%]

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

  • 🟥 execution_time [+379.771ms; +380.588ms] or [+300.042%; +300.688%]
  • 🟩 throughput [+91.290op/s; +96.774op/s] or [+12.036%; +12.759%]

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

  • 🟥 execution_time [+396.469ms; +398.919ms] or [+350.860%; +353.028%]

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

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.529%; +27.541%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+9.977%; +9.987%]
  • 🟩 execution_time [-15.943ms; -11.775ms] or [-7.446%; -5.499%]
  • 🟩 throughput [+7232.086op/s; +10010.082op/s] or [+5.279%; +7.307%]

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

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

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

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.746%; +105.759%]
  • 🟥 throughput [-283955.801op/s; -279209.428op/s] or [-28.993%; -28.509%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.558%; +38.566%]
  • 🟩 execution_time [-26.079ms; -21.223ms] or [-11.630%; -9.465%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.292%; +105.304%]
  • 🟥 throughput [-148401.638op/s; -131586.734op/s] or [-21.322%; -18.906%]

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

  • 🟩 throughput [+10789.900op/s; +13794.880op/s] or [+6.865%; +8.777%]

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

  • 🟩 throughput [+11130.347op/s; +13763.894op/s] or [+8.867%; +10.965%]

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

  • 🟩 throughput [+440674.355op/s; +469318.400op/s] or [+14.694%; +15.649%]

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

  • 🟩 execution_time [-17.517ms; -13.158ms] or [-8.075%; -6.065%]
  • 🟩 throughput [+176379.379op/s; +233731.516op/s] or [+7.001%; +9.277%]

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

  • 🟥 execution_time [+299.762ms; +300.397ms] or [+149.781%; +150.098%]

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

  • 🟥 execution_time [+299.877ms; +303.609ms] or [+151.229%; +153.111%]

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

  • 🟥 execution_time [+300.666ms; +303.236ms] or [+151.452%; +152.747%]

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

  • 🟥 execution_time [+296.504ms; +297.371ms] or [+145.631%; +146.057%]

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

  • 🟥 execution_time [+294.787ms; +296.892ms] or [+144.110%; +145.140%]

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

  • 🟥 execution_time [+302.325ms; +304.221ms] or [+151.102%; +152.049%]

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

  • 🟥 execution_time [+23.885µs; +47.468µs] or [+7.625%; +15.154%]
  • 🟥 throughput [-440.594op/s; -242.138op/s] or [-13.735%; -7.548%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.686ms; +300.413ms] or [+149.574%; +149.937%]

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

  • unstable execution_time [+328.756ms; +377.021ms] or [+357.207%; +409.649%]
  • 🟩 throughput [+1074.036op/s; +1227.979op/s] or [+8.826%; +10.090%]

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

  • unstable execution_time [+277.487ms; +321.214ms] or [+210.693%; +243.895%]
  • 🟩 throughput [+767.702op/s; +967.143op/s] or [+7.432%; +9.363%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+311.577ms; +349.466ms] or [+143.260%; +160.681%]
  • 🟥 throughput [-501.686op/s; -470.404op/s] or [-45.458%; -42.623%]

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

  • unstable execution_time [+204.495ms; +337.731ms] or [+87.147%; +143.927%]
  • 🟥 throughput [-677.274op/s; -593.659op/s] or [-45.174%; -39.597%]

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

  • 🟥 execution_time [+343.485ms; +354.437ms] or [+205.444%; +211.994%]
  • 🟥 throughput [-408.043op/s; -371.031op/s] or [-28.411%; -25.834%]

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

  • 🟩 throughput [+26.766op/s; +36.745op/s] or [+5.284%; +7.254%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+302.864ms; +304.292ms] or [+152.517%; +153.236%]

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

  • 🟥 execution_time [+301.867ms; +303.561ms] or [+151.266%; +152.115%]

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

  • 🟥 execution_time [+300.776ms; +303.831ms] or [+151.097%; +152.632%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+303.179ms; +304.416ms] or [+152.247%; +152.867%]

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

  • 🟥 execution_time [+297.513ms; +300.260ms] or [+147.107%; +148.465%]

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

  • 🟥 execution_time [+304.718ms; +308.272ms] or [+154.445%; +156.246%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+302.836ms; +304.345ms] or [+151.996%; +152.754%]

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

  • 🟥 execution_time [+298.145ms; +300.331ms] or [+148.598%; +149.687%]

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

  • 🟥 execution_time [+300.525ms; +303.359ms] or [+149.508%; +150.918%]

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

  • 🟩 execution_time [-16.716ms; -13.060ms] or [-7.773%; -6.073%]

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

  • 🟩 allocated_mem [-19.985KB; -19.965KB] or [-7.290%; -7.283%]
  • unstable execution_time [-48.257µs; +3.256µs] or [-9.538%; +0.643%]

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

  • 🟩 allocated_mem [-19.021KB; -19.005KB] or [-6.934%; -6.928%]
  • unstable execution_time [+4.423µs; +132.066µs] or [+0.767%; +22.886%]
  • unstable throughput [-129.263op/s; +77.933op/s] or [-7.385%; +4.452%]

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

  • 🟥 execution_time [+5.952µs; +9.947µs] or [+14.069%; +23.511%]
  • 🟥 throughput [-4559.917op/s; -2815.367op/s] or [-19.196%; -11.852%]

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

  • unstable execution_time [-13.647µs; -6.323µs] or [-21.172%; -9.811%]
  • 🟩 throughput [+1638.095op/s; +3173.505op/s] or [+10.050%; +19.471%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.939ms; +302.481ms] or [+152.111%; +152.891%]

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

  • 🟥 execution_time [+301.492ms; +303.840ms] or [+153.459%; +154.654%]

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

  • 🟥 execution_time [+299.092ms; +301.171ms] or [+149.732%; +150.773%]

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

  • 🟩 throughput [+31812.851op/s; +34481.127op/s] or [+6.022%; +6.527%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+298.980ms; +300.819ms] or [+149.015%; +149.931%]

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

  • 🟥 execution_time [+302.085ms; +303.677ms] or [+151.693%; +152.492%]

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

  • 🟥 execution_time [+303.323ms; +305.470ms] or [+153.826%; +154.915%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.035ms; +300.779ms] or [+149.659%; +150.030%]
  • 🟩 throughput [+61270386.906op/s; +61537899.994op/s] or [+44.621%; +44.816%]

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

  • 🟥 execution_time [+422.706ms; +426.763ms] or [+525.710%; +530.756%]
  • 🟩 throughput [+911.858op/s; +1094.355op/s] or [+7.049%; +8.460%]

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

  • 🟥 execution_time [+299.603ms; +300.549ms] or [+149.435%; +149.907%]

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

  • 🟩 throughput [+58604.866op/s; +69428.768op/s] or [+5.472%; +6.482%]

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

  • 🟩 throughput [+63033.667op/s; +82235.652op/s] or [+7.296%; +9.519%]

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

  • 🟩 throughput [+69304.101op/s; +100457.633op/s] or [+5.364%; +7.776%]

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

  • 🟩 throughput [+71220.874op/s; +79076.305op/s] or [+7.073%; +7.854%]

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

  • 🟩 throughput [+51716.568op/s; +56287.707op/s] or [+9.391%; +10.221%]

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

  • 🟩 throughput [+26813.634op/s; +36396.487op/s] or [+6.002%; +8.147%]

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

  • 🟩 throughput [+82034.707op/s; +99692.373op/s] or [+9.165%; +11.138%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472
  • 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 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.StringConcatAspectBenchmark net472
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

@dudikeleti dudikeleti changed the title [Debugger] Reuse a singleton NoOpSymbolUploader [Debugger] Reuse singleton no-op symbol uploader May 6, 2026
dudikeleti and others added 2 commits May 6, 2026 16:25
NoOpSymbolUploader has no state and was being allocated up to twice per
bootstrap (when symbol DB upload is disabled or third-party modules fail to
load). Expose a static Instance and use it instead of new().

Co-authored-by: Cursor <cursoragent@cursor.com>
@dudikeleti dudikeleti force-pushed the dudik/noop-symbol-uploader-singleton branch from 809acb0 to 3e6ea3c Compare May 6, 2026 14:25
@dudikeleti dudikeleti marked this pull request as ready for review May 6, 2026 14:25
@dudikeleti dudikeleti removed the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant