Skip to content

[Feature Flags] Add agentless EVP fallback transport - #9235

Merged
leoromanovsky merged 11 commits into
masterfrom
leo.romanovsky/fflsdk-189-evp-fallback-dotnet-master
Oct 15, 2026
Merged

leoromanovsky merged 11 commits into
masterfrom
leo.romanovsky/fflsdk-189-evp-fallback-dotnet-master

Conversation

@leoromanovsky

@leoromanovsky leoromanovsky commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Agentless configuration lets customers evaluate flags without running an Agent, but exposure delivery still requires its local EVP proxy. Evaluations can succeed while their experiment exposures are lost.

flowchart LR
    C[Agentless configuration] --> E[Flag evaluation]
    E --> X[Exposure batch]
    X --> A[Local Agent required]
    X -. missing route .-> D[Direct EVP intake]
Loading

Changes and Decisions

This is the single-commit final activation after endpoint-bound discovery #9352 and bounded exposure lifecycle #9353. It keeps Remote Config on its historical fixed EVP v2 behavior and does not add flag-evaluation emission.

Agentless delivery prefers local EVP v4, then v2, only when discovery confirms forwarding of both SDK identity headers. Configured Agent path prefixes are preserved. Otherwise it uses canonical HTTPS intake; API keys remain direct-only, relay headers local-only, and redirects are disabled for Agentless delivery.

Direct selection is sticky. An unavailable route has bounded recovery; each batch has bounded discovery waiting. The current batch can move to direct only after local 404/405 or a proven pre-send connection failure. Ambiguous failures never replay that batch, preventing duplicate exposures. Identity, credentials and this replay policy ship together.

flowchart LR
    E[Agentless exposure batch] --> R{Selected route}
    R -->|Identity-capable v4 or v2| A[Local relay]
    R -->|No eligible relay| D[Direct HTTPS intake]
    A -->|404 / 405 or proven pre-send failure| D
    A -->|Ambiguous failure| N[No current-batch replay]
    D --> S[Direct remains selected]
Loading

@linear-code

linear-code Bot commented Sep 12, 2026

Copy link
Copy Markdown

FFLSDK-189

@pr-commenter

pr-commenter Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-10-15 03:13:41

Comparing candidate commit 89e841e in PR branch leo.romanovsky/fflsdk-189-evp-fallback-dotnet-master with baseline commit 2cc8452 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 12 performance regressions! Performance is the same for 60 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 [-27288.082op/s; -24424.069op/s] or [-7.686%; -6.879%]

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%]
  • 🟥 throughput [-35188.064op/s; -27317.040op/s] or [-8.698%; -6.752%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net472

  • 🟥 allocated_mem [+271 bytes; +272 bytes] or [+9.338%; +9.348%]
  • 🟥 throughput [-11772.662op/s; -11494.198op/s] or [-13.439%; -13.121%]

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

  • 🟥 allocated_mem [+199 bytes; +200 bytes] or [+9.426%; +9.438%]
  • 🟥 throughput [-8712.993op/s; -7817.393op/s] or [-5.919%; -5.310%]

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

  • 🟥 allocated_mem [+199 bytes; +200 bytes] or [+7.569%; +7.581%]
  • 🟥 throughput [-13163.695op/s; -11871.017op/s] or [-10.446%; -9.420%]

scenario:Benchmarks.Trace.NLogBenchmark.EnrichedLog net472

  • 🟥 throughput [-8709.592op/s; -8035.851op/s] or [-6.672%; -6.156%]

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 [+8207.055op/s; +9903.288op/s] or [+5.343%; +6.448%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-8431.205op/s; -7914.062op/s] or [-9.997%; -9.384%]

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

  • 🟥 throughput [-8625.226op/s; -6298.049op/s] or [-7.250%; -5.294%]

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

  • 🟥 throughput [-13678.472op/s; -12323.728op/s] or [-13.908%; -12.531%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 allocated_mem [+1.669KB; +1.669KB] or [+50.709%; +50.724%]
  • 🟥 execution_time [+306.200ms; +308.895ms] or [+151.947%; +153.285%]
  • 🟥 throughput [-54.982op/s; -50.790op/s] or [-9.892%; -9.138%]

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

  • 🟥 allocated_mem [+1.028KB; +1.028KB] or [+38.119%; +38.131%]
  • 🟥 execution_time [+378.731ms; +380.236ms] or [+299.221%; +300.409%]
  • 🟩 throughput [+62.355op/s; +64.860op/s] or [+8.221%; +8.552%]

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

  • 🟥 allocated_mem [+1.104KB; +1.104KB] or [+40.938%; +40.950%]
  • 🟥 execution_time [+400.287ms; +401.764ms] or [+354.239%; +355.546%]

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

  • 🟥 allocated_mem [+4.758KB; +4.758KB] or [+100.159%; +100.174%]
  • 🟥 throughput [-63752.040op/s; -63286.272op/s] or [-49.602%; -49.240%]

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

  • 🟥 allocated_mem [+3.880KB; +3.880KB] or [+82.058%; +82.072%]
  • 🟩 execution_time [-15.513ms; -11.335ms] or [-7.245%; -5.294%]
  • 🟥 throughput [-61101.502op/s; -58344.774op/s] or [-44.601%; -42.588%]

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

  • 🟥 allocated_mem [+4.608KB; +4.608KB] or [+99.641%; +99.654%]
  • 🟥 throughput [-49325.639op/s; -47050.522op/s] or [-44.596%; -42.539%]

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

  • 🟥 allocated_mem [+1.380KB; +1.380KB] or [+111.648%; +111.662%]
  • 🟥 throughput [-352947.405op/s; -348591.290op/s] or [-36.038%; -35.593%]

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

  • 🟥 allocated_mem [+543 bytes; +544 bytes] or [+44.437%; +44.446%]
  • 🟩 execution_time [-26.678ms; -21.810ms] or [-11.897%; -9.726%]
  • 🟥 throughput [-107890.278op/s; -83989.033op/s] or [-11.526%; -8.973%]

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

  • 🟥 allocated_mem [+1.344KB; +1.344KB] or [+111.253%; +111.267%]
  • 🟥 throughput [-176874.582op/s; -160882.100op/s] or [-25.413%; -23.116%]

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

  • 🟥 allocated_mem [+3.378KB; +3.378KB] or [+89.003%; +89.017%]
  • 🟥 throughput [-76934.561op/s; -76141.438op/s] or [-51.776%; -51.242%]

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

  • 🟥 allocated_mem [+3.336KB; +3.336KB] or [+88.150%; +88.161%]
  • 🟥 throughput [-75313.548op/s; -72410.335op/s] or [-47.921%; -46.074%]

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

  • 🟥 allocated_mem [+3.264KB; +3.264KB] or [+88.493%; +88.506%]
  • 🟥 throughput [-56900.523op/s; -54282.493op/s] or [-45.329%; -43.243%]

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

  • 🟥 throughput [-297714.096op/s; -274959.024op/s] or [-9.057%; -8.365%]

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

  • 🟩 throughput [+237491.512op/s; +259683.064op/s] or [+7.919%; +8.659%]

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

  • 🟩 execution_time [-19.048ms; -14.717ms] or [-8.781%; -6.784%]

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

  • 🟩 allocated_mem [-13.759KB; -13.757KB] or [-42.326%; -42.318%]
  • 🟥 execution_time [+299.108ms; +300.396ms] or [+149.454%; +150.098%]
  • 🟩 throughput [+903.353op/s; +936.116op/s] or [+9.977%; +10.339%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+300.239ms; +303.366ms] or [+151.411%; +152.988%]
  • 🟩 throughput [+2221.615op/s; +2433.392op/s] or [+16.992%; +18.612%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+300.428ms; +303.123ms] or [+151.332%; +152.690%]
  • 🟩 throughput [+1776.870op/s; +1915.707op/s] or [+17.155%; +18.495%]

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

  • 🟥 execution_time [+296.392ms; +297.254ms] or [+145.576%; +145.999%]
  • 🟩 throughput [+563.610op/s; +576.045op/s] or [+14.941%; +15.271%]

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

  • 🟥 execution_time [+296.500ms; +298.954ms] or [+144.948%; +146.148%]
  • 🟩 throughput [+2751.189op/s; +2826.064op/s] or [+39.970%; +41.057%]

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

  • 🟥 execution_time [+298.976ms; +300.890ms] or [+149.428%; +150.384%]
  • 🟩 throughput [+1377.137op/s; +1410.319op/s] or [+27.335%; +27.994%]

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

  • 🟩 execution_time [-145.578µs; -141.566µs] or [-29.889%; -29.065%]
  • 🟩 throughput [+845.467op/s; +872.014op/s] or [+41.178%; +42.471%]

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

  • 🟩 execution_time [-132.628µs; -105.727µs] or [-30.418%; -24.248%]
  • 🟩 throughput [+794.530op/s; +921.502op/s] or [+34.543%; +40.063%]

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

  • 🟩 execution_time [-139.828µs; -117.788µs] or [-29.958%; -25.237%]
  • 🟩 throughput [+751.683op/s; +835.306op/s] or [+34.699%; +38.559%]

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

  • 🟩 execution_time [-126.738µs; -122.678µs] or [-34.218%; -33.122%]
  • 🟩 throughput [+1349.099op/s; +1393.894op/s] or [+49.964%; +51.623%]

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

  • 🟩 execution_time [-89.039µs; -64.815µs] or [-28.426%; -20.692%]
  • 🟩 throughput [+921.052op/s; +1142.112op/s] or [+28.712%; +35.603%]

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

  • 🟩 execution_time [-138.093µs; -115.735µs] or [-37.777%; -31.661%]
  • 🟩 throughput [+1336.681op/s; +1472.154op/s] or [+47.968%; +52.830%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.901ms; +300.530ms] or [+149.681%; +149.995%]

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

  • 🟥 execution_time [+415.044ms; +423.441ms] or [+450.962%; +460.086%]

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

  • unstable execution_time [+351.924ms; +367.573ms] or [+267.212%; +279.095%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+328.491ms; +392.564ms] or [+151.037%; +180.497%]
  • 🟥 throughput [-588.573op/s; -536.133op/s] or [-53.331%; -48.579%]

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

  • unstable execution_time [+207.123ms; +340.369ms] or [+88.267%; +145.051%]
  • 🟥 throughput [-672.417op/s; -588.924op/s] or [-44.850%; -39.281%]

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

  • unstable execution_time [+252.108ms; +310.699ms] or [+150.790%; +185.834%]
  • 🟥 throughput [-377.792op/s; -342.607op/s] or [-26.305%; -23.855%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 allocated_mem [+96 bytes; +97 bytes] or [+12.092%; +12.103%]
  • 🟥 execution_time [+303.056ms; +305.248ms] or [+152.613%; +153.717%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+12.114%; +12.124%]
  • 🟥 execution_time [+301.544ms; +302.971ms] or [+151.104%; +151.819%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+12.114%; +12.124%]
  • 🟥 execution_time [+300.506ms; +303.556ms] or [+150.962%; +152.494%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+11.165%; +11.177%]
  • 🟥 execution_time [+302.424ms; +304.365ms] or [+151.867%; +152.842%]
  • 🟥 throughput [-24247.980op/s; -21873.684op/s] or [-8.123%; -7.328%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+12.493%; +12.506%]
  • 🟥 execution_time [+296.803ms; +300.254ms] or [+146.756%; +148.462%]
  • 🟥 throughput [-60754.318op/s; -53184.200op/s] or [-9.789%; -8.569%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+11.422%; +11.434%]
  • 🟥 execution_time [+301.077ms; +304.667ms] or [+152.599%; +154.419%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 allocated_mem [+96 bytes; +97 bytes] or [+11.197%; +11.208%]
  • 🟥 execution_time [+300.408ms; +302.224ms] or [+150.778%; +151.689%]
  • 🟥 throughput [-28066.845op/s; -26137.662op/s] or [-7.281%; -6.781%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+10.618%; +10.631%]
  • 🟥 execution_time [+299.873ms; +302.257ms] or [+149.459%; +150.647%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+10.618%; +10.631%]
  • 🟥 execution_time [+299.453ms; +303.100ms] or [+148.975%; +150.789%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472

  • 🟥 allocated_mem [+96 bytes; +97 bytes] or [+6.002%; +6.011%]
  • 🟥 throughput [-19058.681op/s; -17722.686op/s] or [-7.664%; -7.127%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+5.627%; +5.636%]
  • 🟩 execution_time [-16.456ms; -12.700ms] or [-7.652%; -5.906%]

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 [-0.835µs; +43.661µs] or [-0.206%; +10.785%]

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

  • 🟩 allocated_mem [-18.487KB; -18.464KB] or [-6.744%; -6.735%]
  • unstable execution_time [-36.205µs; +23.488µs] or [-7.156%; +4.642%]
  • unstable throughput [-76.200op/s; +131.258op/s] or [-3.802%; +6.550%]

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

  • unstable execution_time [-87.240µs; -25.429µs] or [-15.118%; -4.407%]
  • unstable throughput [+105.057op/s; +281.399op/s] or [+6.002%; +16.077%]

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

  • 🟥 execution_time [+2.808µs; +6.235µs] or [+6.636%; +14.738%]
  • 🟥 throughput [-3214.776op/s; -1558.707op/s] or [-13.533%; -6.562%]

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

  • unstable execution_time [-17.237µs; -10.757µs] or [-26.743%; -16.689%]
  • 🟩 throughput [+2875.229op/s; +4195.982op/s] or [+17.640%; +25.744%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+303.380ms; +304.976ms] or [+153.345%; +154.152%]

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

  • 🟥 execution_time [+301.752ms; +303.702ms] or [+153.591%; +154.583%]

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

  • 🟥 execution_time [+299.849ms; +302.204ms] or [+150.111%; +151.290%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+9.197%; +9.208%]
  • 🟥 throughput [-45570.030op/s; -44284.764op/s] or [-12.615%; -12.259%]

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 [-34475.735op/s; -26247.360op/s] or [-8.159%; -6.212%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+297.762ms; +300.053ms] or [+148.408%; +149.549%]

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

  • 🟥 allocated_mem [+96 bytes; +96 bytes] or [+6.000%; +6.010%]
  • 🟥 execution_time [+299.880ms; +301.817ms] or [+150.586%; +151.558%]

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

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+5.819%; +5.828%]
  • 🟥 execution_time [+301.633ms; +303.819ms] or [+152.969%; +154.078%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.272ms; +299.906ms] or [+149.279%; +149.595%]
  • 🟩 throughput [+61173479.270op/s; +61426462.212op/s] or [+44.550%; +44.735%]

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

  • 🟥 execution_time [+419.395ms; +425.141ms] or [+521.592%; +528.738%]

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

  • 🟥 execution_time [+299.351ms; +300.313ms] or [+149.309%; +149.789%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472

  • 🟥 allocated_mem [+31 bytes; +32 bytes] or [+5.244%; +5.256%]
  • 🟥 throughput [-93139.094op/s; -87781.170op/s] or [-10.394%; -9.796%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472

  • 🟥 allocated_mem [+31 bytes; +32 bytes] or [+6.037%; +6.047%]
  • 🟥 throughput [-160288.092op/s; -157208.873op/s] or [-14.673%; -14.391%]

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 net472

  • 🟥 throughput [-41989.777op/s; -38546.709op/s] or [-9.355%; -8.588%]

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

  • 🟩 throughput [+39268.298op/s; +43634.691op/s] or [+7.130%; +7.923%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+15.733%; +15.745%]
  • 🟥 throughput [-85103.580op/s; -81381.828op/s] or [-12.455%; -11.911%]

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 [-57453.478op/s; -42665.001op/s] or [-8.022%; -5.957%]

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

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

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

✅ No regressions detected

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

@leoromanovsky
leoromanovsky marked this pull request as ready for review September 21, 2026 14:40
@leoromanovsky
leoromanovsky requested review from a team as code owners September 21, 2026 14:40
@leoromanovsky
leoromanovsky requested review from anna-git, danyal002 and vjfridge and removed request for a team September 21, 2026 14:40
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-21T14:52:51.012960Z 7eba078 Draft marked ready
🔒 Security Review ✅ Completed 2026-09-21T14:46:44.892738Z 7eba078 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@leoromanovsky
leoromanovsky requested review from pavlokhrebto and removed request for danyal002 September 21, 2026 14:40

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

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

Invalidate cached capabilities on endpoint replacement and reject stale responses before publishing configuration or hashes. Report EVP identity-header forwarding support without changing product routing.

Environment: Datadog workspace
Preserve historical event routing while draining queued exposures safely during module shutdown.

Environment: Datadog workspace
Prefer identity-capable local relays and keep a credential-isolated direct route with conservative replay and sticky selection.

Environment: Datadog workspace
@leoromanovsky
leoromanovsky force-pushed the leo.romanovsky/fflsdk-189-evp-fallback-dotnet-master branch from f439192 to 8d55124 Compare October 1, 2026 22:29
@leoromanovsky
leoromanovsky changed the base branch from master to leo.romanovsky/fflsdk-189-dotnet-exposure-lifecycle October 1, 2026 22:31
@leoromanovsky
leoromanovsky removed the request for review from pavlokhrebto October 2, 2026 11:59
leoromanovsky added a commit that referenced this pull request Oct 8, 2026
## Motivation

Changing the Agent endpoint at runtime must not make the SDK trust
capabilities learned from the previous Agent. Cached configuration and
late responses currently cross that boundary, which can misroute
telemetry or lose its producer identity.

```mermaid
flowchart LR
    A[Old Agent request] --> C[Cached capabilities]
    E[Endpoint changes] -. missing invalidation .-> C
    C --> B[Replacement Agent]
```

## Changes and Decisions

Bind each discovery result to the immutable exporter settings used for
its request. Replacing the endpoint clears cached configuration and
refresh hashes; late responses from the old endpoint cannot publish
capabilities or hashes. An identical response from the replacement still
notifies consumers.

Discovery also reports whether the relay forwards both EVP
producer-identity headers. This exposes a capability; it does not change
any product's route selection or enable direct intake.

This is the foundation of the delivery stack: discovery here, [bounded
exposure lifecycle in
#9353](#9353), then
[Agentless fallback in
#9235](#9235).

```mermaid
flowchart LR
    E[Current exporter settings] --> R[Discovery request]
    R --> G{Still current?}
    G -->|Yes| C[Publish capabilities for this endpoint]
    G -->|No| D[Discard old response]
```
Base automatically changed from leo.romanovsky/fflsdk-189-dotnet-exposure-lifecycle to master October 9, 2026 00:01
leoromanovsky added a commit that referenced this pull request Oct 9, 2026
…er (#9353)

## Motivation

Short-lived applications can lose exposures queued while another batch
is being sent. Shutdown currently signals the worker without waiting for
a final drain, and a concurrent evaluation can enqueue after shutdown
begins.

```mermaid
flowchart LR
    E[Evaluations] --> Q[Exposure queue]
    S[Shutdown] -. missing final drain .-> Q
    Q --> A[Agent EVP v2]
```

## Changes and Decisions

Separate the existing local sender from exposure batching, give the
Feature Flags module ownership of its lifetime, and dispose its settings
subscriptions. Exposure shutdown rejects new enqueue attempts, drains
queued events and waits at most ten seconds for the worker; the timed
wait does not depend on an available ThreadPool worker, so a stalled
network cannot indefinitely block exposure disposal.

This PR targets master following the merge of [discovery
#9352](#9352). Both
configuration modes keep their historical fixed EVP v2 route, headers
and redirect defaults. There is no discovery-based selection or
direct-intake activation here; the complete Agentless policy remains in
[#9235](#9235).

```mermaid
flowchart LR
    S[Shutdown] --> R[Reject new exposures]
    R --> F[Final queue drain]
    F --> T[Existing fixed-v2 sender]
    T --> A[Local Agent]
    F --> B[Bounded wait]
```

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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.

Bits Code Review: FAIL

Direct exposure delivery on .NET Framework can stall indefinitely when intake or its HTTPS proxy stops responding, blocking subsequent batches despite the configured five-second timeout.

Open Bits AI session

🤖 Bits Code Review · Commit 3cc8a5a · @DataDog review to ask questions

Keep recovery state bound to its Agent endpoint, bound asynchronous direct sends on .NET Framework, and align the UDS test with the selected target framework.

Environment: Datadog workspace
Block the old Agent notification between discovery subscribers and prove it cannot authorize the replacement endpoint or release its discovery waiter.

Environment: Datadog workspace
Remove the UTF-8 BOM to match the repository formatter.

Environment: Datadog workspace
@leoromanovsky
leoromanovsky requested review from zacharycmontoya and removed request for anna-git October 9, 2026 15:42

@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 for sdk-capabilities

@zacharycmontoya

Copy link
Copy Markdown
Contributor

@leoromanovsky can you rebase your stack or otherwise pull in the latest .github/CODEOWNERS from master so that the codeowners is fixed? There was a recent shuffle in the apm-sdk-capabilities codeowners declarations

Bring in the current SDK capabilities team ownership and tracer ownership corrections.

Environment: Datadog workspace
Keep exception construction out of the HTTP parsing path without changing EOF classification or messages.

Environment: Datadog workspace
@leoromanovsky
leoromanovsky requested a review from a team as a code owner October 15, 2026 02:02
@leoromanovsky
leoromanovsky requested review from cecile75 and removed request for a team October 15, 2026 02:02

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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.

Bits Code Review: PASS

More details

The reviewed routing separates direct credentials from local relay headers and avoids replaying batches after ambiguous local failures. Runtime behavior could not be exercised because the required .NET 11 preview SDK is unavailable.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 89e841e

@anna-git
anna-git self-requested a review October 15, 2026 08:53
@leoromanovsky

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-10-15 17:31:25 UTC ℹ️ Start processing command /merge


2026-10-15 17:31:27 UTC ❌ MergeQueue

The merge queue is disabled for this repository/branch.

@leoromanovsky
leoromanovsky merged commit c31cfdf into master Oct 15, 2026
144 of 147 checks passed
@leoromanovsky
leoromanovsky deleted the leo.romanovsky/fflsdk-189-evp-fallback-dotnet-master branch October 15, 2026 17:42
@github-actions github-actions Bot added this to the vNext-v3 milestone Oct 15, 2026
vjfridge added a commit that referenced this pull request Oct 19, 2026
…gh the Agent (#9351)

## Pre-merge blocker: no-Agent behavior

- [#9352](#9352) and
[#9353](#9353) are merged
and incorporated into this branch.
[#9235](#9235) remains
open; revisit no-Agent `flagevaluation` delivery when that transport
work lands.
- The related shared/exposure transport work does not yet wire up
no-Agent `flagevaluation` emission. Before merging this PR, decide and
validate transport reuse or an explicit no-Agent gating policy. The
current implementation remains Agent-only and can build/queue events
that cannot be delivered without an Agent. [Review
discussion](#9351 (comment)).

## Summary of changes

Adds aggregated `flagevaluation` track EVP events for successful and
unsuccessful Datadog OpenFeature evaluations, protecting targeting keys
and context by default without changing flag results.

- **Agent-only delivery today**, with the no-Agent decision blocked as
described above; related transport:
[#9235](#9235); replaces
the stale [#9139](#9139)
approach.
- Follows merged [Go](DataDog/dd-trace-go#5151),
[Java](DataDog/dd-trace-java#12042),
[Python](DataDog/dd-trace-py#20354), and
[Ruby](DataDog/dd-trace-rb#6222)
implementations, with [PII
guidance](https://github.com/DataDog/ffe-codegen-tools/pull/9) and
[JS](DataDog/dd-trace-js#10464) as additional
references.

## Key decisions / assumptions

- **Private by default.** Hash valid targeting keys at output, omit
context, and allowlist error codes. Only boolean `true` for
`observeFullEvaluationData` allows raw keys and bounded context; consent
and timestamp are captured once per evaluation.
- **One consent value across merged RCM configs.** Full data requires
consent from every currently active file (AND), recomputed on each
update—not combined with historical configurations. Any false, absent,
null, or malformed value selects protected mode. Existing flag-merging
behavior stays unchanged.
- **Background processing.** The caller captures metadata/bounded
context and enqueues without waiting for space. A dedicated worker
aggregates and sends, batching partial queues for up to 50 ms. Explicit
flush and shutdown wake it immediately; periodic sends remain every 10
seconds. Flush/shutdown waits are bounded. The five-second request
timeout does not bound legacy pipe/socket connection setup; that
existing shared-transport gap is [deferred from this
PR](#9351 (comment)).
- **Stable service tags.** Capture service/env/version when the writer
starts, after replaying the latest settings, and keep them for its
lifetime—as Go/Java/Ruby/JS do. Later tag changes require writer
recreation; Agent-address updates remain independent.
- **Bounded entries, not a fixed memory ceiling.** Queue: **4,096**,
matching Go/Java/Python/Ruby; full buckets: 10,000 per flag / 131,072
globally; degraded buckets: 32,768. Degraded events omit key/context and
exclude consent from bucket identity; exhausted capacity drops
telemetry, not evaluations.
- **Bounded consented context.** Capture at most 256 fields with
depth/size/visit limits, without scanning or sorting arbitrarily large
inputs. Rare hash collisions in oversized maps can change the retained
subset; only telemetry is affected.
- **Scoped transport.** Use the Agent’s EVP v2 route, with no
direct-intake fallback, discovery, or retries. Delivery is best-effort;
Agent 7.84.0 preserved SDK identity headers in testing, while 7.83.1
stripped them.

## Measured performance overhead

**Historical comparison: `b32fca42cc` vs master `f0114c8c71`, before the
worker-batching change; 4,096-entry queue.** ARM64 Linux/glibc, .NET
10.0.12; 100,000-evaluation bursts, medians of three runs. CPUs are
affinity slots, not quotas; process CPU/allocation include final flush,
caller latency does not.

| CPUs | Mode | Evaluation p50 / p95 (µs) | CPU (µs/evaluation) |
Allocation (bytes/evaluation) |
| --- | --- | --- | --- | --- |
| 1 | Baseline | 48.47 / 60.21 | 50.47 | 6,088 |
| 1 | Events disabled | 55.93 / 68.32 | 56.44 | 6,584 |
| 1 | Default protected | 67.77 / 112.38 | 79.26 | 6,837 |
| 1 | Full consent | 70.08 / 139.30 | 91.60 | 11,472 |
| 2 | Baseline | 10.85 / 11.38 | 11.86 | 6,088 |
| 2 | Events disabled | 12.23 / 12.79 | 13.49 | 6,584 |
| 2 | Default protected | 23.42 / 27.38 | 34.74 | 6,836 |
| 2 | Full consent | 28.18 / 31.96 | 43.64 | 11,470 |

- Default protected mode adds **~19 µs / ~13 µs** median evaluation
latency and **~57% / ~193%** process CPU per evaluation on one/two CPUs.
Disabling events avoids the writer but is **not zero-overhead**.
- Consented contexts add allocation. All **88 trials** passed the
delivery/privacy audit, including paced, sparse, high-cardinality, and
oversized-context workloads; **all 3,136,867 expected observations,
including warmup, were retained**.
- These synthetic measurements make the cost visible; they do not
establish acceptable production overhead. .NET reviewer assessment
remains open. A later [paired worker-batching
comparison](#9351 (comment))
improved protected burst latency/CPU, with a documented overload/drop
tradeoff; it is not a fresh comparison against master. Hook-list reuse
([FFL-3356](https://datadoghq.atlassian.net/browse/FFL-3356)) is now
included through merged
[#9334](#9334); the
historical measurements above predate that change.

[Historical methodology, full workload matrix, and memory
results](#9351 (comment)).
[Earlier experiments and validation
history](#9351 (comment))
used different artifacts/settings and are not an isolated optimization
comparison.

## Test coverage

- **Latest local post-merge validation at
[`cef427882a`](cef427882a854bad0710542bacc107d26191dd65):**
targeted feature-flag, telemetry, and metadata tests: **1,312 passed /
two skipped on each of .NET 10 and .NET Core 3.1**. Tracer builds passed
for all four target frameworks with zero warnings/errors. Subsequent
commits changed only CODEOWNERS; these runs do not replace final-head
external/performance validation.
- **At `7fe8e0651f`:** 780 feature-flag tests passed / two platform
skips; benchmark project built with zero warnings/errors. Full tracer
suite: **13,507 passed / 71 skipped / zero failed**. [Writer-attribution
fix and regression
coverage](7fe8e06).
- **At `b32fca42cc`:** 746 feature-flag tests passed / one skipped; full
tracer suite 13,473 passed / 70 skipped / zero failed. Benchmark project
built without warnings/errors.
- **[System-tests at
`b32fca42cc`](#9351 (comment)
all 51 Agent-only FFE tests passed, including all 12 EVP cases; baseline
passed the other 39 and failed only those 12 unimplemented cases. All
12,000 degradation observations retained.
- **[Dogfooding at
`b32fca42cc`](#9351 (comment)
identical results across 81 live, 24 controlled-consent, and six
no-Agent requests. Verified emission, SDK identity, strict consent, and
mixed-version/uninstrumented safety.
- Signed companion harness fixes: [system-tests
#7951](DataDog/system-tests#7951) and
[ffe-dogfooding
#131](https://github.com/ddoghq/ffe-dogfooding/pull/131), both awaiting
review. [Earlier
evidence](#9351 (comment))
is historical.

### Reviewer QA

Compare flag results with emission on/off and with the Agent
disconnected. Verify strict consent, protected payloads, and unchanged
exposure/span-enrichment behavior; disabling emission must produce no
new `flagevaluation` events.

## Blast radius

- Updates the provider/tracer metadata bridge and adds a hook, worker,
Agent requests, and diagnostic metrics. Both updated components are
required for full functionality; mixed-version and uninstrumented
behavior have dedicated tests.
- Events default on when feature flagging is active;
`DD_FLAGGING_EVALUATION_COUNTS_ENABLED=false` disables them. Hook
registration is decided when the provider is constructed; enabling
events after starting disabled requires provider recreation or an
application restart. Adds CPU/allocation and best-effort shutdown work;
consented snapshots retain more data.
- No changes to targeting rules, returned values, exposure payloads, or
configuration-fetching transport. Exposure Agent requests also receive
timeout protection, subject to the legacy connection-setup limitation
above. Existing Remote Config and Agentless configuration sources remain
supported; event delivery is Agent-only.

## External follow-ups

External/performance results above predate the latest review fixes and
need a final-head refresh. Remaining coordination, in addition to the
no-Agent blocker above:

- Release owner: confirm provider/tracer release versions.
- Companion harness PRs
[#7951](DataDog/system-tests#7951) /
[#131](https://github.com/ddoghq/ffe-dogfooding/pull/131): review and
manual merge.

[FFL-3356]:
https://datadoghq.atlassian.net/browse/FFL-3356?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
andrewlock added a commit that referenced this pull request Oct 22, 2026
)

## Summary of changes

Removes the opt-in `enforceAsyncTimeout` flag (and the unused
`_asyncTimeout` plumbing) from `ApiWebRequestFactory`/`ApiWebRequest`,
its callers (`AgentTransportStrategy`, `FeatureFlagsEvpTransport`,
tests), and deletes
`ApiWebRequestFactoryTests.AsyncDeadlineAbortsStalledJsonSendOnlyWhenEnabled`.

## Reason for change

#9235 added an opt-in `Timer` + `Abort()` deadline for async
`HttpWebRequest` sends. The refactor in #9145 replaces the send path,
and #9144 enforces `HttpWebRequest.Timeout` for every async send, so the
flag no longer does anything. The deleted test asserted behaviour
specific to the opt-in design: it disables `HttpWebRequest.Timeout`,
expects a separate deadline to fire anyway, and expects a
`WebException(RequestCanceled)`.

The previous implementation had multiple issues:
- Body writer stuck on something other than the request stream would
hang indefinitely
- Race condition when response returned just as the timer fires, killing
a response that's already returned
- Orphaned GetResponseAsync that succeeds after the abort is not handled

## Implementation details

Sits between #9145 (base) and #9144 in the stack.

## Test coverage

The deadline behaviour stays covered by:
- `ApiRequestTests`, added in #9144
-
`FlagEvaluationTransportTests.SlowTcpAgentTimesOutWithoutReplayingBatch`
- `ExposureApiTimeoutTests.LegacyExposureRequestsAbortStalledConnection`

On their own, #9145 and this PR have no async deadline on .NET
Framework, so `SlowTcpAgentTimesOutWithoutReplayingBatch` fails on net48
until #9144 is applied. With the full stack applied, all transport and
Feature Flags timeout tests pass locally on net48 and net10.0.

## Other details

Merge together with #9144.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

6 participants