Skip to content

[Configuration] Redact OTLP header configs in telemetry - #8763

Open
bm1549 wants to merge 6 commits into
masterfrom
brian.marks/omit-sensitive-config-telemetry
Open

[Configuration] Redact OTLP header configs in telemetry#8763
bm1549 wants to merge 6 commits into
masterfrom
brian.marks/omit-sensitive-config-telemetry

Conversation

@bm1549

@bm1549 bm1549 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

Redacts OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_TRACES_HEADERS, OTEL_EXPORTER_OTLP_METRICS_HEADERS, and OTEL_EXPORTER_OTLP_LOGS_HEADERS from configuration telemetry.

Reason for change

OTLP headers can contain credentials and should not be sent in telemetry.

Implementation details

Adds sensitive: true to the configuration registry and generates a private lookup that includes each key and its aliases. ConfigurationTelemetry.Record uses that lookup as the single redaction policy. The duplicate metrics-header parsing path was removed from TracerSettings; ExporterSettings remains the owner. The existing five-argument public IConfigurationSource.GetDictionary member is unchanged.

Test coverage

  • Ran all 82 source-generator tests on .NET 10.
  • Ran the affected configuration, telemetry, exporter, and public API compatibility tests on .NET 10.
  • Built Datadog.Trace for all target frameworks with no warnings.

Other details

None.

@bm1549 bm1549 added the AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos label Jun 6, 2026
@datadog-official

This comment has been minimized.

@pr-commenter

pr-commenter Bot commented Jun 6, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-30 00:44:36

Comparing candidate commit 4e92d47 in PR branch brian.marks/omit-sensitive-config-telemetry with baseline commit 7bdf71e in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 1 performance regressions! Performance is the same for 71 metrics, 0 unstable metrics, 63 known flaky benchmarks, 63 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 [-26893.060op/s; -23267.642op/s] or [-7.574%; -6.553%]

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.ActivityBenchmark.StartSpan_SetStatus_Sampled net472

  • 🟩 throughput [+10036.288op/s; +10923.325op/s] or [+5.040%; +5.485%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1

  • unstable execution_time [-31.986ms; -9.548ms] or [-15.933%; -4.756%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-9660.601op/s; -9146.455op/s] or [-11.455%; -10.845%]

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

  • 🟥 throughput [-10663.072op/s; -9280.499op/s] or [-10.842%; -9.436%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+299.333ms; +301.052ms] or [+148.539%; +149.393%]
  • 🟥 throughput [-47.380op/s; -43.700op/s] or [-8.525%; -7.862%]

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

  • 🟥 execution_time [+381.026ms; +384.773ms] or [+301.034%; +303.994%]
  • 🟩 throughput [+86.515op/s; +92.731op/s] or [+11.407%; +12.226%]

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

  • 🟥 execution_time [+391.920ms; +393.079ms] or [+346.834%; +347.860%]

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

  • 🟥 allocated_mem [+4.693KB; +4.694KB] or [+98.806%; +98.821%]
  • 🟥 throughput [-60949.911op/s; -60575.418op/s] or [-47.422%; -47.131%]

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

  • 🟥 allocated_mem [+3.816KB; +3.816KB] or [+80.699%; +80.711%]
  • 🟩 execution_time [-16.280ms; -12.099ms] or [-7.603%; -5.651%]
  • 🟥 throughput [-59606.920op/s; -56840.784op/s] or [-43.510%; -41.491%]

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

  • 🟥 allocated_mem [+4.544KB; +4.544KB] or [+98.261%; +98.274%]
  • 🟥 throughput [-48406.118op/s; -46161.085op/s] or [-43.765%; -41.735%]

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

  • 🟥 allocated_mem [+1.315KB; +1.315KB] or [+106.388%; +106.404%]
  • 🟥 throughput [-262613.069op/s; -258133.477op/s] or [-26.814%; -26.357%]

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

  • 🟥 allocated_mem [+479 bytes; +480 bytes] or [+39.212%; +39.221%]
  • 🟩 execution_time [-26.690ms; -21.830ms] or [-11.903%; -9.735%]
  • 🟥 throughput [-78107.419op/s; -53289.040op/s] or [-8.344%; -5.693%]

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

  • 🟥 allocated_mem [+1.280KB; +1.280KB] or [+105.947%; +105.963%]
  • 🟥 throughput [-151658.794op/s; -135474.078op/s] or [-21.790%; -19.465%]

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

  • 🟥 allocated_mem [+3.378KB; +3.378KB] or [+89.003%; +89.017%]
  • 🟥 throughput [-73237.711op/s; -72391.433op/s] or [-49.288%; -48.719%]

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

  • 🟥 allocated_mem [+3.336KB; +3.336KB] or [+88.150%; +88.161%]
  • 🟥 throughput [-72493.776op/s; -69604.468op/s] or [-46.127%; -44.288%]

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

  • 🟥 allocated_mem [+3.264KB; +3.264KB] or [+88.493%; +88.506%]
  • 🟥 throughput [-56207.715op/s; -53585.060op/s] or [-44.777%; -42.687%]

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

  • 🟩 throughput [+230370.957op/s; +264792.827op/s] or [+7.682%; +8.829%]

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

  • 🟩 execution_time [-19.306ms; -14.975ms] or [-8.900%; -6.903%]

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

  • 🟥 execution_time [+300.013ms; +301.006ms] or [+149.906%; +150.403%]

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

  • 🟥 execution_time [+298.144ms; +302.377ms] or [+150.355%; +152.489%]

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

  • 🟥 execution_time [+299.645ms; +317.652ms] or [+150.938%; +160.009%]

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

  • 🟥 execution_time [+295.872ms; +297.046ms] or [+145.320%; +145.897%]

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

  • 🟥 execution_time [+296.937ms; +301.257ms] or [+145.161%; +147.273%]

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

  • 🟥 execution_time [+301.133ms; +303.802ms] or [+150.506%; +151.840%]

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

  • 🟥 execution_time [+22.103µs; +45.766µs] or [+7.056%; +14.611%]
  • 🟥 throughput [-426.501op/s; -227.386op/s] or [-13.295%; -7.088%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.673ms; +300.353ms] or [+149.568%; +149.907%]

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

  • unstable execution_time [+321.663ms; +389.161ms] or [+349.500%; +422.839%]
  • 🟩 throughput [+668.605op/s; +900.861op/s] or [+5.494%; +7.403%]

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

  • unstable execution_time [+219.595ms; +276.716ms] or [+166.736%; +210.108%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+296.975ms; +332.383ms] or [+136.546%; +152.827%]
  • 🟥 throughput [-595.379op/s; -532.192op/s] or [-53.947%; -48.222%]

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

  • unstable execution_time [+152.391ms; +298.880ms] or [+64.942%; +127.370%]
  • 🟥 throughput [-673.186op/s; -589.628op/s] or [-44.902%; -39.328%]

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

  • 🟥 execution_time [+332.456ms; +339.589ms] or [+198.847%; +203.113%]
  • 🟥 throughput [-366.167op/s; -330.507op/s] or [-25.496%; -23.013%]

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

  • unstable throughput [-2.741op/s; +97.488op/s] or [-0.512%; +18.197%]

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

  • 🟩 execution_time [-147.723µs; -108.610µs] or [-7.483%; -5.502%]
  • 🟩 throughput [+30.404op/s; +41.418op/s] or [+6.002%; +8.176%]

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

  • unstable throughput [+5.002op/s; +33.557op/s] or [+1.972%; +13.233%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+301.249ms; +303.157ms] or [+151.703%; +152.664%]

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

  • 🟥 execution_time [+301.574ms; +304.061ms] or [+151.119%; +152.365%]

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

  • 🟥 execution_time [+300.298ms; +303.541ms] or [+150.857%; +152.486%]
  • 🟩 throughput [+26678.994op/s; +33898.985op/s] or [+5.620%; +7.141%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+305.360ms; +306.639ms] or [+153.342%; +153.984%]

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

  • unstable execution_time [+263.770ms; +293.319ms] or [+130.423%; +145.033%]

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

  • 🟥 execution_time [+303.816ms; +308.547ms] or [+153.987%; +156.385%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+302.602ms; +305.870ms] or [+151.879%; +153.519%]

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

  • 🟥 execution_time [+298.072ms; +303.393ms] or [+148.562%; +151.213%]
  • 🟩 throughput [+41484.405op/s; +48029.534op/s] or [+8.237%; +9.537%]

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

  • 🟥 execution_time [+299.193ms; +302.624ms] or [+148.846%; +150.553%]

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

  • 🟩 execution_time [-16.196ms; -12.477ms] or [-7.531%; -5.802%]

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

  • unstable execution_time [+23.492µs; +68.870µs] or [+5.803%; +17.011%]
  • 🟥 throughput [-354.839op/s; -134.124op/s] or [-14.279%; -5.397%]

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

  • 🟩 allocated_mem [-19.511KB; -19.489KB] or [-7.117%; -7.109%]
  • unstable execution_time [-36.508µs; +23.039µs] or [-7.216%; +4.554%]
  • unstable throughput [-75.534op/s; +136.440op/s] or [-3.769%; +6.808%]

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

  • unstable execution_time [-59.420µs; +2.515µs] or [-10.297%; +0.436%]

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

  • 🟥 execution_time [+7.482µs; +11.569µs] or [+17.684%; +27.346%]
  • 🟥 throughput [-5255.022op/s; -3442.868op/s] or [-22.122%; -14.493%]

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

  • unstable execution_time [-13.074µs; -5.136µs] or [-20.284%; -7.968%]
  • unstable throughput [+1211.220op/s; +2931.404op/s] or [+7.431%; +17.985%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.680ms; +303.848ms] or [+152.991%; +153.582%]

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

  • 🟥 execution_time [+300.617ms; +303.341ms] or [+153.013%; +154.399%]

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

  • 🟥 execution_time [+301.727ms; +305.261ms] or [+151.052%; +152.821%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+299.966ms; +302.206ms] or [+149.506%; +150.622%]

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

  • 🟥 execution_time [+302.785ms; +304.896ms] or [+152.044%; +153.104%]

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

  • 🟥 execution_time [+304.657ms; +307.005ms] or [+154.502%; +155.693%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.853ms; +300.546ms] or [+149.568%; +149.914%]
  • 🟩 throughput [+61151942.898op/s; +61476464.452op/s] or [+44.535%; +44.771%]

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

  • 🟥 execution_time [+422.846ms; +426.496ms] or [+525.884%; +530.424%]

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

  • 🟥 execution_time [+299.513ms; +300.498ms] or [+149.390%; +149.882%]

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

  • 🟩 throughput [+73684.298op/s; +81117.333op/s] or [+6.880%; +7.574%]

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

  • 🟩 throughput [+73474.011op/s; +81376.531op/s] or [+7.297%; +8.082%]

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

  • 🟩 throughput [+36756.021op/s; +48400.054op/s] or [+6.674%; +8.789%]

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

  • 🟩 throughput [+24733.916op/s; +34339.067op/s] or [+5.536%; +7.686%]

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

  • 🟩 throughput [+64355.801op/s; +83034.469op/s] or [+7.190%; +9.277%]

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 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_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.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.OriginalCharSlice net472
  • 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.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 netcoreapp3.1

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Jun 6, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8763) 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
duration72.35 ± (72.51 - 73.06) ms70.69 ± (71.00 - 71.50) ms-2.3%
.NET Framework 4.8 - Bailout
duration78.79 ± (78.59 - 79.08) ms78.42 ± (78.10 - 78.55) ms-0.5%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1101.75 ± (1102.48 - 1111.11) ms1082.54 ± (1083.66 - 1090.83) ms-1.7%
.NET Core 3.1 - Baseline
process.internal_duration_ms22.53 ± (22.48 - 22.59) ms22.27 ± (22.23 - 22.30) ms-1.2%
process.time_to_main_ms85.54 ± (85.27 - 85.81) ms83.64 ± (83.35 - 83.93) ms-2.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed11.02 ± (11.01 - 11.02) MB10.98 ± (10.97 - 10.98) MB-0.4%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.16 ± (22.13 - 22.19) ms22.15 ± (22.11 - 22.19) ms-0.0%
process.time_to_main_ms83.84 ± (83.66 - 84.02) ms84.26 ± (84.02 - 84.51) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed11.05 ± (11.05 - 11.05) MB11.01 ± (11.01 - 11.02) MB-0.3%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms210.40 ± (209.46 - 211.35) ms209.03 ± (208.13 - 209.92) ms-0.7%
process.time_to_main_ms540.87 ± (539.47 - 542.27) ms536.48 ± (535.34 - 537.62) ms-0.8%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.56 ± (49.53 - 49.60) MB49.50 ± (49.46 - 49.53) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.1%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.01 ± (20.98 - 21.05) ms21.26 ± (21.22 - 21.31) ms+1.2%✅⬆️
process.time_to_main_ms72.73 ± (72.48 - 72.98) ms73.86 ± (73.62 - 74.10) ms+1.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.74 ± (10.74 - 10.74) MB10.72 ± (10.71 - 10.72) MB-0.2%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.90 ± (20.87 - 20.93) ms20.88 ± (20.85 - 20.90) ms-0.1%
process.time_to_main_ms72.58 ± (72.43 - 72.73) ms72.59 ± (72.42 - 72.75) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.86 ± (10.85 - 10.86) MB10.83 ± (10.83 - 10.84) MB-0.2%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms370.63 ± (368.56 - 372.71) ms369.42 ± (367.45 - 371.39) ms-0.3%
process.time_to_main_ms546.05 ± (544.87 - 547.23) ms543.15 ± (542.01 - 544.29) ms-0.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.67 ± (50.65 - 50.69) MB50.49 ± (50.47 - 50.52) MB-0.4%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 8 - Baseline
process.internal_duration_ms19.38 ± (19.34 - 19.43) ms19.08 ± (19.05 - 19.11) ms-1.6%
process.time_to_main_ms73.13 ± (72.84 - 73.43) ms71.07 ± (70.87 - 71.27) ms-2.8%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.76 ± (7.75 - 7.76) MB7.75 ± (7.74 - 7.75) MB-0.1%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.28 ± (19.24 - 19.31) ms19.17 ± (19.13 - 19.20) ms-0.6%
process.time_to_main_ms74.07 ± (73.83 - 74.30) ms73.71 ± (73.49 - 73.93) ms-0.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.82 ± (7.81 - 7.82) MB7.80 ± (7.79 - 7.80) MB-0.2%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms297.52 ± (295.38 - 299.67) ms297.68 ± (295.40 - 299.97) ms+0.1%✅⬆️
process.time_to_main_ms494.78 ± (493.65 - 495.91) ms492.71 ± (491.81 - 493.60) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed38.08 ± (38.05 - 38.11) MB37.91 ± (37.88 - 37.94) MB-0.4%
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.0%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration213.84 ± (213.80 - 214.72) ms191.91 ± (191.86 - 192.57) ms-10.3%
.NET Framework 4.8 - Bailout
duration217.76 ± (217.56 - 218.26) ms196.40 ± (196.21 - 196.68) ms-9.8%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1285.39 ± (1284.58 - 1291.94) ms1170.42 ± (1170.96 - 1176.71) ms-8.9%
.NET Core 3.1 - Baseline
process.internal_duration_ms206.02 ± (205.51 - 206.53) ms184.10 ± (183.86 - 184.34) ms-10.6%
process.time_to_main_ms91.54 ± (91.26 - 91.82) ms80.55 ± (80.40 - 80.70) ms-12.0%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.14 ± (16.12 - 16.15) MB16.30 ± (16.27 - 16.33) MB+1.0%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)19 ± (19 - 20)-2.4%
.NET Core 3.1 - Bailout
process.internal_duration_ms204.11 ± (203.68 - 204.53) ms183.42 ± (183.16 - 183.68) ms-10.1%
process.time_to_main_ms92.09 ± (91.80 - 92.38) ms81.86 ± (81.75 - 81.98) ms-11.1%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.20 ± (16.18 - 16.22) MB16.16 ± (16.03 - 16.28) MB-0.3%
runtime.dotnet.threads.count21 ± (21 - 21)20 ± (20 - 20)-3.6%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms404.94 ± (403.48 - 406.41) ms373.44 ± (372.31 - 374.57) ms-7.8%
process.time_to_main_ms574.71 ± (573.25 - 576.18) ms525.79 ± (524.93 - 526.66) ms-8.5%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed59.85 ± (59.78 - 59.91) MB57.99 ± (57.93 - 58.06) MB-3.1%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-1.3%
.NET 6 - Baseline
process.internal_duration_ms212.01 ± (211.52 - 212.51) ms188.48 ± (188.22 - 188.73) ms-11.1%
process.time_to_main_ms81.02 ± (80.71 - 81.34) ms70.45 ± (70.30 - 70.60) ms-13.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.44 ± (16.42 - 16.46) MB16.15 ± (15.97 - 16.32) MB-1.8%
runtime.dotnet.threads.count20 ± (19 - 20)18 ± (17 - 18)-9.6%
.NET 6 - Bailout
process.internal_duration_ms211.31 ± (210.85 - 211.77) ms187.35 ± (187.16 - 187.55) ms-11.3%
process.time_to_main_ms82.11 ± (81.83 - 82.39) ms71.47 ± (71.41 - 71.54) ms-13.0%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.46 ± (16.44 - 16.48) MB15.76 ± (15.58 - 15.94) MB-4.3%
runtime.dotnet.threads.count20 ± (20 - 21)18 ± (18 - 19)-9.8%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms581.52 ± (579.12 - 583.92) ms583.51 ± (580.84 - 586.18) ms+0.3%✅⬆️
process.time_to_main_ms589.36 ± (588.09 - 590.63) ms534.65 ± (533.67 - 535.62) ms-9.3%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.70 ± (61.60 - 61.80) MB61.59 ± (61.54 - 61.65) MB-0.2%
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)+0.5%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms212.16 ± (211.69 - 212.64) ms186.70 ± (186.50 - 186.91) ms-12.0%
process.time_to_main_ms79.85 ± (79.60 - 80.10) ms69.70 ± (69.55 - 69.84) ms-12.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.80 ± (11.78 - 11.83) MB11.97 ± (11.91 - 12.04) MB+1.4%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)18 ± (17 - 18)-7.0%
.NET 8 - Bailout
process.internal_duration_ms211.78 ± (211.30 - 212.26) ms185.90 ± (185.73 - 186.07) ms-12.2%
process.time_to_main_ms81.62 ± (81.40 - 81.84) ms71.06 ± (70.99 - 71.14) ms-12.9%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.77 ± (11.75 - 11.80) MB11.78 ± (11.68 - 11.88) MB+0.1%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)19 ± (18 - 19)-7.4%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms525.53 ± (519.01 - 532.04) ms510.66 ± (508.10 - 513.23) ms-2.8%
process.time_to_main_ms540.99 ± (540.05 - 541.92) ms484.66 ± (484.01 - 485.31) ms-10.4%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed51.45 ± (51.38 - 51.52) MB51.39 ± (51.35 - 51.42) MB-0.1%
runtime.dotnet.threads.count30 ± (30 - 30)29 ± (29 - 29)-2.3%
Comparison explanation

Execution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

Duration charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8763) - mean (71ms)  : 68, 75
    master - mean (73ms)  : 69, 77

    section Bailout
    This PR (8763) - mean (78ms)  : 75, 82
    master - mean (79ms)  : 75, 82

    section CallTarget+Inlining+NGEN
    This PR (8763) - mean (1,087ms)  : 1035, 1140
    master - mean (1,107ms)  : 1045, 1168

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 (8763) - mean (112ms)  : 107, 118
    master - mean (115ms)  : 109, 122

    section Bailout
    This PR (8763) - mean (113ms)  : 108, 118
    master - mean (113ms)  : 109, 117

    section CallTarget+Inlining+NGEN
    This PR (8763) - mean (782ms)  : 761, 803
    master - mean (790ms)  : 770, 810

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8763) - mean (102ms)  : 97, 106
    master - mean (100ms)  : 95, 105

    section Bailout
    This PR (8763) - mean (99ms)  : 95, 103
    master - mean (100ms)  : 97, 102

    section CallTarget+Inlining+NGEN
    This PR (8763) - mean (941ms)  : 905, 978
    master - mean (956ms)  : 916, 996

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8763) - mean (97ms)  : 93, 102
    master - mean (100ms)  : 94, 106

    section Bailout
    This PR (8763) - mean (100ms)  : 97, 104
    master - mean (101ms)  : 97, 105

    section CallTarget+Inlining+NGEN
    This PR (8763) - mean (820ms)  : 787, 853
    master - mean (823ms)  : 785, 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 (8763) - mean (192ms)  : 189, 196
    master - mean (214ms)  : 209, 220

    section Bailout
    This PR (8763) - mean (196ms)  : 194, 199
    master - mean (218ms)  : 215, 221

    section CallTarget+Inlining+NGEN
    This PR (8763) - mean (1,174ms)  : 1132, 1215
    master - mean (1,288ms)  : 1235, 1341

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 (8763) - mean (273ms)  : 270, 277
    master - mean (308ms)  : 302, 314

    section Bailout
    This PR (8763) - mean (274ms)  : 271, 277
    master - mean (307ms)  : 300, 313

    section CallTarget+Inlining+NGEN
    This PR (8763) - mean (941ms)  : 925, 957
    master - mean (1,023ms)  : 1000, 1046

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8763) - mean (268ms)  : 264, 271
    master - mean (303ms)  : 295, 312

    section Bailout
    This PR (8763) - mean (267ms)  : 265, 270
    master - mean (304ms)  : 294, 313

    section CallTarget+Inlining+NGEN
    This PR (8763) - mean (1,147ms)  : 1110, 1184
    master - mean (1,214ms)  : 1178, 1251

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8763) - mean (266ms)  : 262, 270
    master - mean (303ms)  : 295, 311

    section Bailout
    This PR (8763) - mean (266ms)  : 264, 269
    master - mean (304ms)  : 297, 312

    section CallTarget+Inlining+NGEN
    This PR (8763) - mean (1,026ms)  : 972, 1080
    master - mean (1,110ms)  : 1018, 1201

Loading

@bm1549
bm1549 force-pushed the brian.marks/omit-sensitive-config-telemetry branch from d3df1fa to ca91b50 Compare June 8, 2026 21:39
@bm1549
bm1549 marked this pull request as ready for review June 9, 2026 21:33
@bm1549
bm1549 requested a review from a team as a code owner June 9, 2026 21:33

@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: ca91b501da

ℹ️ 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/src/Datadog.Trace/Configuration/TracerSettings.cs Outdated
@bm1549
bm1549 requested a review from a team as a code owner June 10, 2026 20:44
@bm1549
bm1549 force-pushed the brian.marks/omit-sensitive-config-telemetry branch from 9bbc976 to fa2afe1 Compare June 17, 2026 01:14
bm1549 and others added 6 commits July 29, 2026 18:03
…lemetry

Redact the OTEL_EXPORTER_OTLP_HEADERS family (base, METRICS, TRACES, LOGS)
in instrumentation configuration telemetry. The values are now recorded as
<redacted> in the configuration array of app-started and
app-client-configuration-change events.

- Switch the OTLP header reads in ExporterSettings to AsRedactedString().
- Add AsRedactedDictionaryResult and thread a recordValue flag through the
  dictionary configuration sources so the OTLP metrics/logs header reads in
  TracerSettings are recorded as redacted.
- Mark the four OTLP header variants with sensitive: true in
  supported-configurations.yaml and accept the attribute in the YAML reader.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… flag

Capture the `sensitive` flag from supported-configurations.yaml through the
source generator and emit a generated ConfigurationKeys.SensitiveKeys set
(keys plus their aliases). ConfigurationTelemetry.Record gates recordValue on
this set so a sensitive config's value is redacted regardless of the call site.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
After rebasing onto master (which added scope to ConfigurationEntry),
the Aliases property changed type from string[]? to EquatableArray<string>.
Call .AsArray() to convert when constructing ConfigEntry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bm1549
bm1549 force-pushed the brian.marks/omit-sensitive-config-telemetry branch from 96d2e66 to 4e92d47 Compare July 29, 2026 23:56
@bm1549
bm1549 requested a review from andrewlock July 30, 2026 14:39

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

I'm thinking out loud as to whether this is the best approach 🤔 With this PR, we're adding an IsSensitive() lookup to every configuration read, on the startup hot path... We already have a mechanism for redacting keys (record: false) so it feels like the extra lookup is somewhat redundant.

I'm wondering if we can take a slightly different approach, building on the analyzers that we already have and also ensuring that we mark all our other sensitive keys as sensitive 🤔

I'm thinking:

  • Keep the sensitive: true annotation in supported-configurations.yaml
  • Add/extend the config analyzers to ensure that any keys marked as sensitive are only called with record: false (this is the tricky bit)

That would have the advantage of shifting the check cost to compile time instead of runtime. Without digging into it, I'm not quite sure how easy it would be, but I think it's worth exploring to solve this optimally.

In the mean time, we can simply set record: false for these 4 config keys, which is a tiny PR we can merge ASAP 🙂

Comment on lines +20 to +32
/// <summary>
/// The set of configuration keys (including aliases) marked <c>sensitive</c> in
/// supported-configurations.yaml. Telemetry redacts the value of any key in this set.
/// </summary>
private static readonly HashSet<string> SensitiveKeys = new()
{
"OTEL_EXPORTER_OTLP_HEADERS",
"OTEL_EXPORTER_OTLP_LOGS_HEADERS",
"OTEL_EXPORTER_OTLP_METRICS_HEADERS",
"OTEL_EXPORTER_OTLP_TRACES_HEADERS",
};

public static bool IsSensitive(string key) => SensitiveKeys.Contains(key);

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.

Given there's only 4 keys here, and that this is on the hotpath for all configurations now, this code should probably avoid the overhead of a hashset and be written like this:

Suggested change
/// <summary>
/// The set of configuration keys (including aliases) marked <c>sensitive</c> in
/// supported-configurations.yaml. Telemetry redacts the value of any key in this set.
/// </summary>
private static readonly HashSet<string> SensitiveKeys = new()
{
"OTEL_EXPORTER_OTLP_HEADERS",
"OTEL_EXPORTER_OTLP_LOGS_HEADERS",
"OTEL_EXPORTER_OTLP_METRICS_HEADERS",
"OTEL_EXPORTER_OTLP_TRACES_HEADERS",
};
public static bool IsSensitive(string key) => SensitiveKeys.Contains(key);
public static bool IsSensitive(string key) =>
key is
"OTEL_EXPORTER_OTLP_HEADERS" or
"OTEL_EXPORTER_OTLP_LOGS_HEADERS" or
"OTEL_EXPORTER_OTLP_METRICS_HEADERS" or
"OTEL_EXPORTER_OTLP_TRACES_HEADERS";

Or maybe even

public static bool IsSensitive(string key) => key.Length switch
    {
        26 => key == "OTEL_EXPORTER_OTLP_HEADERS",
        31 => key == "OTEL_EXPORTER_OTLP_LOGS_HEADERS",
        34 => key == "OTEL_EXPORTER_OTLP_METRICS_HEADERS",
        33 => key == "OTEL_EXPORTER_OTLP_TRACES_HEADERS",
        _ => false,
    };

(depending on benchmarking)

Comment on lines +125 to +142
[Fact]
public void PublicDictionaryApiRetainsFiveArgumentOverload()
{
var parameterTypes = new[]
{
typeof(string),
typeof(IConfigurationTelemetry),
typeof(Func<IDictionary<string, string>, bool>),
typeof(bool),
typeof(char),
};

typeof(IConfigurationSource)
.GetMethod(nameof(IConfigurationSource.GetDictionary), parameterTypes)
.Should()
.NotBeNull();
}

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.

This is unnecessary, shall we write a test for every unchanged API? 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants