Skip to content

[Tracer] (Event Grid 2/5) Register outbound SDK calltargets - #8912

Open
pablomartinezbernardo wants to merge 1 commit into
pmartinez/event-grid-contract-corefrom
pmartinez/event-grid-calltargets
Open

pablomartinezbernardo wants to merge 1 commit into
pmartinez/event-grid-contract-corefrom
pmartinez/event-grid-calltargets

Conversation

@pablomartinezbernardo

@pablomartinezbernardo pablomartinezbernardo commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary of changes

Registers outbound CallTarget instrumentation for Azure.Messaging.EventGrid and Azure.Messaging.EventGrid.Namespaces.

Reason for change

Create producer spans and inject trace context where supported when applications publish Azure Event Grid events.

Implementation details

  • Instruments synchronous and asynchronous publisher APIs for single and batched CloudEvent and EventGridEvent payloads.
  • Regenerates CallTarget definitions and adds both SDK assemblies to trimming and Honeypot metadata.

Test coverage

End-to-end coverage is added in the follow-up outbound E2E PR in this stack.

Other details

This PR is part of a larger Graphite stack.

Copy link
Copy Markdown
Contributor Author

@pr-commenter

pr-commenter Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-10-02 09:29:06

Comparing candidate commit 525e44f in PR branch pmartinez/event-grid-calltargets with baseline commit ec526ec in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 10 performance regressions! Performance is the same for 62 metrics, 0 unstable metrics, 75 known flaky benchmarks, 51 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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+10.133%; +10.144%]
  • 🟥 throughput [-28300.062op/s; -24538.372op/s] or [-7.971%; -6.911%]

scenario:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery net6.0

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+9.750%; +9.761%]

scenario:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+9.830%; +9.841%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net472

  • 🟥 allocated_mem [+271 bytes; +272 bytes] or [+9.338%; +9.348%]
  • 🟥 throughput [-11403.778op/s; -10807.623op/s] or [-13.018%; -12.338%]

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

  • 🟥 allocated_mem [+199 bytes; +200 bytes] or [+9.426%; +9.438%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync netcoreapp3.1

  • 🟥 allocated_mem [+199 bytes; +200 bytes] or [+7.569%; +7.581%]
  • 🟥 throughput [-13850.676op/s; -12189.522op/s] or [-10.991%; -9.673%]

scenario:Benchmarks.Trace.NLogBenchmark.EnrichedLog net472

  • 🟥 throughput [-8185.577op/s; -7516.266op/s] or [-6.270%; -5.758%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472

  • 🟥 throughput [-12493.709op/s; -9549.380op/s] or [-7.577%; -5.791%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472

  • 🟥 throughput [-8698.919op/s; -6459.324op/s] or [-6.992%; -5.192%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-10774.069op/s; -9999.573op/s] or [-12.775%; -11.857%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0

  • 🟥 throughput [-10190.446op/s; -7470.473op/s] or [-8.565%; -6.279%]

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

  • 🟥 throughput [-12001.799op/s; -10229.607op/s] or [-12.203%; -10.401%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 allocated_mem [+1.541KB; +1.541KB] or [+46.817%; +46.831%]
  • 🟥 execution_time [+309.495ms; +312.439ms] or [+153.582%; +155.043%]
  • 🟥 throughput [-58.403op/s; -54.064op/s] or [-10.508%; -9.727%]

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

  • 🟥 allocated_mem [+1.011KB; +1.011KB] or [+37.485%; +37.498%]
  • unstable execution_time [+292.830ms; +355.243ms] or [+231.354%; +280.664%]
  • 🟩 throughput [+70.924op/s; +76.469op/s] or [+9.351%; +10.082%]

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

  • 🟥 allocated_mem [+1.090KB; +1.090KB] or [+40.417%; +40.429%]
  • 🟥 execution_time [+397.624ms; +398.852ms] or [+351.882%; +352.968%]

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

  • 🟥 allocated_mem [+4.758KB; +4.758KB] or [+100.159%; +100.174%]
  • 🟥 throughput [-59666.585op/s; -59317.207op/s] or [-46.424%; -46.152%]

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

  • 🟥 allocated_mem [+3.880KB; +3.880KB] or [+82.058%; +82.072%]
  • 🟩 execution_time [-15.558ms; -11.373ms] or [-7.266%; -5.312%]
  • 🟥 throughput [-61349.568op/s; -58592.017op/s] or [-44.782%; -42.769%]

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

  • 🟥 allocated_mem [+4.608KB; +4.608KB] or [+99.641%; +99.654%]
  • 🟥 throughput [-48871.105op/s; -46629.942op/s] or [-44.185%; -42.159%]

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

  • 🟥 allocated_mem [+1.380KB; +1.380KB] or [+111.648%; +111.662%]
  • 🟥 throughput [-299434.957op/s; -294093.352op/s] or [-30.574%; -30.028%]

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

  • 🟥 allocated_mem [+543 bytes; +544 bytes] or [+44.437%; +44.446%]
  • 🟩 execution_time [-26.929ms; -22.058ms] or [-12.009%; -9.837%]
  • 🟥 throughput [-108315.581op/s; -85089.074op/s] or [-11.572%; -9.090%]

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

  • 🟥 allocated_mem [+1.344KB; +1.344KB] or [+111.253%; +111.267%]
  • 🟥 throughput [-173759.795op/s; -157741.676op/s] or [-24.966%; -22.664%]

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

  • 🟥 allocated_mem [+3.378KB; +3.378KB] or [+89.003%; +89.017%]
  • 🟥 throughput [-75108.894op/s; -73782.573op/s] or [-50.547%; -49.655%]

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

  • 🟥 allocated_mem [+3.336KB; +3.336KB] or [+88.150%; +88.161%]
  • 🟥 throughput [-75177.518op/s; -72294.333op/s] or [-47.834%; -46.000%]

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

  • 🟥 allocated_mem [+3.264KB; +3.264KB] or [+88.493%; +88.506%]
  • 🟥 throughput [-55849.479op/s; -53236.747op/s] or [-44.491%; -42.410%]

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

  • 🟩 throughput [+275027.037op/s; +296258.317op/s] or [+9.171%; +9.879%]

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

  • 🟩 execution_time [-18.536ms; -13.996ms] or [-8.544%; -6.452%]

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

  • 🟩 allocated_mem [-13.759KB; -13.756KB] or [-42.324%; -42.316%]
  • 🟥 execution_time [+300.048ms; +301.376ms] or [+149.924%; +150.588%]
  • 🟩 throughput [+979.013op/s; +1000.937op/s] or [+10.813%; +11.055%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+299.623ms; +303.623ms] or [+151.100%; +153.118%]
  • 🟩 throughput [+2195.853op/s; +2433.746op/s] or [+16.795%; +18.615%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+300.398ms; +302.877ms] or [+151.317%; +152.566%]
  • 🟩 throughput [+1805.239op/s; +1932.183op/s] or [+17.429%; +18.654%]

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

  • 🟥 execution_time [+295.652ms; +296.316ms] or [+145.213%; +145.539%]
  • 🟩 throughput [+567.160op/s; +574.251op/s] or [+15.036%; +15.224%]

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

  • 🟥 execution_time [+293.815ms; +295.285ms] or [+143.635%; +144.354%]
  • 🟩 throughput [+2693.734op/s; +2827.341op/s] or [+39.135%; +41.076%]

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

  • 🟥 execution_time [+302.347ms; +303.314ms] or [+151.113%; +151.596%]
  • 🟩 throughput [+1349.472op/s; +1376.998op/s] or [+26.786%; +27.332%]

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

  • 🟩 execution_time [-145.622µs; -140.822µs] or [-29.898%; -28.913%]
  • 🟩 throughput [+839.206op/s; +873.401op/s] or [+40.873%; +42.539%]

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

  • 🟩 execution_time [-132.930µs; -106.028µs] or [-30.488%; -24.318%]
  • 🟩 throughput [+797.558op/s; +924.493op/s] or [+34.675%; +40.193%]

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

  • 🟩 execution_time [-142.675µs; -120.621µs] or [-30.569%; -25.843%]
  • 🟩 throughput [+776.642op/s; +860.643op/s] or [+35.851%; +39.729%]

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

  • 🟩 execution_time [-128.603µs; -124.485µs] or [-34.722%; -33.610%]
  • 🟩 throughput [+1378.946op/s; +1425.602op/s] or [+51.070%; +52.798%]

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

  • 🟩 execution_time [-95.817µs; -71.966µs] or [-30.589%; -22.975%]
  • 🟩 throughput [+1050.950op/s; +1261.849op/s] or [+32.761%; +39.336%]

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

  • 🟩 execution_time [-138.384µs; -116.024µs] or [-37.856%; -31.740%]
  • 🟩 throughput [+1341.756op/s; +1477.314op/s] or [+48.150%; +53.015%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+300.011ms; +300.771ms] or [+149.736%; +150.116%]

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

  • 🟥 execution_time [+410.833ms; +416.516ms] or [+446.387%; +452.562%]

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

  • unstable execution_time [+297.454ms; +347.575ms] or [+225.854%; +263.910%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+361.530ms; +425.163ms] or [+166.228%; +195.486%]
  • 🟥 throughput [-636.699op/s; -590.068op/s] or [-57.691%; -53.466%]

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

  • unstable execution_time [+204.394ms; +337.669ms] or [+87.104%; +143.900%]
  • 🟥 throughput [-674.041op/s; -590.542op/s] or [-44.959%; -39.389%]

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

  • 🟥 execution_time [+328.236ms; +339.388ms] or [+196.323%; +202.993%]
  • 🟥 throughput [-420.110op/s; -380.015op/s] or [-29.252%; -26.460%]

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

  • 🟩 execution_time [-189.416µs; -157.493µs] or [-9.595%; -7.978%]
  • 🟩 throughput [+45.033op/s; +53.510op/s] or [+8.890%; +10.563%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 allocated_mem [+96 bytes; +97 bytes] or [+12.092%; +12.103%]
  • 🟥 execution_time [+301.907ms; +303.834ms] or [+152.034%; +153.005%]
  • 🟥 throughput [-18629.969op/s; -16717.292op/s] or [-5.995%; -5.379%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+12.114%; +12.124%]
  • 🟥 execution_time [+301.828ms; +308.445ms] or [+151.246%; +154.562%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+12.114%; +12.124%]
  • 🟥 execution_time [+301.779ms; +309.445ms] or [+151.601%; +155.452%]
  • 🟥 throughput [-34733.779op/s; -25233.912op/s] or [-7.317%; -5.316%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+11.165%; +11.177%]
  • 🟥 execution_time [+301.382ms; +303.097ms] or [+151.344%; +152.205%]
  • 🟥 throughput [-23439.249op/s; -19979.478op/s] or [-7.853%; -6.693%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+12.493%; +12.506%]
  • 🟥 execution_time [+297.640ms; +307.497ms] or [+147.170%; +152.044%]
  • 🟥 throughput [-69843.000op/s; -54404.208op/s] or [-11.253%; -8.766%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+11.422%; +11.434%]
  • 🟥 execution_time [+303.109ms; +307.456ms] or [+153.629%; +155.832%]
  • 🟥 throughput [-40219.224op/s; -31945.842op/s] or [-8.685%; -6.898%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 allocated_mem [+96 bytes; +97 bytes] or [+11.197%; +11.208%]
  • 🟥 execution_time [+305.452ms; +307.363ms] or [+153.309%; +154.269%]
  • 🟥 throughput [-42924.634op/s; -38374.937op/s] or [-11.136%; -9.955%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+10.618%; +10.631%]
  • 🟥 execution_time [+302.544ms; +314.530ms] or [+150.791%; +156.764%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+10.618%; +10.631%]
  • 🟥 execution_time [+301.216ms; +307.639ms] or [+149.852%; +153.048%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472

  • 🟥 allocated_mem [+96 bytes; +97 bytes] or [+6.002%; +6.011%]
  • 🟥 throughput [-14364.833op/s; -12893.858op/s] or [-5.776%; -5.185%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+5.627%; +5.636%]
  • 🟩 execution_time [-16.661ms; -13.019ms] or [-7.748%; -6.054%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+5.605%; +5.617%]

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

  • unstable execution_time [+18.450µs; +62.425µs] or [+4.557%; +15.419%]

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

  • 🟩 allocated_mem [-26.310KB; -26.287KB] or [-9.597%; -9.589%]
  • unstable execution_time [-34.083µs; +21.318µs] or [-6.736%; +4.213%]

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

  • unstable execution_time [+13.287µs; +19.519µs] or [+31.407%; +46.138%]
  • 🟥 throughput [-7396.421op/s; -5370.343op/s] or [-31.137%; -22.607%]

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

  • unstable execution_time [-13.858µs; -6.344µs] or [-21.500%; -9.843%]
  • unstable throughput [+1508.803op/s; +3147.863op/s] or [+9.257%; +19.313%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+303.371ms; +304.865ms] or [+153.341%; +154.096%]

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

  • 🟥 execution_time [+303.275ms; +305.533ms] or [+154.366%; +155.515%]

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

  • 🟥 execution_time [+300.426ms; +303.252ms] or [+150.400%; +151.815%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+9.197%; +9.208%]
  • 🟥 throughput [-38253.297op/s; -36466.840op/s] or [-10.590%; -10.095%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+9.226%; +9.238%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+9.226%; +9.238%]
  • 🟥 throughput [-35749.777op/s; -26460.484op/s] or [-8.461%; -6.262%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+299.264ms; +301.426ms] or [+149.156%; +150.234%]

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

  • 🟥 allocated_mem [+96 bytes; +96 bytes] or [+6.000%; +6.010%]
  • 🟥 execution_time [+300.720ms; +307.573ms] or [+151.007%; +154.448%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+5.819%; +5.828%]
  • 🟥 execution_time [+305.139ms; +309.023ms] or [+154.747%; +156.717%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+298.907ms; +299.928ms] or [+149.096%; +149.606%]
  • 🟩 throughput [+65366177.211op/s; +65692673.620op/s] or [+47.604%; +47.841%]

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

  • 🟥 execution_time [+411.411ms; +417.170ms] or [+511.663%; +518.825%]

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

  • 🟥 execution_time [+299.941ms; +301.079ms] or [+149.603%; +150.171%]
  • 🟩 throughput [+18579407.995op/s; +19559431.378op/s] or [+8.229%; +8.664%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472

  • 🟥 allocated_mem [+31 bytes; +32 bytes] or [+5.244%; +5.256%]
  • 🟥 throughput [-64162.181op/s; -61915.335op/s] or [-7.161%; -6.910%]

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

  • 🟩 throughput [+57075.019op/s; +77653.117op/s] or [+5.329%; +7.250%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472

  • 🟥 allocated_mem [+31 bytes; +32 bytes] or [+6.037%; +6.047%]
  • 🟥 throughput [-119881.135op/s; -115449.573op/s] or [-10.974%; -10.568%]

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

  • 🟥 allocated_mem [+31 bytes; +32 bytes] or [+6.057%; +6.065%]

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

  • 🟥 allocated_mem [+31 bytes; +32 bytes] or [+6.059%; +6.069%]

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

  • 🟩 throughput [+28708.918op/s; +33568.301op/s] or [+5.213%; +6.095%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+15.733%; +15.745%]
  • 🟥 throughput [-69677.687op/s; -65944.322op/s] or [-10.198%; -9.651%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+14.810%; +14.823%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+14.810%; +14.821%]
  • 🟥 throughput [-58656.879op/s; -43873.748op/s] or [-8.190%; -6.126%]

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 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 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.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1

@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-calltargets branch from 6962620 to 2674581 Compare July 21, 2026 09:34
@pablomartinezbernardo pablomartinezbernardo changed the title [Azure Event Grid] Register outbound SDK calltargets [Tracer] (Event Grid 2/5) Register outbound SDK calltargets Jul 21, 2026
@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-calltargets branch 2 times, most recently from 2674581 to ab8152d Compare July 22, 2026 09:01
@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-contract-core branch 2 times, most recently from a43a196 to a6f6e65 Compare July 24, 2026 08:10
@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-calltargets branch from ab8152d to 2f6ba44 Compare July 24, 2026 08:10
@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 (8912) and master.

✅ No regressions detected

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

@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-calltargets branch from 2f6ba44 to 9818224 Compare July 24, 2026 10:46
@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-contract-core branch from a6f6e65 to 4a68967 Compare July 24, 2026 10:46
@pablomartinezbernardo
pablomartinezbernardo marked this pull request as ready for review July 24, 2026 14:52
@pablomartinezbernardo
pablomartinezbernardo requested review from a team as code owners July 24, 2026 14:52
@pablomartinezbernardo
pablomartinezbernardo requested review from vandonr and removed request for a team July 24, 2026 14:52
@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-calltargets branch from 9818224 to 7a0f908 Compare July 27, 2026 09:22
@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-contract-core branch from 4a68967 to c67ae6c Compare July 27, 2026 09:22
@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-calltargets branch from 7a0f908 to 7af02af Compare July 29, 2026 09:43
@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-contract-core branch from c67ae6c to 14823fd Compare July 29, 2026 09:43

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

I wish we could unify all those instrumentation targets into something more centralized in the package, but there doesn't seem to be any good candidate

@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-contract-core branch from 14823fd to af3da06 Compare September 10, 2026 12:34
@pablomartinezbernardo
pablomartinezbernardo requested a review from a team as a code owner September 10, 2026 12:34
@pablomartinezbernardo
pablomartinezbernardo requested a review from a team as a code owner September 10, 2026 12:34
@pablomartinezbernardo
pablomartinezbernardo requested review from zacharycmontoya and removed request for a team September 10, 2026 12:34
@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-calltargets branch from 7af02af to 05dc004 Compare September 10, 2026 12:34
[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class EventGridPublisherClientSendCloudEventsAsyncIntegration
{
internal static CallTargetState OnMethodBegin<TTarget, TEvents>(TTarget instance, ref TEvents events, CancellationToken cancellationToken)

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.

For the best duck-typing performance, you should add a generic constraint so we do the ducktyping upfront and we don't have to do it later on in downstream method calls. And then in the EventGridCommon.CreateProducerSpan you can do the same, where you have the generic constraint TTarget : IEventGridPublisherClient

Suggested change
internal static CallTargetState OnMethodBegin<TTarget, TEvents>(TTarget instance, ref TEvents events, CancellationToken cancellationToken)
internal static CallTargetState OnMethodBegin<TTarget, TEvents>(TTarget instance, ref TEvents events, CancellationToken cancellationToken)
where TTarget : IEventGridPublisherClient

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.

This feedback applies to all the calltarget OnMethodBegin's where you call EventGridCommon.CreateProducerSpan

public sealed class EventGridSenderClientSendIntegration
{
internal static CallTargetState OnMethodBegin<TTarget, TCloudEvent>(TTarget instance, TCloudEvent cloudEvent, CancellationToken cancellationToken)
where TTarget : IEventGridSenderClient

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.

In a similar vein to my other duck-typing comment, I recommend doing the duck-type up front since we know what type it must be. Since you'll may want to handle a "null" singular event later, you'd then also make sure that ICloudEvent implements the IDuckType interface so you can check cloudEvent.Instance is not null as the "null check"

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

LGTM with some small suggestions for eager duck-typing

@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-contract-core branch from af3da06 to fda1d6a Compare September 15, 2026 14:03
@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-calltargets branch 2 times, most recently from 3a30bb0 to c2d2c85 Compare September 15, 2026 15:12
@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-contract-core branch from fda1d6a to cd06b71 Compare September 15, 2026 15:12
@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-calltargets branch from c2d2c85 to 52645d7 Compare September 16, 2026 11:22
@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-contract-core branch from cd06b71 to edb4c37 Compare September 16, 2026 11:22
@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-calltargets branch from 52645d7 to 525e44f Compare October 2, 2026 08:35
@pablomartinezbernardo
pablomartinezbernardo force-pushed the pmartinez/event-grid-contract-core branch from edb4c37 to c58e89b Compare October 2, 2026 08:35

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

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.

3 participants