Skip to content

perf(native-spans): bound exporter batching - #9680

Closed
BridgeAR wants to merge 6 commits into
bengl/native-spans-attempt-3from
BridgeAR/2026-08-04-bound-native-export-batches
Closed

perf(native-spans): bound exporter batching#9680
BridgeAR wants to merge 6 commits into
bengl/native-spans-attempt-3from
BridgeAR/2026-08-04-bound-native-export-batches

Conversation

@BridgeAR

@BridgeAR BridgeAR commented Aug 4, 2026

Copy link
Copy Markdown
Member

Summary

Keep the existing flush timer authoritative after an in-flight native send and flush early at 2,000 pending spans. This draft is stacked on #9139.

Why

The stacked base waits up to two seconds before its first send, then bypasses batching after every settlement. Preserving the timer without a bound retained 1,269–1,773 MiB RSS. Libdatadog does not expose the pre-serialization payload size, so this uses a span-count bound.

The 2,000-span cap was the measured tradeoff. Raising it to 4,000 gained 0.4% CPU while adding 8.9% RSS. Raising it to 8,000 regressed CPU and averaged 633 MiB RSS.

Across three rotated Express/PostgreSQL trials with 50,000 requests each:

  • CPU/request: 143.9 → 114.2 µs (-20.7%)
  • Throughput: 8,440 → 10,820 requests/s (+28.2%)
  • RSS: 1,344 → 371 MiB (-72.4%)
  • Agent requests: 1,103 → 175 (-84.1%)

Every trial delivered 50,000 traces and executed 50,000 PostgreSQL queries.

Test plan

  • Run all 53 native exporter unit tests.
  • Verify every changed production branch with c8.
  • Run the full repository lint.
  • Run the fresh-process Express/PostgreSQL benchmark at the default two-second flush interval.

## Summary

Keep the existing flush timer authoritative after an in-flight native send and trigger an early flush at 2,000 pending spans.

## Why

The native exporter waited for the two-second interval before its first send, then bypassed batching after every settlement. On the Express/PostgreSQL workload, bounded batching reduced CPU/request by 18.6%, increased throughput by 25.1%, and reduced RSS from 1,344 MiB to 366 MiB.

## Test plan

- Run the native exporter unit tests.
- Verify every changed production branch with c8.
- Run the full repository lint.
- Run three fresh-process 50,000-request Express/PostgreSQL trials with exact trace and query counts.
@dd-octo-sts

dd-octo-sts Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 7.7 MB
Deduped: 8.36 MB
No deduping: 8.36 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.3 | 125.43 kB | 441.68 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Aug 4, 2026

Copy link
Copy Markdown

Pipelines  Tests

⚠️ Warnings

🚦 1 Pipeline job failed

DataDog/apm-reliability/dd-trace-js | benchmark: [26, 2]   View in Datadog   GitLab

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog retried 1 test - 1 passed on retry View in Datadog

🔄 Datadog auto-retried 1 job - 1 passed on retry View in Datadog

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 98.49%

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 78e21e3 | Docs | Datadog PR Page | Give us feedback!

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (bengl/native-spans-attempt-3@3b2aeab). Learn more about missing BASE report.

Additional details and impacted files
@@                       Coverage Diff                       @@
##             bengl/native-spans-attempt-3    #9680   +/-   ##
===============================================================
  Coverage                                ?   98.49%           
===============================================================
  Files                                   ?      953           
  Lines                                   ?   134352           
  Branches                                ?    11416           
===============================================================
  Hits                                    ?   132328           
  Misses                                  ?     2024           
  Partials                                ?        0           
Flag Coverage Δ
aiguard 58.75% <100.00%> (?)
aiguard-integration 56.61% <67.56%> (?)
apm-bucket-0 59.31% <100.00%> (?)
apm-bucket-1 64.42% <100.00%> (?)
apm-bucket-2 63.64% <100.00%> (?)
apm-bucket-3 61.43% <100.00%> (?)
apm-capabilities-tracing 63.83% <100.00%> (?)
apm-integrations-aerospike 57.56% <100.00%> (?)
apm-integrations-confluentinc-kafka-javascript 62.98% <100.00%> (?)
apm-integrations-couchbase 58.64% <100.00%> (?)
apm-integrations-http 63.50% <100.00%> (?)
apm-integrations-kafkajs 63.52% <100.00%> (?)
apm-integrations-next 59.85% <100.00%> (?)
apm-integrations-prisma 59.63% <100.00%> (?)
appsec 72.97% <100.00%> (?)
appsec-express_fastify_graphql 70.52% <100.00%> (?)
appsec-integration 51.28% <94.59%> (?)
appsec-kafka_ldapjs_lodash 64.55% <100.00%> (?)
appsec-mongodb-core_mongoose_mysql 68.07% <100.00%> (?)
appsec-next 58.57% <100.00%> (?)
appsec-node-serialize_passport_postgres 67.80% <100.00%> (?)
appsec-sourcing_stripe_template 66.15% <100.00%> (?)
debugger 65.05% <100.00%> (?)
instrumentations-bucket-0 51.90% <25.00%> (?)
instrumentations-bucket-1 60.99% <100.00%> (?)
instrumentations-bucket-10 62.58% <100.00%> (?)
instrumentations-bucket-11 51.81% <25.00%> (?)
instrumentations-bucket-12 52.36% <25.00%> (?)
instrumentations-bucket-13 51.92% <25.00%> (?)
instrumentations-bucket-2 53.71% <25.00%> (?)
instrumentations-bucket-3 59.27% <100.00%> (?)
instrumentations-bucket-4 52.44% <25.00%> (?)
instrumentations-bucket-5 58.37% <100.00%> (?)
instrumentations-bucket-6 61.42% <100.00%> (?)
instrumentations-bucket-7 58.51% <100.00%> (?)
instrumentations-bucket-8 59.57% <100.00%> (?)
instrumentations-bucket-9 62.16% <100.00%> (?)
instrumentations-instrumentation-couchbase 51.14% <25.00%> (?)
instrumentations-integration-esbuild 33.82% <25.00%> (?)
llmobs-ai_anthropic_bedrock 63.41% <100.00%> (?)
llmobs-bucket-1 62.18% <100.00%> (?)
llmobs-openai 62.81% <100.00%> (?)
llmobs-openai-agents_vertex-ai 60.85% <100.00%> (?)
llmobs-sdk 66.82% <100.00%> (?)
openfeature 56.31% <72.97%> (?)
openfeature-unit 53.39% <25.00%> (?)
platform-core_esbuild_instrumentations-misc 40.94% <25.00%> (?)
platform-integration 61.44% <72.97%> (?)
platform-shimmer_unit-guardrails_webpack 39.25% <25.00%> (?)
plugins-bucket-0 58.07% <100.00%> (?)
plugins-bucket-1 54.91% <81.08%> (?)
plugins-bucket-11 63.11% <100.00%> (?)
plugins-bucket-18 63.11% <100.00%> (?)
plugins-bucket-19 60.85% <100.00%> (?)
plugins-bucket-20 63.02% <100.00%> (?)
plugins-bucket-4 59.46% <100.00%> (?)
plugins-bullmq_cassandra_cookie 63.48% <100.00%> (?)
plugins-cookie-parser_crypto_dd-trace-api 56.87% <100.00%> (?)
plugins-fetch_fs_generic-pool 61.59% <100.00%> (?)
plugins-google-cloud-pubsub_grpc_handlebars 65.49% <100.00%> (?)
plugins-hapi_hono_ioredis 61.46% <100.00%> (?)
plugins-jest_knex_langgraph 56.81% <97.29%> (?)
plugins-ldapjs_light-my-request_limitd-client 59.56% <100.00%> (?)
plugins-lodash_mariadb_memcached 59.60% <100.00%> (?)
plugins-moleculer_mongodb_mongodb-core 62.58% <100.00%> (?)
plugins-mongoose_multer_mysql 59.98% <100.00%> (?)
plugins-mysql2_nats_node-serialize 61.87% <100.00%> (?)
plugins-opensearch_passport-http_pino 60.39% <100.00%> (?)
plugins-postgres_process_pug 59.75% <100.00%> (?)
plugins-redis_router_sequelize 62.75% <100.00%> (?)
plugins-test-and-upstream-rhea_undici_url 63.16% <100.00%> (?)
plugins-valkey_vm_winston 59.46% <100.00%> (?)
plugins-ws 60.58% <100.00%> (?)
profiling 62.59% <91.89%> (?)
serverless-aws-sdk-aws-sdk 56.11% <100.00%> (?)
serverless-aws-sdk-base-inject-field 51.06% <25.00%> (?)
serverless-aws-sdk-bedrockruntime 55.79% <97.29%> (?)
serverless-aws-sdk-client 57.34% <100.00%> (?)
serverless-aws-sdk-dynamodb 56.75% <100.00%> (?)
serverless-aws-sdk-eventbridge 49.56% <25.00%> (?)
serverless-aws-sdk-kinesis 60.17% <97.29%> (?)
serverless-aws-sdk-lambda 58.37% <97.29%> (?)
serverless-aws-sdk-s3 56.82% <100.00%> (?)
serverless-aws-sdk-serverless-peer-service 58.90% <25.00%> (?)
serverless-aws-sdk-sns 61.15% <100.00%> (?)
serverless-aws-sdk-sqs 61.47% <100.00%> (?)
serverless-aws-sdk-stepfunctions 56.57% <97.29%> (?)
serverless-aws-sdk-util 51.57% <25.00%> (?)
serverless-bucket-0 54.20% <81.08%> (?)
serverless-bucket-1 60.15% <81.08%> (?)
test-optimization-cucumber 71.01% <25.00%> (?)
test-optimization-cypress 64.76% <25.00%> (?)
test-optimization-jest 72.52% <51.35%> (?)
test-optimization-mocha 71.60% <25.00%> (?)
test-optimization-playwright-playwright-atr 59.65% <25.00%> (?)
test-optimization-playwright-playwright-efd 59.88% <25.00%> (?)
test-optimization-playwright-playwright-final-status 59.94% <25.00%> (?)
test-optimization-playwright-playwright-impacted-tests 59.53% <25.00%> (?)
test-optimization-playwright-playwright-reporting 60.72% <25.00%> (?)
test-optimization-playwright-playwright-test-management 60.31% <25.00%> (?)
test-optimization-playwright-playwright-test-span 59.69% <25.00%> (?)
test-optimization-selenium 59.29% <25.00%> (?)
test-optimization-testopt 58.32% <64.86%> (?)
test-optimization-vitest 69.87% <25.00%> (?)
test-optimization-vitest-browser 58.49% <25.00%> (?)
test-optimization-webdriverio 63.53% <25.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

All spans in a trace share an immutable ID, but the native path rebuilt its
16-byte representation for every child. Reusing the shared representation
reduced buildNativeTraceId self-time from 94.6 to 30.8 ms in a 50,000-request
Express/PostgreSQL profile and its isolated seven-span path from 1,081 to
169 ns/trace.
Assigning and deleting the construction-time name hook put every native span
context on a slow object shape even though final synchronization already owns
name writes. Removing the stale hook reduced CPU per request from 112.41 to
99.77 µs and raised throughput from 11,039 to 12,175 requests/s in the
Express/PostgreSQL workload; isolated construction fell from 75.1 to
6.4 ns/span.
## Summary

Keep resource names intact in native fast final sync, matching the JS v0.4 and v0.5 encoders.

## Why

The tracer applied the agent's 5,000-character normalization limit before native export. Long SQL resources then differed between exporters and failed the existing PostgreSQL wire assertions.

## Test plan

- ./node_modules/.bin/mocha packages/dd-trace/test/native/span_context.spec.js
- Existing PostgreSQL long-query cases for pg 8.0.3 and 8.22 (2 passing)
## Summary

Mirror the canonical formatter's base-service inference in native fast final sync and remove the now-redundant configured-service field from native contexts.

## Why

The fast path registered an overridden service but skipped _dd.base_service. Raw spans and WASM output therefore lost the configured service whenever a span selected a different one.

## Test plan

- Native tracer and span-context suites (45 passing)
- Native plugin wire assertions for base-service propagation (3 passing)
@pr-commenter

pr-commenter Bot commented Aug 4, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-04 19:45:34

Comparing candidate commit 78e21e3 in PR branch BridgeAR/2026-08-04-bound-native-export-batches with baseline commit 3b2aeab in branch bengl/native-spans-attempt-3.

📊 Benchmarking dashboard

Found 27 performance improvements and 1 performance regressions! Performance is the same for 2177 metrics, 99 unstable metrics.

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:appsec-appsec-enabled-20

  • 🟩 max_rss_usage [-11.932MB; -3.807MB] or [-6.349%; -2.026%]

scenario:appsec-appsec-enabled-24

  • 🟩 instructions [-879.4M instructions; -512.7M instructions] or [-8.434%; -4.916%]
  • 🟩 max_rss_usage [-29.242MB; -16.124MB] or [-11.692%; -6.447%]

scenario:appsec-appsec-enabled-26

  • 🟩 instructions [-978.5M instructions; -569.8M instructions] or [-9.523%; -5.545%]
  • 🟩 max_rss_usage [-26.545MB; -15.483MB] or [-11.039%; -6.439%]

scenario:appsec-appsec-enabled-with-attacks-24

  • 🟩 max_rss_usage [-30.158MB; -15.599MB] or [-11.751%; -6.078%]

scenario:appsec-appsec-enabled-with-attacks-26

  • 🟩 instructions [-427.4M instructions; -250.3M instructions] or [-4.086%; -2.393%]
  • 🟩 max_rss_usage [-28.864MB; -14.801MB] or [-11.648%; -5.973%]

scenario:appsec-control-20

  • 🟩 instructions [-751.3M instructions; -437.2M instructions] or [-16.774%; -9.762%]
  • 🟩 max_rss_usage [-17.519MB; -9.183MB] or [-10.501%; -5.504%]

scenario:appsec-control-24

  • 🟩 cpu_user_time [-88.277ms; -30.917ms] or [-7.783%; -2.726%]
  • 🟩 instructions [-804.9M instructions; -470.1M instructions] or [-20.492%; -11.968%]
  • 🟩 max_rss_usage [-28.782MB; -16.593MB] or [-14.714%; -8.482%]

scenario:appsec-control-26

  • 🟩 cpu_user_time [-89.133ms; -24.274ms] or [-7.981%; -2.173%]
  • 🟩 instructions [-800.1M instructions; -473.4M instructions] or [-20.172%; -11.934%]
  • 🟩 max_rss_usage [-27.885MB; -16.240MB] or [-13.821%; -8.049%]

scenario:plugin-graphql-long-with-depth-and-collapse-off-20

  • 🟩 instructions [-6.6G instructions; -1.1G instructions] or [-11.844%; -2.046%]

scenario:plugin-graphql-long-with-depth-on-max-24

  • 🟩 max_rss_usage [-39.734MB; -11.266MB] or [-7.925%; -2.247%]

scenario:plugin-http-client-with-tracer-24

  • 🟩 cpu_user_time [-138.394ms; -57.580ms] or [-5.757%; -2.395%]
  • 🟩 instructions [-903.1M instructions; -425.6M instructions] or [-13.174%; -6.209%]
  • 🟩 max_rss_usage [-19.078MB; -8.168MB] or [-7.039%; -3.014%]

scenario:plugin-http-client-with-tracer-26

  • 🟩 cpu_user_time [-204.688ms; -90.361ms] or [-8.653%; -3.820%]
  • 🟩 execution_time [-240.930ms; -107.844ms] or [-6.765%; -3.028%]
  • 🟩 instructions [-988.9M instructions; -459.8M instructions] or [-14.125%; -6.567%]
  • 🟩 max_rss_usage [-25.891MB; -11.786MB] or [-10.513%; -4.786%]

scenario:plugin-http-server-querystring-obfuscation-24

  • 🟩 execution_time [-210.132ms; -94.013ms] or [-4.623%; -2.068%]

scenario:plugin-http-server-querystring-obfuscation-26

  • 🟩 execution_time [-220.260ms; -97.665ms] or [-5.446%; -2.415%]

scenario:plugin-http-server-with-tracer-20

  • 🟥 execution_time [+173.868ms; +388.416ms] or [+2.951%; +6.592%]

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:appsec-appsec-enabled-24

  • unstable execution_time [-271.040ms; +69.192ms] or [-8.820%; +2.252%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-321.076ms; +88.342ms] or [-10.844%; +2.984%]

scenario:appsec-control-24

  • unstable execution_time [-173.392ms; +35.438ms] or [-11.010%; +2.250%]

scenario:appsec-control-26

  • unstable execution_time [-181.528ms; +57.054ms] or [-11.508%; +3.617%]

scenario:debugger-line-probe-with-snapshot-default-24

  • unstable cpu_user_time [-2.742s; +0.351s] or [-30.786%; +3.938%]
  • unstable execution_time [-2.759s; +0.354s] or [-28.684%; +3.678%]
  • unstable instructions [-23.4G instructions; +3.1G instructions] or [-32.172%; +4.279%]
  • unstable throughput [-91.799op/s; +731.461op/s] or [-2.628%; +20.942%]

scenario:debugger-line-probe-with-snapshot-default-26

  • unstable cpu_user_time [-2.712s; +5.850s] or [-26.277%; +56.680%]
  • unstable execution_time [-2.739s; +5.888s] or [-24.818%; +53.345%]
  • unstable instructions [-24.1G instructions; +52.2G instructions] or [-27.857%; +60.249%]
  • unstable max_rss_usage [-9.092MB; +19.621MB] or [-5.666%; +12.227%]
  • unstable throughput [-1151.229op/s; +537.325op/s] or [-37.322%; +17.420%]

scenario:debugger-line-probe-with-snapshot-minimal-24

  • unstable cpu_user_time [-2789.753ms; +2805.120ms] or [-31.386%; +31.559%]
  • unstable execution_time [-2825.115ms; +2843.862ms] or [-29.520%; +29.716%]
  • unstable instructions [-23927.2M instructions; +23891.6M instructions] or [-32.866%; +32.818%]
  • unstable max_rss_usage [-11936.236KB; +11257.036KB] or [-7.482%; +7.057%]
  • unstable throughput [-756.973op/s; +749.415op/s] or [-21.536%; +21.321%]

scenario:debugger-line-probe-with-snapshot-minimal-26

  • unstable cpu_user_time [-2700.924ms; +4256.730ms] or [-28.352%; +44.684%]
  • unstable execution_time [-2743.964ms; +4292.675ms] or [-26.867%; +42.032%]
  • unstable instructions [-23.6G instructions; +37.5G instructions] or [-29.623%; +47.073%]
  • unstable max_rss_usage [-7.431MB; +13.440MB] or [-4.657%; +8.424%]
  • unstable throughput [-837.181op/s; +542.963op/s] or [-25.744%; +16.697%]

scenario:debugger-line-probe-without-snapshot-26

  • unstable cpu_user_time [-2673.928ms; +4252.177ms] or [-27.856%; +44.297%]
  • unstable execution_time [-2686.396ms; +4261.396ms] or [-26.063%; +41.343%]
  • unstable instructions [-23.6G instructions; +37.5G instructions] or [-29.612%; +47.066%]
  • unstable max_rss_usage [-8.270MB; +13.597MB] or [-5.196%; +8.543%]
  • unstable throughput [-824.442op/s; +521.781op/s] or [-25.611%; +16.209%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-263.692ms; +402.884ms] or [-5.428%; +8.294%]
  • unstable execution_time [-264.572ms; +403.702ms] or [-5.370%; +8.194%]
  • unstable throughput [-144333.153op/s; +96133.478op/s] or [-8.471%; +5.642%]

scenario:plugin-claude-agent-sdk-compact-stream-scan-26

  • unstable cpu_usage_percentage [-4.563%; +5.808%]

scenario:plugin-graphql-long-with-depth-and-collapse-off-20

  • unstable cpu_user_time [-1643.541ms; +191.687ms] or [-13.133%; +1.532%]
  • unstable execution_time [-1830.466ms; +71.877ms] or [-13.431%; +0.527%]
  • unstable throughput [-0.035op/s; +2.034op/s] or [-0.225%; +13.004%]

scenario:plugin-graphql-long-with-depth-and-collapse-off-24

  • unstable cpu_user_time [-1060.824ms; +50.989ms] or [-11.305%; +0.543%]
  • unstable execution_time [-1185.492ms; +30.128ms] or [-11.662%; +0.296%]
  • unstable instructions [-6.3G instructions; -1.2G instructions] or [-15.491%; -3.043%]
  • unstable max_rss_usage [-167.835MB; -13.334MB] or [-14.875%; -1.182%]
  • unstable throughput [-0.111op/s; +2.612op/s] or [-0.531%; +12.452%]

scenario:plugin-graphql-long-with-depth-and-collapse-off-26

  • unstable cpu_user_time [-1.608s; -0.518s] or [-20.473%; -6.590%]
  • unstable execution_time [-1.719s; -0.590s] or [-19.887%; -6.826%]
  • unstable instructions [-7.7G instructions; -2.9G instructions] or [-20.253%; -7.588%]
  • unstable max_rss_usage [-139.742MB; +9.358MB] or [-12.179%; +0.816%]
  • unstable throughput [+1.668op/s; +5.005op/s] or [+6.672%; +20.015%]

scenario:plugin-graphql-long-with-depth-off-20

  • unstable max_rss_usage [-9831.262KB; +10084.977KB] or [-6.079%; +6.236%]

scenario:plugin-http-server-with-tracer-24

  • unstable execution_time [-429.876ms; +343.558ms] or [-8.852%; +7.074%]

scenario:plugin-http-server-with-tracer-26

  • unstable execution_time [-316.761ms; +254.674ms] or [-6.671%; +5.364%]

scenario:spans-finish-immediately-20

  • unstable cpu_user_time [-311.586ms; -79.074ms] or [-36.301%; -9.212%]
  • unstable execution_time [-312.229ms; -79.109ms] or [-36.008%; -9.123%]
  • unstable instructions [-2.6G instructions; -0.7G instructions] or [-43.601%; -11.192%]
  • unstable throughput [+30240.240op/s; +120534.937op/s] or [+9.480%; +37.785%]

scenario:spans-finish-immediately-24

  • unstable cpu_user_time [-275.463ms; -69.869ms] or [-35.069%; -8.895%]
  • unstable execution_time [-278.312ms; -70.822ms] or [-34.898%; -8.880%]
  • unstable instructions [-2.5G instructions; -0.6G instructions] or [-44.060%; -11.323%]
  • unstable throughput [+32150.413op/s; +126692.694op/s] or [+9.263%; +36.500%]

scenario:spans-finish-immediately-26

  • unstable cpu_user_time [-280.875ms; -71.093ms] or [-33.925%; -8.587%]
  • unstable execution_time [-286.253ms; -72.783ms] or [-33.924%; -8.626%]
  • unstable instructions [-2.7G instructions; -0.7G instructions] or [-44.558%; -11.449%]
  • unstable throughput [+29472.584op/s; +115312.805op/s] or [+9.038%; +35.360%]

scenario:spans-finish-immediately-with-many-tags-20

  • unstable cpu_user_time [-121.140ms; -30.490ms] or [-18.873%; -4.750%]
  • unstable execution_time [-120.903ms; -30.672ms] or [-18.622%; -4.724%]
  • unstable instructions [-1090.5M instructions; -280.1M instructions] or [-24.489%; -6.290%]
  • unstable throughput [+8305.605op/s; +32802.425op/s] or [+5.000%; +19.746%]

scenario:spans-finish-immediately-with-many-tags-24

  • unstable cpu_user_time [-112.752ms; -28.382ms] or [-19.320%; -4.863%]
  • unstable execution_time [-112.977ms; -28.883ms] or [-18.965%; -4.849%]
  • unstable instructions [-1069.4M instructions; -274.7M instructions] or [-25.144%; -6.460%]
  • unstable throughput [+9391.560op/s; +36770.681op/s] or [+5.158%; +20.194%]

scenario:spans-finish-immediately-with-many-tags-26

  • unstable cpu_user_time [-102.872ms; -26.189ms] or [-16.940%; -4.313%]
  • unstable execution_time [-103.683ms; -26.431ms] or [-16.586%; -4.228%]
  • unstable instructions [-1128.1M instructions; -290.0M instructions] or [-25.425%; -6.536%]
  • unstable throughput [+7730.505op/s; +30460.746op/s] or [+4.489%; +17.687%]

scenario:spans-finish-immediately-with-tags-20

  • unstable cpu_user_time [-254.385ms; -62.503ms] or [-31.687%; -7.785%]
  • unstable execution_time [-252.948ms; -62.518ms] or [-31.093%; -7.685%]
  • unstable instructions [-2.2G instructions; -0.6G instructions] or [-39.731%; -10.208%]
  • unstable throughput [+20966.774op/s; +88318.364op/s] or [+7.792%; +32.823%]

scenario:spans-finish-immediately-with-tags-24

  • unstable cpu_user_time [-234.043ms; -60.032ms] or [-32.059%; -8.223%]
  • unstable execution_time [-234.252ms; -60.125ms] or [-31.634%; -8.119%]
  • unstable instructions [-2.1G instructions; -0.5G instructions] or [-39.859%; -10.245%]
  • unstable throughput [+25406.892op/s; +99080.044op/s] or [+8.539%; +33.298%]

scenario:spans-finish-immediately-with-tags-26

  • unstable cpu_user_time [-223.212ms; -57.068ms] or [-29.038%; -7.424%]
  • unstable execution_time [-229.130ms; -58.793ms] or [-29.170%; -7.485%]
  • unstable instructions [-2.3G instructions; -0.6G instructions] or [-40.378%; -10.375%]
  • unstable throughput [+21794.897op/s; +84939.288op/s] or [+7.851%; +30.596%]

scenario:spans-finish-immediately-with-tags-and-otel-24

  • unstable max_rss_usage [-8.690MB; +18.210MB] or [-3.822%; +8.009%]

scenario:spans-finish-later-20

  • unstable cpu_user_time [-324.460ms; -105.197ms] or [-32.747%; -10.617%]
  • unstable execution_time [-325.534ms; -105.604ms] or [-32.094%; -10.411%]
  • unstable instructions [-2.5G instructions; -0.8G instructions] or [-39.832%; -13.029%]
  • unstable throughput [+28977.806op/s; +90275.235op/s] or [+10.730%; +33.429%]

scenario:spans-finish-later-24

  • unstable cpu_user_time [-328.565ms; -105.275ms] or [-38.205%; -12.241%]
  • unstable execution_time [-357.956ms; -113.952ms] or [-39.086%; -12.443%]
  • unstable instructions [-2.4G instructions; -0.8G instructions] or [-41.705%; -13.639%]
  • unstable max_rss_usage [-65.242MB; -10.763MB] or [-33.893%; -5.591%]
  • unstable throughput [+39211.025op/s; +124998.927op/s] or [+12.572%; +40.078%]

scenario:spans-finish-later-26

  • unstable cpu_user_time [-513.599ms; -166.061ms] or [-33.498%; -10.831%]
  • unstable execution_time [-516.353ms; -167.896ms] or [-31.742%; -10.321%]
  • unstable instructions [-2.8G instructions; -0.9G instructions] or [-38.347%; -12.554%]
  • unstable throughput [+17709.781op/s; +54616.988op/s] or [+10.576%; +32.618%]

scenario:test-optimization-large-suite-20

  • unstable max_rss_usage [-4208.969KB; +6020.302KB] or [-5.238%; +7.492%]

## Summary

Change-queue flushing consumed 95.8% of the deferred-finish profile and kept the eight-sample CI variant running when the 30-minute job expired.

## Why

The benchmark is meant to isolate span construction and finish, but it applied and exported every queued native mutation. Discarding those mutations reduced the same 250,000-span process from 23.11 s to 0.60 s. Native event samples still drain because libdatadog applies events directly.

## Test plan

- Run all span variants through three fresh sirun matrices.
- Run changed-line coverage and full lint.
@bengl
bengl force-pushed the BridgeAR/2026-08-04-bound-native-export-batches branch 2 times, most recently from cbf2cbf to 78e21e3 Compare August 6, 2026 18:19
@BridgeAR

Copy link
Copy Markdown
Member Author

These changes are already incoporated

@BridgeAR BridgeAR closed this Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant