Skip to content

Report OTLP export status in tracer startup log - #8936

Open
bm1549 wants to merge 6 commits into
masterfrom
brian.marks/otlp-export-startup-log
Open

bm1549 wants to merge 6 commits into
masterfrom
brian.marks/otlp-export-startup-log

Conversation

@bm1549

@bm1549 bm1549 commented Jul 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary of changes

Adds otlp_traces_export_enabled, otlp_metrics_export_enabled, and otlp_logs_export_enabled to the DATADOG TRACER CONFIGURATION startup log.

Reason for change

The cross-tracer startup-log schema now reports whether each signal is exported with OTLP.

Implementation details

The trace field uses ExporterSettings.IsOtlpTraceExport. Metrics use a shared, target-aware OtlpMetricsExportEnabled setting for both pipeline startup and diagnostics. Logs use the effective OpenTelemetryLogsEnabled setting and report false on unsupported target frameworks.

Test coverage

  • Added target-aware unit tests for the effective metrics and logs exporter settings.
  • Added a focused diagnostic JSON writer test with each signal independently enabled. The test does not initialize the exporters.
  • Ran the affected unit tests on .NET 10: 418 passed.

Other details

Related system-tests coverage: DataDog/system-tests#7376

@pr-commenter

pr-commenter Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-30 16:09:04

Comparing candidate commit dccbbd8 in PR branch brian.marks/otlp-export-startup-log with baseline commit db340bf in branch master.

📊 Benchmarking dashboard

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

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 [-9303.223op/s; -8747.101op/s] or [-11.031%; -10.371%]

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

  • 🟥 throughput [-9391.721op/s; -8269.088op/s] or [-9.549%; -8.408%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+303.092ms; +305.253ms] or [+150.405%; +151.477%]
  • 🟥 throughput [-51.496op/s; -47.594op/s] or [-9.265%; -8.563%]

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

  • 🟥 execution_time [+383.118ms; +385.053ms] or [+302.687%; +304.215%]
  • 🟩 throughput [+85.924op/s; +89.171op/s] or [+11.329%; +11.757%]

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

  • 🟥 execution_time [+392.032ms; +394.106ms] or [+346.933%; +348.769%]

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

  • 🟥 allocated_mem [+4.693KB; +4.694KB] or [+98.806%; +98.821%]
  • 🟥 throughput [-59810.724op/s; -59435.516op/s] or [-46.536%; -46.244%]

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

  • 🟥 allocated_mem [+3.816KB; +3.816KB] or [+80.699%; +80.711%]
  • 🟩 execution_time [-16.260ms; -12.072ms] or [-7.594%; -5.638%]
  • 🟥 throughput [-59444.469op/s; -56675.868op/s] or [-43.391%; -41.370%]

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

  • 🟥 allocated_mem [+4.544KB; +4.544KB] or [+98.261%; +98.274%]
  • 🟥 throughput [-49588.730op/s; -46587.096op/s] or [-44.834%; -42.120%]

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

  • 🟥 allocated_mem [+1.315KB; +1.315KB] or [+106.388%; +106.404%]
  • 🟥 throughput [-268326.168op/s; -261461.398op/s] or [-27.397%; -26.696%]

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

  • 🟥 allocated_mem [+479 bytes; +480 bytes] or [+39.212%; +39.221%]
  • 🟩 execution_time [-27.110ms; -15.990ms] or [-12.090%; -7.131%]

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

  • 🟥 allocated_mem [+1.280KB; +1.280KB] or [+105.947%; +105.963%]
  • 🟥 throughput [-155209.885op/s; -138981.224op/s] or [-22.301%; -19.969%]

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

  • 🟥 allocated_mem [+3.378KB; +3.378KB] or [+89.003%; +89.017%]
  • 🟥 throughput [-72502.215op/s; -71734.671op/s] or [-48.793%; -48.277%]

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

  • 🟥 allocated_mem [+3.336KB; +3.336KB] or [+88.150%; +88.161%]
  • 🟥 throughput [-72953.062op/s; -70067.381op/s] or [-46.419%; -44.583%]

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

  • 🟥 allocated_mem [+3.264KB; +3.264KB] or [+88.493%; +88.506%]
  • 🟥 throughput [-56029.010op/s; -53416.430op/s] or [-44.634%; -42.553%]

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

  • 🟩 throughput [+322215.435op/s; +339855.519op/s] or [+10.744%; +11.332%]

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

  • 🟩 execution_time [-19.135ms; -14.802ms] or [-8.820%; -6.823%]

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

  • 🟥 execution_time [+300.356ms; +301.034ms] or [+150.078%; +150.416%]

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

  • 🟥 execution_time [+299.770ms; +303.155ms] or [+151.175%; +152.882%]

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

  • 🟥 execution_time [+299.372ms; +301.869ms] or [+150.800%; +152.058%]

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

  • 🟥 execution_time [+297.312ms; +298.720ms] or [+146.028%; +146.719%]

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

  • 🟥 execution_time [+291.488ms; +293.267ms] or [+142.498%; +143.367%]

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

  • 🟥 execution_time [+299.340ms; +301.425ms] or [+149.610%; +150.652%]

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

  • 🟥 execution_time [+24.341µs; +48.024µs] or [+7.771%; +15.332%]
  • 🟥 throughput [-445.030op/s; -245.807op/s] or [-13.873%; -7.663%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.134ms; +299.911ms] or [+149.299%; +149.686%]

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

  • unstable execution_time [+245.671ms; +333.353ms] or [+266.932%; +362.202%]
  • 🟩 throughput [+672.647op/s; +931.287op/s] or [+5.527%; +7.653%]

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

  • unstable execution_time [+321.843ms; +357.940ms] or [+244.372%; +271.781%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+328.039ms; +375.695ms] or [+150.829%; +172.741%]
  • 🟥 throughput [-527.195op/s; -477.430op/s] or [-47.769%; -43.260%]

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

  • unstable execution_time [+206.020ms; +339.271ms] or [+87.797%; +144.583%]
  • 🟥 throughput [-670.524op/s; -587.037op/s] or [-44.724%; -39.156%]

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

  • 🟥 execution_time [+352.509ms; +368.349ms] or [+210.841%; +220.316%]
  • 🟥 throughput [-416.488op/s; -378.200op/s] or [-28.999%; -26.333%]

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

  • 🟩 execution_time [-187.721µs; -137.276µs] or [-9.509%; -6.954%]
  • 🟩 throughput [+39.997op/s; +53.219op/s] or [+7.896%; +10.506%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+301.507ms; +302.793ms] or [+151.833%; +152.481%]

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

  • 🟥 execution_time [+299.609ms; +302.544ms] or [+150.135%; +151.605%]

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

  • 🟥 execution_time [+301.252ms; +304.783ms] or [+151.336%; +153.110%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+300.289ms; +302.011ms] or [+150.795%; +151.660%]

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

  • 🟥 execution_time [+300.056ms; +301.815ms] or [+148.364%; +149.234%]

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

  • 🟥 execution_time [+303.140ms; +307.235ms] or [+153.645%; +155.720%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+299.693ms; +301.272ms] or [+150.419%; +151.211%]

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

  • 🟥 execution_time [+301.049ms; +303.841ms] or [+150.046%; +151.437%]
  • 🟩 throughput [+47924.899op/s; +53949.086op/s] or [+9.516%; +10.713%]

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

  • 🟥 execution_time [+298.262ms; +300.957ms] or [+148.383%; +149.723%]

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

  • 🟩 execution_time [-16.773ms; -13.091ms] or [-7.800%; -6.087%]
  • 🟩 throughput [+26101.792op/s; +33174.410op/s] or [+7.160%; +9.101%]

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

  • unstable execution_time [+17.461µs; +66.009µs] or [+4.313%; +16.305%]

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

  • 🟩 allocated_mem [-18.124KB; -18.101KB] or [-6.611%; -6.603%]
  • unstable execution_time [-8.779µs; +48.138µs] or [-1.735%; +9.514%]

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

  • unstable execution_time [-58.616µs; +0.971µs] or [-10.158%; +0.168%]

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

  • unstable execution_time [+9.389µs; +15.078µs] or [+22.192%; +35.639%]
  • 🟥 throughput [-6114.806op/s; -4093.566op/s] or [-25.741%; -17.233%]

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

  • unstable execution_time [-14.257µs; -6.501µs] or [-22.119%; -10.086%]
  • unstable throughput [+1630.926op/s; +3281.142op/s] or [+10.006%; +20.131%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+303.210ms; +304.820ms] or [+153.259%; +154.073%]

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

  • 🟥 execution_time [+302.761ms; +306.334ms] or [+154.104%; +155.923%]

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

  • 🟥 execution_time [+297.853ms; +300.174ms] or [+149.112%; +150.274%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472

  • 🟥 throughput [-26405.827op/s; -24859.738op/s] or [-7.310%; -6.882%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+299.836ms; +301.774ms] or [+149.441%; +150.407%]

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

  • 🟥 execution_time [+301.236ms; +303.061ms] or [+151.267%; +152.183%]

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

  • 🟥 execution_time [+301.133ms; +304.479ms] or [+152.715%; +154.412%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.530ms; +301.574ms] or [+149.906%; +150.427%]
  • 🟩 throughput [+66116910.559op/s; +66498544.135op/s] or [+48.150%; +48.428%]

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

  • 🟥 execution_time [+413.655ms; +418.017ms] or [+514.453%; +519.878%]

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

  • 🟥 execution_time [+299.631ms; +300.739ms] or [+149.449%; +150.002%]
  • 🟩 throughput [+18265512.688op/s; +19257607.503op/s] or [+8.090%; +8.530%]

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

  • 🟩 throughput [+75280.227op/s; +89024.947op/s] or [+7.029%; +8.312%]

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

  • 🟩 throughput [+73046.166op/s; +104365.832op/s] or [+5.654%; +8.078%]

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

  • 🟩 throughput [+74858.821op/s; +82005.467op/s] or [+7.435%; +8.144%]

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

  • 🟩 throughput [+45868.906op/s; +51627.492op/s] or [+8.329%; +9.375%]

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

  • 🟩 throughput [+59692.780op/s; +77612.156op/s] or [+6.669%; +8.671%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.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.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

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8936) and master.

✅ No regressions detected

📄 View the full report (charts + all metrics) →

Comment thread tracer/src/Datadog.Trace/Agent/TracesEncodingExtensions.cs Outdated
bm1549 and others added 5 commits July 29, 2026 18:03
Emit otlp_traces_export_enabled, otlp_metrics_export_enabled, and
otlp_logs_export_enabled booleans in the DATADOG TRACER CONFIGURATION
startup log, aligning the .NET tracer with the shared cross-tracer
diagnostic-log schema.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bm1549
bm1549 force-pushed the brian.marks/otlp-export-startup-log branch from a50aa5f to e0e537d Compare July 29, 2026 23:56
gh-worker-dd-mergequeue-cf854d Bot pushed a commit to DataDog/dd-trace-go that referenced this pull request Aug 4, 2026
### What does this PR do?

Adds three boolean fields to the `DATADOG TRACER CONFIGURATION` startup log:

- `otlp_traces_export_enabled` reports whether the tracer selected the OTLP trace writer.
- `otlp_metrics_export_enabled` reports whether the tracer will start OTel runtime metrics.
- `otlp_logs_export_enabled` reports whether OTel logs are enabled in the tracer configuration.

Updates the startup-log expectations, clears the OTLP-related environment variables in `TestStartupLog`, and tests the metrics startup gate with and without the OTel metrics hook installed.

### Motivation

Part of the cross-tracer work to use the same OTLP export-status fields in each tracer's startup diagnostics. The fields show which signals a service exports over OTLP.

Related PRs:

- dd-trace-js: DataDog/dd-trace-js#9517
- dd-trace-py: DataDog/dd-trace-py#19265
- dd-trace-java: DataDog/dd-trace-java#12062
- dd-trace-dotnet: DataDog/dd-trace-dotnet#8936
- dd-trace-rb: DataDog/dd-trace-rb#6096
- dd-trace-php: DataDog/dd-trace-php#4056
- system-tests: DataDog/system-tests#7376
- dd-trace-py OTLP logs fix: DataDog/dd-trace-py#19266

### Reviewer's Checklist

- [x] Changed code has unit tests for its functionality at or near 100% coverage.
- [ ] [System-Tests](https://github.com/DataDog/system-tests/) covering this feature have been added and enabled with the va.b.c-dev version tag. (N/A: startup diagnostic-log fields only.)
- [ ] There is a benchmark for any new code, or changes to existing code. (N/A: no hot-path or performance-sensitive code.)
- [ ] If this interacts with the agent in a new way, a system test has been added. (N/A: no new agent interaction.)
- [ ] New code is free of linting errors. You can check this by running `make lint` locally. (Full lint not run; `gofmt` and `git diff --check` are clean.)
- [x] New code doesn't break existing tests. You can check this by running `make test` locally. (`go test ./ddtrace/tracer -count=1` passes.)
- [ ] Add an appropriate team label so this PR gets put in the right place for the release notes.
- [ ] All generated files are up to date. You can check this by running `make generate` locally. (N/A: no generated files changed.)
- [ ] Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild. Make sure all nested modules are up to date by running `make fix-modules` locally. (N/A: no module changes.)


Co-authored-by: dario.castane <dario.castane@datadoghq.com>
@bm1549
bm1549 marked this pull request as ready for review August 12, 2026 20:19
@bm1549
bm1549 requested review from a team as code owners August 12, 2026 20:19
@bm1549
bm1549 requested a review from andrewlock August 27, 2026 21:52
OpenTelemetryLogsEnabled = OpenTelemetryLogsEnabled && OtelLogsExporterEnabled;
#else
OpenTelemetryLogsEnabled = false;
#endif

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.

We probably shouldn't do this, as this bypases all the telemetry. It also makes doing all the above work kind of pointless if we're never going to even use the values? 🤔 Should all the extraction be gated by this? Also, is it really supported on .NET Core 3.1, or should it be .NET 6 like the metrics below?

}
}

[TestingAndPrivateOnly]

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 don't think this warrants being a separate method. Either inline this and remove the TracerManagerTests.cs tests (my preference, seeing as you're already testing this in system tests)

Although, shouldn't we be pushing to use service config to debug this stuff anyway, instead of the logs? 🤷‍♂️

Comment on lines +1057 to +1096
[Theory]
#if NET6_0_OR_GREATER
[InlineData("true", null, true)]
[InlineData("true", "otlp", true)]
#else
[InlineData("true", null, false)]
[InlineData("true", "otlp", false)]
#endif
[InlineData("true", "none", false)]
[InlineData("false", "otlp", false)]
public void OtlpMetricsExportEnabled(string metricsEnabled, string exporter, bool expected)
{
var source = CreateConfigurationSource(
(ConfigurationKeys.FeatureFlags.OpenTelemetryMetricsEnabled, metricsEnabled),
(ConfigurationKeys.OpenTelemetry.MetricsExporter, exporter));
var settings = new TracerSettings(source);

settings.OtlpMetricsExportEnabled.Should().Be(expected);
}

[Theory]
#if NETCOREAPP3_1_OR_GREATER
[InlineData("true", null, true)]
[InlineData("true", "otlp", true)]
#else
[InlineData("true", null, false)]
[InlineData("true", "otlp", false)]
#endif
[InlineData("true", "none", false)]
[InlineData("false", "otlp", false)]
public void OpenTelemetryLogsEnabled(string logsEnabled, string exporter, bool expected)
{
var source = CreateConfigurationSource(
(ConfigurationKeys.FeatureFlags.OpenTelemetryLogsEnabled, logsEnabled),
(ConfigurationKeys.OpenTelemetry.LogsExporter, exporter));
var settings = new TracerSettings(source);

settings.OpenTelemetryLogsEnabled.Should().Be(expected);
}

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.

meh, not sure we need to test an && clause, given the conversion from string -> setting is tested elsewhere here anyway

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.

meh, I don't think this is worth testin

MilanGarnier added a commit that referenced this pull request Oct 9, 2026
## Summary of changes

Expose resolved OpenTelemetry configuration as flat uppercase fields in
the existing `DATADOG TRACER CONFIGURATION` startup JSON.

Added feature gates:

- `OTEL_ENABLED`
- `DD_TRACE_OTEL_ENABLED`
- `DD_METRICS_OTEL_ENABLED`
- `DD_LOGS_OTEL_ENABLED`
- `DD_TRACE_OTEL_SEMANTICS_ENABLED`

Added exporter settings, emitted for each enabled OTLP pipeline:

- `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`
- `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL`
- `OTEL_EXPORTER_OTLP_TRACES_HEADERS`
- `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT`
- `OTEL_EXPORTER_OTLP_METRICS_PROTOCOL`
- `OTEL_EXPORTER_OTLP_METRICS_HEADERS`
- `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT`
- `OTEL_EXPORTER_OTLP_LOGS_PROTOCOL`
- `OTEL_EXPORTER_OTLP_LOGS_HEADERS`

Added shared and trace settings:

- `OTEL_LOG_LEVEL`
- `OTEL_SERVICE_NAME`
- `OTEL_RESOURCE_ATTRIBUTES`
- `OTEL_PROPAGATORS`, when injection and extraction use the same
sequence
- `OTEL_TRACES_SAMPLER`, when the managed sampler has a supported global
rate
- `OTEL_TRACES_SAMPLER_ARG`, for rates strictly between zero and one

Added logs settings:

- `OTEL_LOGS_EXPORTER`
- `OTEL_BLRP_SCHEDULE_DELAY`, when OTLP logs export is enabled
- `OTEL_BLRP_MAX_QUEUE_SIZE`, when OTLP logs export is enabled
- `OTEL_BLRP_MAX_EXPORT_BATCH_SIZE`, when OTLP logs export is enabled

Added metrics settings, emitted when OTLP metrics export is enabled:

- `OTEL_METRIC_EXPORT_INTERVAL`
- `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE`

## Reason for change

[OTEL-3367](https://datadoghq.atlassian.net/browse/OTEL-3367): make the
configuration used by OTel integrations and exporters visible at
startup, including existing defaults, precedence, and fallback behavior.

This extends the idea in
[#8936](#8936) to cover
exporter, trace, logs, and metrics settings. Whenever possible, it uses
the matching "OTEL_" env var name (the main target here is onboarding
OTel consumers).

## Implementation details

- Share metrics/logs export predicates, including framework support,
between runtime code and startup logging; reuse the existing trace
export predicate.
- Share sampling-rate validation through `EffectiveGlobalSamplingRate`
and read propagator names from resolved instances. Emit
`OTEL_PROPAGATORS` only when injection and extraction match.
- Reuse existing exporter, logs batching, and metrics getters. Redact
header values and report intervals in milliseconds. `OTEL_BLRP_*` fields
reflect existing `DD_LOGS_DIRECT_SUBMISSION_*` settings, without adding
new inputs.
- Read the effective log level, service name, and global tags. Resource
attributes use the existing `key:value` array representation.

## Test coverage

Startup-log coverage is maintained in [system-tests
#7978](DataDog/system-tests#7978). No new
assertions or test-only serialization methods are added in this PR.
Existing configuration, sampling, propagation, and exporter tests were
run locally, and the managed targets and integration-test project
compiled.

A local run against
[#7978](DataDog/system-tests#7978) with the
tracer built from the earlier implementation revision completed with 15
passed and 12 failed.
The missing fields fall into these categories:
- Generic `OTEL_EXPORTER_OTLP_*`: report per-signal effective values
instead.
- Additional `DD_*` fields and `OTEL_TRACES_EXPORTER`: supported
settings whose uppercase startup-log fields are not added by this PR.
- `OTEL_SEMCONV_STABILITY_OPT_IN` and
`DD_DBM_TRACE_PREPARED_STATEMENTS`: unsupported configuration inputs in
.NET.
- `OTEL_TRACES_SAMPLER_ARG`: only emitted for ratio sampling; the test
requires it for `always_on` too.
- `OTEL_BLRP_EXPORT_TIMEOUT`: no equivalent setting in the batching
sink.


## Other details

Uses the existing startup-log emission and controls. Generic OTLP
transport fields are omitted because exporters can have different
finalized values. `OTEL_BLRP_EXPORT_TIMEOUT` is omitted because the sink
has no equivalent finalized setting. The added getters and interface
member are internal.

[OTEL-3367]:
https://datadoghq.atlassian.net/browse/OTEL-3367?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

This branch has not been deployed

No deployments
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 area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants