Skip to content

[Feature Flags] Send the split serial id on exposure events - #9088

Open
danyal002 wants to merge 3 commits into
masterfrom
danyal.khan/EX-3416
Open

[Feature Flags] Send the split serial id on exposure events#9088
danyal002 wants to merge 3 commits into
masterfrom
danyal.khan/EX-3416

Conversation

@danyal002

@danyal002 danyal002 commented Aug 20, 2026

Copy link
Copy Markdown

Summary of changes

Add an optional serial_id field to the feature-flag exposure event, and send it when the split carries a serial id.

Reason for change

The exposures intake uses the serial id to find the holdout that an allocation comes from. The UFC compiler rewrites a holdout into a usual allocation before the tracer receives the flag configuration, so the exposure event holds no other link back to the holdout.

The tracer already reads the serial id and uses it for APM span enrichment. This change also puts it on the exposure event.

Implementation details

File Change
Exposure/Model/ExposureEvent.cs Add the optional SerialId property. It goes on the wire as a top-level serial_id.
FeatureFlagsEvaluator.cs Give the serial id from the split to the exposure dispatch.
Exposure/ExposureCache.cs Compare the serial id in the deduplication cache.
Exposure/ExposureApi.cs Make SerializerSettings internal, so that a test can assert the wire shape.

ResolveVariant gives the serial id to DispatchExposure directly. It does not read the value from the flag metadata, because ResolveVariant writes that metadata entry only when span enrichment is on.

The serializer includes nulls, so ExposureEvent gives SerialId a ShouldSerializeSerialId method. An event without a serial id omits the key instead of sending null. A JsonProperty named argument cannot do this, because AttributeTests forbids an attribute argument whose type is not in the core assembly, and NullValueHandling is an enum in Datadog.Trace. ProbeException.ShouldSerializeStackTrace solves the same problem the same way.

The tracer does not validate the value. The flag configuration layer validates it.

Test coverage

Nine new test cases in three classes:

  • ExposureEventTests — the wire shape: serial_id for 340132, serial_id for 0, and no key when the value is absent.
  • FeatureFlagsEvaluatorTests — the dispatched event, for a split with a serial id and for a split without one.
  • ExposureCacheTests — deduplication when the serial id appears, changes, disappears, and when it is 0.

A serial id of 0 is a usual value. Serial ids start at 0 for each organization, so the first allocation of every organization has one. The tests pin 0 as present, not as absent.

dotnet test tracer/test/Datadog.Trace.Tests/Datadog.Trace.Tests.csproj -f net10.0 \
  --filter "FullyQualifiedName~Datadog.Trace.Tests.FeatureFlags"

378 tests pass.

Other details

The deduplication cache now compares the serial id. A subject therefore sends one more exposure when its serial id appears or changes while the allocation key and the variant key stay the same. This is intended: a configuration refresh can add or change a serial id without changing either key, and the intake must receive the new value.

Part of the work to send the serial id from every Datadog SDK. DataDog/dd-trace-py#19753 and DataDog/dd-trace-go#5214 make the same change.

This description was generated by Claude.

@pr-commenter

pr-commenter Bot commented Aug 20, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-21 18:04:32

Comparing candidate commit 227e672 in PR branch danyal.khan/EX-3416 with baseline commit bf6901b in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 4 performance regressions! Performance is the same for 68 metrics, 0 unstable metrics, 65 known flaky benchmarks, 61 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.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartActiveSpan net472

  • 🟥 throughput [-12203.968op/s; -10685.771op/s] or [-6.408%; -5.610%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartRootSpan net472

  • 🟥 throughput [-10302.291op/s; -9534.539op/s] or [-5.525%; -5.113%]

scenario:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery net472

  • 🟥 throughput [-31040.735op/s; -26380.791op/s] or [-8.743%; -7.430%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net472

  • 🟥 throughput [-4787.160op/s; -4539.128op/s] or [-5.465%; -5.182%]

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 [-11966.289op/s; -10909.104op/s] or [-6.852%; -6.246%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-10514.830op/s; -9947.762op/s] or [-12.467%; -11.795%]

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

  • 🟥 throughput [-8382.914op/s; -7036.137op/s] or [-8.524%; -7.154%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 allocated_mem [+1.637KB; +1.637KB] or [+49.731%; +49.747%]
  • 🟥 execution_time [+311.170ms; +313.959ms] or [+154.414%; +155.798%]
  • 🟥 throughput [-59.904op/s; -55.679op/s] or [-10.778%; -10.018%]

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

  • 🟥 allocated_mem [+1.011KB; +1.011KB] or [+37.485%; +37.498%]
  • 🟥 execution_time [+384.450ms; +387.486ms] or [+303.739%; +306.138%]
  • 🟩 throughput [+62.884op/s; +68.385op/s] or [+8.291%; +9.016%]

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

  • 🟥 allocated_mem [+1.090KB; +1.090KB] or [+40.417%; +40.429%]
  • 🟥 execution_time [+396.884ms; +400.709ms] or [+351.227%; +354.612%]

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

  • 🟥 allocated_mem [+4.725KB; +4.725KB] or [+99.465%; +99.482%]
  • 🟥 throughput [-61172.151op/s; -60797.762op/s] or [-47.595%; -47.304%]

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

  • 🟥 allocated_mem [+3.848KB; +3.848KB] or [+81.379%; +81.391%]
  • 🟩 execution_time [-15.359ms; -11.164ms] or [-7.173%; -5.214%]
  • 🟥 throughput [-60247.682op/s; -57471.571op/s] or [-43.977%; -41.951%]

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

  • 🟥 allocated_mem [+4.576KB; +4.576KB] or [+98.954%; +98.966%]
  • 🟥 throughput [-48198.336op/s; -45949.999op/s] or [-43.577%; -41.544%]

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

  • 🟥 allocated_mem [+1.348KB; +1.348KB] or [+109.063%; +109.078%]
  • 🟥 throughput [-269900.602op/s; -265809.812op/s] or [-27.558%; -27.140%]

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

  • 🟥 allocated_mem [+511 bytes; +512 bytes] or [+41.822%; +41.834%]
  • 🟩 execution_time [-25.925ms; -19.271ms] or [-11.562%; -8.594%]
  • 🟥 throughput [-104211.012op/s; -77176.791op/s] or [-11.133%; -8.245%]

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

  • 🟥 allocated_mem [+1.312KB; +1.312KB] or [+108.600%; +108.616%]
  • 🟥 throughput [-163466.819op/s; -147487.832op/s] or [-23.487%; -21.191%]

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

  • 🟥 allocated_mem [+3.378KB; +3.378KB] or [+89.003%; +89.017%]
  • 🟥 throughput [-73627.948op/s; -72810.556op/s] or [-49.551%; -49.001%]

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

  • 🟥 allocated_mem [+3.336KB; +3.336KB] or [+88.150%; +88.161%]
  • 🟥 throughput [-73289.049op/s; -70380.763op/s] or [-46.633%; -44.782%]

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

  • 🟥 allocated_mem [+3.264KB; +3.264KB] or [+88.493%; +88.506%]
  • 🟥 throughput [-56559.249op/s; -53933.696op/s] or [-45.057%; -42.965%]

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

  • 🟩 throughput [+354298.221op/s; +378981.882op/s] or [+11.814%; +12.637%]

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

  • 🟩 execution_time [-19.096ms; -14.765ms] or [-8.802%; -6.806%]

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

  • 🟩 allocated_mem [-13.759KB; -13.757KB] or [-42.326%; -42.318%]
  • 🟥 execution_time [+299.703ms; +300.422ms] or [+149.751%; +150.111%]
  • 🟩 throughput [+894.378op/s; +945.032op/s] or [+9.878%; +10.438%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+298.867ms; +301.977ms] or [+150.719%; +152.288%]
  • 🟩 throughput [+2328.184op/s; +2540.300op/s] or [+17.807%; +19.429%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+300.625ms; +303.058ms] or [+151.431%; +152.657%]
  • 🟩 throughput [+1800.748op/s; +1926.666op/s] or [+17.385%; +18.601%]

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

  • 🟥 execution_time [+295.536ms; +297.263ms] or [+145.155%; +146.004%]
  • 🟩 throughput [+546.745op/s; +562.051op/s] or [+14.494%; +14.900%]

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

  • 🟥 execution_time [+298.651ms; +300.773ms] or [+145.999%; +147.037%]
  • 🟩 throughput [+2607.370op/s; +2677.598op/s] or [+37.880%; +38.900%]

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

  • 🟥 execution_time [+300.472ms; +301.188ms] or [+150.175%; +150.534%]
  • 🟩 throughput [+1381.908op/s; +1408.331op/s] or [+27.430%; +27.954%]

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

  • 🟩 execution_time [-144.114µs; -139.254µs] or [-29.589%; -28.591%]
  • 🟩 throughput [+826.111op/s; +860.654op/s] or [+40.235%; +41.918%]

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

  • 🟩 execution_time [-130.816µs; -104.055µs] or [-30.003%; -23.865%]
  • 🟩 throughput [+777.987op/s; +902.012op/s] or [+33.824%; +39.216%]

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

  • 🟩 execution_time [-141.390µs; -119.374µs] or [-30.293%; -25.576%]
  • 🟩 throughput [+765.673op/s; +848.852op/s] or [+35.345%; +39.185%]

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

  • 🟩 execution_time [-124.937µs; -120.131µs] or [-33.732%; -32.435%]
  • 🟩 throughput [+1307.324op/s; +1366.832op/s] or [+48.417%; +50.621%]

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

  • 🟩 execution_time [-102.488µs; -78.903µs] or [-32.719%; -25.190%]
  • 🟩 throughput [+1185.998op/s; +1387.257op/s] or [+36.971%; +43.245%]

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

  • 🟩 execution_time [-135.830µs; -113.374µs] or [-37.158%; -31.015%]
  • 🟩 throughput [+1295.399op/s; +1434.854op/s] or [+46.487%; +51.491%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.183ms; +299.903ms] or [+149.323%; +149.683%]

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

  • unstable execution_time [+404.976ms; +414.239ms] or [+440.023%; +450.088%]
  • 🟩 throughput [+796.134op/s; +1003.093op/s] or [+6.542%; +8.243%]

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

  • unstable execution_time [+219.683ms; +278.317ms] or [+166.803%; +211.324%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+322.846ms; +359.111ms] or [+148.442%; +165.116%]
  • 🟥 throughput [-519.753op/s; -482.485op/s] or [-47.095%; -43.718%]

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

  • unstable execution_time [+205.354ms; +338.599ms] or [+87.513%; +144.297%]
  • 🟥 throughput [-669.394op/s; -585.847op/s] or [-44.649%; -39.076%]

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

  • 🟥 execution_time [+343.172ms; +356.189ms] or [+205.257%; +213.043%]
  • 🟥 throughput [-413.178op/s; -376.947op/s] or [-28.769%; -26.246%]

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

  • unstable throughput [+11.562op/s; +49.503op/s] or [+3.324%; +14.230%]

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

  • 🟩 execution_time [-171.634µs; -108.424µs] or [-8.694%; -5.492%]
  • 🟩 throughput [+32.184op/s; +48.802op/s] or [+6.353%; +9.634%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+300.407ms; +303.657ms] or [+151.279%; +152.916%]

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

  • 🟥 execution_time [+301.308ms; +303.274ms] or [+150.986%; +151.971%]

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

  • 🟥 execution_time [+301.297ms; +305.047ms] or [+151.359%; +153.243%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+301.315ms; +302.772ms] or [+151.310%; +152.042%]

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

  • 🟥 execution_time [+298.871ms; +301.015ms] or [+147.778%; +148.839%]

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

  • 🟥 execution_time [+302.285ms; +306.152ms] or [+153.212%; +155.172%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+300.888ms; +302.567ms] or [+151.018%; +151.862%]

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

  • 🟥 execution_time [+300.011ms; +303.999ms] or [+149.528%; +151.516%]
  • 🟩 throughput [+39598.284op/s; +45429.733op/s] or [+7.863%; +9.021%]

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

  • 🟥 execution_time [+300.006ms; +303.261ms] or [+149.251%; +150.870%]

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

  • unstable execution_time [+11.785µs; +55.438µs] or [+2.911%; +13.694%]

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

  • 🟩 allocated_mem [-18.892KB; -18.869KB] or [-6.891%; -6.883%]
  • unstable execution_time [-38.946µs; +19.153µs] or [-7.697%; +3.785%]
  • unstable throughput [-63.864op/s; +143.723op/s] or [-3.187%; +7.172%]

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

  • 🟩 allocated_mem [-13.868KB; -13.848KB] or [-5.055%; -5.048%]

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

  • unstable execution_time [+8.686µs; +13.105µs] or [+20.531%; +30.976%]
  • 🟥 throughput [-5741.498op/s; -3842.618op/s] or [-24.170%; -16.176%]

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

  • unstable execution_time [-14.562µs; -7.088µs] or [-22.593%; -10.996%]
  • 🟩 throughput [+1763.278op/s; +3334.438op/s] or [+10.818%; +20.458%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.848ms; +304.366ms] or [+153.076%; +153.843%]

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

  • 🟥 execution_time [+303.270ms; +305.996ms] or [+154.363%; +155.751%]

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

  • 🟥 execution_time [+298.761ms; +301.908ms] or [+149.567%; +151.142%]

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

  • 🟩 throughput [+39427.329op/s; +45126.628op/s] or [+7.463%; +8.542%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+298.389ms; +300.454ms] or [+148.720%; +149.749%]

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

  • 🟥 execution_time [+300.518ms; +301.956ms] or [+150.906%; +151.628%]

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

  • 🟥 execution_time [+301.615ms; +304.046ms] or [+152.960%; +154.192%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.317ms; +301.269ms] or [+149.800%; +150.275%]
  • 🟩 throughput [+66198549.696op/s; +66564530.908op/s] or [+48.210%; +48.476%]

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

  • unstable execution_time [+323.912ms; +393.659ms] or [+402.842%; +489.586%]

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

  • 🟥 execution_time [+299.707ms; +300.741ms] or [+149.487%; +150.002%]
  • 🟩 throughput [+18266972.806op/s; +19233633.860op/s] or [+8.091%; +8.519%]

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

  • 🟩 throughput [+76023.101op/s; +93685.351op/s] or [+7.098%; +8.747%]

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

  • 🟩 throughput [+68711.836op/s; +79521.593op/s] or [+6.824%; +7.898%]

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

  • 🟩 throughput [+33326.235op/s; +46324.142op/s] or [+6.051%; +8.412%]

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

  • 🟩 throughput [+53278.741op/s; +70607.836op/s] or [+5.953%; +7.889%]

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.ActivityBenchmark.StartStopWithChild net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • 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 net6.0
  • 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.StartFinishScope netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.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 Aug 20, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

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

⚠️ Potential regressions detected

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration191.63 ± (191.44 - 192.16) ms201.90 ± (202.75 - 204.39) ms+5.4%❌⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1150.18 ± (1150.15 - 1156.46) ms1217.60 ± (1214.62 - 1224.80) ms+5.9%❌⬆️

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

@danyal002 danyal002 added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) feature_flags type:enhancement Improvement to an existing feature labels Aug 20, 2026
@danyal002
danyal002 marked this pull request as ready for review August 20, 2026 17:22
@danyal002
danyal002 requested review from a team as code owners August 20, 2026 17:22
@danyal002
danyal002 requested review from greghuels and typotter and removed request for a team August 20, 2026 17:22
danyal002 and others added 2 commits August 20, 2026 16:23
The intake uses the serial id to find the holdout that an allocation
comes from. The compiler rewrites a holdout into a usual allocation
before the tracer receives it, so the exposure event records no other
link back to it.

The evaluator passes the serial id from the split directly to the
exposure dispatch. It does not read it from the flag metadata, because
the metadata carries the serial id only when span enrichment is on.

The dedup cache now compares the serial id as well. A serial id that
appears or changes while the allocation and the variant stay the same
was swallowed before.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
AttributeTests forbids an attribute named argument whose type is not in
the core assembly, because such an attribute can throw
CustomAttributeFormatException when the owning assembly does not resolve.
The JsonProperty NullValueHandling argument is an enum in Datadog.Trace,
so it broke that test on every framework.

Use the Newtonsoft ShouldSerialize convention instead, as
ProbeException.ShouldSerializeStackTrace does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@danyal002
danyal002 force-pushed the danyal.khan/EX-3416 branch from 0dc148a to 37ae122 Compare August 20, 2026 20:24
Comment thread tracer/src/Datadog.Trace/FeatureFlags/Exposure/ExposureApi.cs
…teOnly

The field is internal only so that a test can assert the wire shape. The
attribute lets the analyzer stop other types from using it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
public const string ExposurePath = "evp_proxy/v2/api/v2/exposures";
private static readonly JsonSerializerSettings SerializerSettings = new()
[TestingAndPrivateOnly]
internal static readonly JsonSerializerSettings SerializerSettings = new()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Agree with the suggestion to add the attribute:

[TestingAndPrivateOnly]
internal static readonly JsonSerializerSettings SerializerSettings = new()

Assert.True(cache.Add(CreateSerialIdEvent(340132)));
Assert.True(cache.Add(CreateSerialIdEvent(340133)));
Assert.True(cache.Add(CreateSerialIdEvent(340132)));
Assert.Equal(1, cache.Size);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All three Add calls return true (not deduplicated) but Size stays 1. Consider adding a comment that this is intended and why size stays 1.

// Size stays 1: the key (flag + subject) is shared across all three events.
// Each Add replaces the stored Value rather than growing the cache.
Assert.Equal(1, cache.Size);

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) feature_flags type:enhancement Improvement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants