Skip to content

Add EventBridge DSM producer injection#8639

Merged
jeastham1993 merged 10 commits into
masterfrom
james.eastham/event-bridge-dsm-injection
Jul 1, 2026
Merged

Add EventBridge DSM producer injection#8639
jeastham1993 merged 10 commits into
masterfrom
james.eastham/event-bridge-dsm-injection

Conversation

@jeastham1993

Copy link
Copy Markdown
Collaborator

Summary of changes

Update the Amazon EventBridge context propagation to support data streams monitoring injection.

Reason for change

Other AWS messaging technologies (SNS/SQS/Kinesis) support DSM, extending support into the full suite of AWS services.

Implementation details

The core change is in ContextPropagation.cs (line 28): each PutEvents entry now creates a produce checkpoint when an EventBusName is available, then injects dd-pathway-ctx-base64 into the existing _datadog JSON alongside the trace headers.

Test coverage

Tests added to ContextPropagationTests.cs to verify the header is injected and is base-64 decodable.

Other details

@jeastham1993
jeastham1993 requested review from a team as code owners May 14, 2026 16:46

@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: 5634ae9a25

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

@pr-commenter

pr-commenter Bot commented May 14, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-06-30 14:27:17

Comparing candidate commit 91b3e2e in PR branch james.eastham/event-bridge-dsm-injection with baseline commit f0fbab0 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 2 performance regressions! Performance is the same for 70 metrics, 0 unstable metrics, 61 known flaky benchmarks, 65 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 [-24456.556op/s; -21592.680op/s] or [-6.888%; -6.082%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net472

  • 🟥 throughput [-5638.401op/s; -5354.839op/s] or [-6.437%; -6.113%]

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 [-6906.093op/s; -6299.226op/s] or [-8.189%; -7.469%]

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

  • 🟥 throughput [-7864.530op/s; -6613.179op/s] or [-7.996%; -6.724%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+311.939ms; +319.798ms] or [+154.795%; +158.695%]
  • 🟥 throughput [-44.315op/s; -40.665op/s] or [-7.973%; -7.316%]

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

  • 🟥 execution_time [+379.068ms; +380.552ms] or [+299.487%; +300.660%]
  • 🟩 throughput [+93.403op/s; +95.945op/s] or [+12.315%; +12.650%]

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

  • 🟥 execution_time [+396.315ms; +399.524ms] or [+350.724%; +353.564%]

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

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

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+9.976%; +9.987%]
  • 🟩 execution_time [-16.207ms; -12.033ms] or [-7.569%; -5.620%]
  • 🟩 throughput [+7316.859op/s; +10167.644op/s] or [+5.341%; +7.422%]

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

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

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

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.743%; +105.758%]
  • 🟥 throughput [-275934.525op/s; -273056.988op/s] or [-28.174%; -27.880%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.557%; +38.566%]
  • 🟩 execution_time [-26.493ms; -21.640ms] or [-11.815%; -9.651%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • 🟥 throughput [-154951.984op/s; -138957.402op/s] or [-22.264%; -19.966%]

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

  • 🟩 throughput [+9367.436op/s; +12298.725op/s] or [+5.960%; +7.825%]

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

  • 🟩 throughput [+8725.181op/s; +11367.161op/s] or [+6.951%; +9.055%]

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

  • 🟩 throughput [+440696.423op/s; +462231.165op/s] or [+14.695%; +15.413%]

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

  • 🟩 execution_time [-19.309ms; -14.978ms] or [-8.901%; -6.904%]
  • 🟩 throughput [+179990.758op/s; +233542.318op/s] or [+7.144%; +9.270%]

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

  • 🟥 execution_time [+299.854ms; +300.666ms] or [+149.827%; +150.233%]

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

  • 🟥 execution_time [+299.989ms; +303.732ms] or [+151.285%; +153.173%]

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

  • 🟥 execution_time [+298.353ms; +313.103ms] or [+150.287%; +157.717%]

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

  • 🟥 execution_time [+296.887ms; +297.735ms] or [+145.819%; +146.236%]

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

  • 🟥 execution_time [+298.161ms; +302.069ms] or [+145.760%; +147.671%]

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

  • 🟥 execution_time [+303.079ms; +305.926ms] or [+151.479%; +152.902%]

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

  • 🟥 execution_time [+26.037µs; +49.796µs] or [+8.312%; +15.897%]
  • 🟥 throughput [-459.186op/s; -259.410op/s] or [-14.314%; -8.087%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+300.099ms; +301.118ms] or [+149.780%; +150.289%]

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

  • 🟥 execution_time [+421.421ms; +428.819ms] or [+457.891%; +465.929%]
  • 🟩 throughput [+743.251op/s; +900.350op/s] or [+6.107%; +7.398%]

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

  • unstable execution_time [+270.981ms; +323.525ms] or [+205.753%; +245.650%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+351.976ms; +402.940ms] or [+161.835%; +185.268%]
  • 🟥 throughput [-615.317op/s; -569.071op/s] or [-55.754%; -51.563%]

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

  • unstable execution_time [+207.285ms; +340.597ms] or [+88.336%; +145.148%]
  • 🟥 throughput [-679.020op/s; -595.131op/s] or [-45.291%; -39.695%]

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

  • 🟥 allocated_mem [+2.195KB; +2.199KB] or [+5.183%; +5.192%]
  • 🟥 execution_time [+317.296ms; +326.175ms] or [+189.780%; +195.091%]
  • 🟥 throughput [-413.784op/s; -376.504op/s] or [-28.811%; -26.215%]

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

  • unstable throughput [+18.291op/s; +63.373op/s] or [+5.258%; +18.216%]

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

  • 🟩 execution_time [-146.011µs; -109.963µs] or [-7.396%; -5.570%]
  • 🟩 throughput [+30.851op/s; +40.589op/s] or [+6.090%; +8.013%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+303.056ms; +304.626ms] or [+152.613%; +153.404%]

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

  • 🟥 execution_time [+301.422ms; +302.640ms] or [+151.043%; +151.653%]

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

  • 🟥 execution_time [+297.676ms; +301.076ms] or [+149.540%; +151.248%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+302.200ms; +305.215ms] or [+151.755%; +153.269%]

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

  • 🟥 execution_time [+299.226ms; +301.063ms] or [+147.954%; +148.862%]

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

  • 🟥 execution_time [+305.055ms; +309.009ms] or [+154.615%; +156.619%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+301.342ms; +304.048ms] or [+151.247%; +152.605%]

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

  • 🟥 execution_time [+299.745ms; +302.351ms] or [+149.396%; +150.694%]
  • 🟩 throughput [+45164.066op/s; +55559.447op/s] or [+8.968%; +11.032%]

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

  • 🟥 execution_time [+300.858ms; +304.437ms] or [+149.674%; +151.455%]

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

  • 🟩 execution_time [-16.580ms; -12.936ms] or [-7.710%; -6.015%]
  • 🟩 throughput [+18387.024op/s; +24895.761op/s] or [+5.044%; +6.830%]

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

  • unstable execution_time [+6.086µs; +50.181µs] or [+1.503%; +12.395%]

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

  • 🟥 allocated_mem [+44.120KB; +44.145KB] or [+16.094%; +16.103%]
  • unstable execution_time [+18.067µs; +123.976µs] or [+3.571%; +24.503%]
  • unstable throughput [-292.810op/s; -11.933op/s] or [-14.611%; -0.595%]

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

  • unstable execution_time [-49.557µs; +13.440µs] or [-8.588%; +2.329%]

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

  • unstable execution_time [+5.451µs; +9.960µs] or [+12.883%; +23.543%]
  • 🟥 throughput [-4519.622op/s; -2661.076op/s] or [-19.026%; -11.202%]

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

  • unstable execution_time [-14.357µs; -6.053µs] or [-22.274%; -9.391%]
  • unstable throughput [+1615.802op/s; +3447.218op/s] or [+9.913%; +21.150%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.275ms; +303.912ms] or [+152.787%; +153.614%]

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

  • 🟥 execution_time [+305.093ms; +308.847ms] or [+155.291%; +157.202%]

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

  • 🟥 execution_time [+298.588ms; +300.622ms] or [+149.480%; +150.498%]

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

  • 🟩 throughput [+33816.316op/s; +38064.624op/s] or [+6.401%; +7.205%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+298.976ms; +301.331ms] or [+149.012%; +150.186%]

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

  • 🟥 execution_time [+301.236ms; +304.227ms] or [+151.267%; +152.768%]

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

  • 🟥 execution_time [+299.960ms; +317.411ms] or [+152.120%; +160.970%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.499ms; +300.436ms] or [+149.392%; +149.859%]
  • 🟩 throughput [+61159188.683op/s; +61486715.879op/s] or [+44.540%; +44.778%]

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

  • 🟥 execution_time [+422.294ms; +426.879ms] or [+525.198%; +530.900%]

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

  • 🟥 execution_time [+298.957ms; +300.064ms] or [+149.113%; +149.665%]

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

  • 🟩 throughput [+86843.358op/s; +97945.210op/s] or [+8.108%; +9.145%]

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

  • 🟩 throughput [+46236.821op/s; +66397.360op/s] or [+5.352%; +7.685%]

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

  • 🟩 throughput [+71241.820op/s; +100511.686op/s] or [+5.514%; +7.780%]

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

  • 🟩 throughput [+78957.529op/s; +86515.901op/s] or [+7.842%; +8.592%]

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

  • 🟩 throughput [+43440.117op/s; +48098.571op/s] or [+7.888%; +8.734%]

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

  • 🟩 throughput [+83452.007op/s; +101882.615op/s] or [+9.324%; +11.383%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.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.OptimizedCharSliceWithPool net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • 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 May 14, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8639) 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
duration69.30 ± (69.33 - 69.61) ms72.61 ± (72.17 - 72.75) ms+4.8%✅⬆️
.NET Framework 4.8 - Bailout
duration73.49 ± (73.24 - 73.59) ms76.16 ± (75.86 - 76.33) ms+3.6%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1077.37 ± (1077.33 - 1083.53) ms1082.29 ± (1081.08 - 1087.29) ms+0.5%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.08 ± (22.04 - 22.12) ms22.57 ± (22.51 - 22.63) ms+2.2%✅⬆️
process.time_to_main_ms80.22 ± (80.08 - 80.36) ms83.58 ± (83.22 - 83.94) ms+4.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.93 ± (10.93 - 10.93) MB10.92 ± (10.91 - 10.92) MB-0.1%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms21.99 ± (21.96 - 22.01) ms22.14 ± (22.11 - 22.17) ms+0.7%✅⬆️
process.time_to_main_ms81.39 ± (81.26 - 81.52) ms82.29 ± (82.11 - 82.48) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.97 ± (10.97 - 10.98) MB10.96 ± (10.96 - 10.97) MB-0.1%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms209.05 ± (208.05 - 210.06) ms209.95 ± (208.81 - 211.09) ms+0.4%✅⬆️
process.time_to_main_ms529.44 ± (528.28 - 530.61) ms528.59 ± (527.43 - 529.74) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.76 ± (48.72 - 48.81) MB48.70 ± (48.65 - 48.74) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 6 - Baseline
process.internal_duration_ms20.83 ± (20.81 - 20.86) ms21.25 ± (21.19 - 21.30) ms+2.0%✅⬆️
process.time_to_main_ms69.88 ± (69.76 - 70.01) ms72.12 ± (71.89 - 72.35) ms+3.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.62 ± (10.61 - 10.62) MB10.63 ± (10.63 - 10.63) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.80 ± (20.77 - 20.83) ms20.94 ± (20.91 - 20.97) ms+0.7%✅⬆️
process.time_to_main_ms70.71 ± (70.58 - 70.83) ms71.20 ± (71.06 - 71.35) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.72 ± (10.71 - 10.72) MB10.75 ± (10.75 - 10.75) MB+0.3%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms370.16 ± (368.12 - 372.20) ms372.75 ± (370.29 - 375.21) ms+0.7%✅⬆️
process.time_to_main_ms535.42 ± (534.34 - 536.50) ms536.61 ± (535.29 - 537.92) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.20 ± (50.18 - 50.22) MB50.12 ± (50.10 - 50.15) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.1%
.NET 8 - Baseline
process.internal_duration_ms19.32 ± (19.27 - 19.36) ms19.11 ± (19.08 - 19.13) ms-1.1%
process.time_to_main_ms70.82 ± (70.59 - 71.05) ms68.90 ± (68.77 - 69.02) ms-2.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.68 ± (7.67 - 7.69) MB7.67 ± (7.66 - 7.67) MB-0.2%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.27 ± (19.23 - 19.30) ms19.36 ± (19.32 - 19.41) ms+0.5%✅⬆️
process.time_to_main_ms71.64 ± (71.46 - 71.82) ms72.56 ± (72.32 - 72.79) ms+1.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.74 ± (7.73 - 7.74) MB7.73 ± (7.72 - 7.73) MB-0.1%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms298.21 ± (295.77 - 300.65) ms295.82 ± (293.40 - 298.25) ms-0.8%
process.time_to_main_ms482.79 ± (481.96 - 483.61) ms484.65 ± (483.61 - 485.68) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.09 ± (37.06 - 37.12) MB37.10 ± (37.08 - 37.13) MB+0.0%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.1%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration204.15 ± (203.85 - 204.73) ms204.29 ± (204.00 - 205.10) ms+0.1%✅⬆️
.NET Framework 4.8 - Bailout
duration207.15 ± (206.70 - 207.57) ms210.90 ± (209.55 - 210.55) ms+1.8%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1210.32 ± (1207.81 - 1214.20) ms1220.80 ± (1221.45 - 1226.70) ms+0.9%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms196.14 ± (195.74 - 196.53) ms197.98 ± (197.56 - 198.40) ms+0.9%✅⬆️
process.time_to_main_ms85.29 ± (85.00 - 85.57) ms86.70 ± (86.40 - 87.01) ms+1.7%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.02 ± (15.99 - 16.04) MB16.03 ± (16.01 - 16.06) MB+0.1%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.0%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms194.52 ± (194.14 - 194.90) ms196.63 ± (196.24 - 197.02) ms+1.1%✅⬆️
process.time_to_main_ms86.04 ± (85.77 - 86.30) ms87.08 ± (86.84 - 87.32) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.08 ± (16.06 - 16.11) MB16.10 ± (16.07 - 16.12) MB+0.1%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)+0.7%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms390.18 ± (388.50 - 391.86) ms392.46 ± (391.20 - 393.71) ms+0.6%✅⬆️
process.time_to_main_ms542.06 ± (540.59 - 543.52) ms547.69 ± (546.37 - 549.00) ms+1.0%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.26 ± (58.04 - 58.47) MB59.02 ± (58.83 - 59.21) MB+1.3%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.7%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms202.08 ± (201.74 - 202.43) ms204.12 ± (203.61 - 204.63) ms+1.0%✅⬆️
process.time_to_main_ms74.19 ± (73.98 - 74.39) ms75.83 ± (75.59 - 76.07) ms+2.2%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.36 ± (16.34 - 16.38) MB16.32 ± (16.30 - 16.35) MB-0.2%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.9%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms200.07 ± (199.65 - 200.48) ms203.01 ± (202.56 - 203.46) ms+1.5%✅⬆️
process.time_to_main_ms75.15 ± (74.93 - 75.36) ms76.87 ± (76.64 - 77.11) ms+2.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.43 ± (16.40 - 16.46) MB16.41 ± (16.38 - 16.43) MB-0.1%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.4%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms582.09 ± (579.65 - 584.52) ms581.59 ± (579.28 - 583.90) ms-0.1%
process.time_to_main_ms557.00 ± (555.88 - 558.11) ms560.02 ± (558.94 - 561.10) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.30 ± (61.21 - 61.38) MB61.41 ± (61.34 - 61.48) MB+0.2%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.4%
.NET 8 - Baseline
process.internal_duration_ms200.19 ± (199.80 - 200.58) ms200.91 ± (200.54 - 201.29) ms+0.4%✅⬆️
process.time_to_main_ms73.94 ± (73.64 - 74.25) ms74.17 ± (73.90 - 74.44) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.70 ± (11.68 - 11.73) MB11.72 ± (11.70 - 11.74) MB+0.1%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)19 ± (19 - 19)+1.2%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms201.09 ± (200.60 - 201.58) ms200.19 ± (199.87 - 200.50) ms-0.5%
process.time_to_main_ms75.47 ± (75.28 - 75.65) ms75.62 ± (75.45 - 75.78) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.77 ± (11.75 - 11.80) MB11.77 ± (11.75 - 11.79) MB-0.0%
runtime.dotnet.threads.count19 ± (19 - 20)19 ± (19 - 19)-0.4%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms516.88 ± (513.84 - 519.91) ms510.44 ± (507.67 - 513.20) ms-1.2%
process.time_to_main_ms506.45 ± (505.65 - 507.26) ms511.53 ± (510.51 - 512.55) ms+1.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.99 ± (50.95 - 51.03) MB50.97 ± (50.93 - 51.02) MB-0.0%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.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 (8639) - mean (72ms)  : 68, 77
    master - mean (69ms)  : 67, 71

    section Bailout
    This PR (8639) - mean (76ms)  : 72, 80
    master - mean (73ms)  : 72, 75

    section CallTarget+Inlining+NGEN
    This PR (8639) - mean (1,084ms)  : 1040, 1128
    master - mean (1,080ms)  : 1036, 1125

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 (8639) - mean (113ms)  : 107, 120
    master - mean (109ms)  : 106, 111

    section Bailout
    This PR (8639) - mean (111ms)  : 106, 115
    master - mean (110ms)  : 108, 112

    section CallTarget+Inlining+NGEN
    This PR (8639) - mean (773ms)  : 755, 791
    master - mean (777ms)  : 755, 799

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

    section Bailout
    This PR (8639) - mean (98ms)  : 95, 101
    master - mean (97ms)  : 95, 99

    section CallTarget+Inlining+NGEN
    This PR (8639) - mean (938ms)  : 889, 986
    master - mean (937ms)  : 899, 975

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8639) - mean (95ms)  : 92, 97
    master - mean (98ms)  : 93, 104

    section Bailout
    This PR (8639) - mean (100ms)  : 95, 104
    master - mean (99ms)  : 95, 103

    section CallTarget+Inlining+NGEN
    This PR (8639) - mean (812ms)  : 771, 853
    master - mean (812ms)  : 770, 855

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 (8639) - mean (205ms)  : 199, 211
    master - mean (204ms)  : 199, 209

    section Bailout
    This PR (8639) - mean (210ms)  : 204, 216
    master - mean (207ms)  : 203, 212

    section CallTarget+Inlining+NGEN
    This PR (8639) - mean (1,224ms)  : 1188, 1260
    master - mean (1,211ms)  : 1168, 1254

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 (8639) - mean (295ms)  : 288, 303
    master - mean (291ms)  : 286, 296

    section Bailout
    This PR (8639) - mean (294ms)  : 288, 300
    master - mean (290ms)  : 285, 296

    section CallTarget+Inlining+NGEN
    This PR (8639) - mean (984ms)  : 960, 1009
    master - mean (974ms)  : 954, 993

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8639) - mean (290ms)  : 283, 297
    master - mean (286ms)  : 281, 291

    section Bailout
    This PR (8639) - mean (290ms)  : 283, 297
    master - mean (285ms)  : 278, 291

    section CallTarget+Inlining+NGEN
    This PR (8639) - mean (1,177ms)  : 1128, 1227
    master - mean (1,173ms)  : 1130, 1216

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8639) - mean (286ms)  : 280, 292
    master - mean (285ms)  : 280, 289

    section Bailout
    This PR (8639) - mean (286ms)  : 282, 290
    master - mean (287ms)  : 280, 294

    section CallTarget+Inlining+NGEN
    This PR (8639) - mean (1,058ms)  : 1016, 1099
    master - mean (1,054ms)  : 1007, 1102

Loading


var edgeTags = dataStreamsManager.GetOrCreateEdgeTags(
new EventBridgeEdgeTagCacheKey(detailType ?? string.Empty, eventBusName!),
static k => ["direction:out", $"topic:{k.DetailType}", $"type:eventbridge:{k.EventBusName}"]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not too familiar with EventBridge, is DetailType the right choice for topic here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@robcarlan-datadog DetailType would typically be "orderCreated" or "productUpdated" or whatever the type of event is that's being published. So I would say yes?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If I'm reading the dd-trace-java implementation they opted to go with a static type:bus with no topic/DetailType tag.

(Just taking a cursory glance at it on GitHub)

I think we should align on one standard - I don't know who is right though 😛 or if both are right

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@bouwkast A PR to Java is next on my agenda 😊 Ideally I want to include the bus name in the type, with the way EventBridge works, and how I think folks using EB will debug, is they'll want to see all message channels for a specific bus. Not just all message channels that are of type 'bus' if that makes sense.

Going to ask the DSM team to do some analysis before we finally commit

@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: 3651fdda90

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


private static PathwayContext? SetDataStreamsCheckpoint(Tracer tracer, Scope? scope, string? detailType, string? eventBusName, long payloadSizeBytes)
{
if (scope is null || StringUtil.IsNullOrEmpty(eventBusName))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve DSM on default EventBridge bus

When PutEventsRequestEntry.EventBusName is omitted, AWS sends the event to the default EventBridge bus, but this guard returns before creating the DSM checkpoint or injecting dd-pathway-ctx-base64. That means applications using the default bus still get trace context injected below, but DSM propagation is silently absent for those events; use the default bus name as the topic instead of treating the missing property as “no destination.”

Useful? React with 👍 / 👎.

@bouwkast bouwkast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There are (what appears) to be some deviations from the dd-trace-java implementation, but I don't know who is right.

Could we confirm before we merge?


var edgeTags = dataStreamsManager.GetOrCreateEdgeTags(
new EventBridgeEdgeTagCacheKey(detailType ?? string.Empty, eventBusName!),
static k => ["direction:out", $"topic:{k.DetailType}", $"type:eventbridge:{k.EventBusName}"]);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If I'm reading the dd-trace-java implementation they opted to go with a static type:bus with no topic/DetailType tag.

(Just taking a cursory glance at it on GitHub)

I think we should align on one standard - I don't know who is right though 😛 or if both are right


private static PathwayContext? SetDataStreamsCheckpoint(Tracer tracer, Scope? scope, string? detailType, string? eventBusName, long payloadSizeBytes)
{
if (scope is null || StringUtil.IsNullOrEmpty(eventBusName))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The codex comment seems relevant here, if the default bus is used the name is empty so I'd imagine we'd want to checkpoint.

Looking again at the dd-trace-java implementation they just grab the bus name and inject a pathway regardless of its value.

Again no clue who's right here 😛

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@bouwkast A PR to Java is next on my agenda 😊 Ideally I want to include the bus name in the type, with the way EventBridge works, and how I think folks using EB will debug, is they'll want to see all message channels for a specific bus. Not just all message channels that are of type 'bus' if that makes sense.

Going to ask the DSM team to do some analysis before we finally commit

}

var edgeTags = dataStreamsManager.GetOrCreateEdgeTags(
new EventBridgeEdgeTagCacheKey(detailType ?? string.Empty, eventBusName!),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just looking on GitHub, but do we need ! on eventBusName!? I think StringUtil.IsNullOrEmpty(eventBusName) should correctly mark it as not null

# Conflicts:
#	tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AWS/EventBridge/ContextPropagation.cs
#	tracer/test/Datadog.Trace.ClrProfiler.Managed.Tests/AutoInstrumentation/AWS/EventBridge/ContextPropagationTests.cs

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

ℹ️ 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 on lines +60 to +61
var payloadSizeBytes = GetPayloadSizeBytes(detail);
var pathwayContext = SetDataStreamsCheckpoint(tracer, scope, entry.DetailType, entry.EventBusName, payloadSizeBytes);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Move DSM checkpoint after the size guard

When DSM is enabled and adding _datadog would push an EventBridge detail over the 256 KB limit, this call creates a produce checkpoint before the later size check returns without assigning entry.Detail. In that case the event is sent without dd-pathway-ctx-base64, but the span still gets a pathway.hash and DSM stats point for a pathway that was never propagated; create the checkpoint only after confirming the updated payload will be injected.

Useful? React with 👍 / 👎.

@robcarlan-datadog robcarlan-datadog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(req DSM changes pending some internal discussion on data model)

@jeastham1993
jeastham1993 requested a review from a team as a code owner June 9, 2026 06:31
@datadog-datadog-prod-us1

This comment has been minimized.

@bouwkast

Copy link
Copy Markdown
Collaborator

(req DSM changes pending some internal discussion on data model)

@robcarlan-datadog

Any clarification on this?

@jeastham1993

Copy link
Copy Markdown
Collaborator Author

(req DSM changes pending some internal discussion on data model)

@robcarlan-datadog

Any clarification on this?

@bouwkast I've updated the implementation now based on Rob's suggestion. Just waiting on his approval 😊

@robcarlan-datadog robcarlan-datadog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Main open question is just about the changes with AppendEscapedJsonString, and some small changes to tests

@bouwkast bouwkast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@jeastham1993
jeastham1993 merged commit 9b13018 into master Jul 1, 2026
140 checks passed
@jeastham1993
jeastham1993 deleted the james.eastham/event-bridge-dsm-injection branch July 1, 2026 08:31
@github-actions github-actions Bot added this to the vNext-v3 milestone Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants