Skip to content

perf(encode): emit span fields and event attributes as compact msgpack ints#8229

Merged
BridgeAR merged 3 commits into
masterfrom
BridgeAR/2026-05-01-pr8188-8-perf-encode-compact-int
May 11, 2026
Merged

perf(encode): emit span fields and event attributes as compact msgpack ints#8229
BridgeAR merged 3 commits into
masterfrom
BridgeAR/2026-05-01-pr8188-8-perf-encode-compact-int

Conversation

@BridgeAR
Copy link
Copy Markdown
Member

@BridgeAR BridgeAR commented May 1, 2026

See commits

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Overall package size

Self size: 5.76 MB
Deduped: 6.6 MB
No deduping: 6.6 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 817.39 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

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

@datadog-datadog-prod-us1
Copy link
Copy Markdown

datadog-datadog-prod-us1 Bot commented May 1, 2026

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 97.83%
Overall Coverage: 86.65% (-0.00%)

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.64%. Comparing base (50aa025) to head (ac38d52).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8229      +/-   ##
==========================================
- Coverage   89.68%   89.64%   -0.05%     
==========================================
  Files         836      832       -4     
  Lines       44246    44182      -64     
  Branches     8128     8135       +7     
==========================================
- Hits        39682    39605      -77     
- Misses       4564     4577      +13     
Flag Coverage Δ
aiguard-integration-active 40.69% <77.77%> (+0.10%) ⬆️
aiguard-integration-latest 40.64% <77.77%> (+0.10%) ⬆️
aiguard-integration-maintenance 40.69% <77.77%> (+0.10%) ⬆️
aiguard-macos 35.40% <83.33%> (+0.03%) ⬆️
aiguard-ubuntu 35.50% <83.33%> (+0.03%) ⬆️
aiguard-windows 35.31% <83.33%> (+0.03%) ⬆️
apm-capabilities-tracing-macos 49.08% <100.00%> (+0.01%) ⬆️
apm-capabilities-tracing-ubuntu-active 49.33% <100.00%> (+0.18%) ⬆️
apm-capabilities-tracing-ubuntu-latest 49.12% <100.00%> (+<0.01%) ⬆️
apm-capabilities-tracing-ubuntu-maintenance 49.15% <100.00%> (-0.18%) ⬇️
apm-capabilities-tracing-ubuntu-oldest 49.14% <100.00%> (-0.18%) ⬇️
apm-capabilities-tracing-windows 49.13% <100.00%> (+0.82%) ⬆️
apm-integrations-aerospike-18-gte.5.2.0 34.41% <83.33%> (+0.06%) ⬆️
apm-integrations-aerospike-20-gte.5.5.0 34.43% <83.33%> (+0.06%) ⬆️
apm-integrations-aerospike-22-gte.5.12.1 34.43% <83.33%> (+0.06%) ⬆️
apm-integrations-aerospike-22-gte.6.0.0 34.43% <83.33%> (+0.06%) ⬆️
apm-integrations-aerospike-eol- 34.34% <83.33%> (+0.06%) ⬆️
apm-integrations-child-process 35.45% <83.33%> (+0.06%) ⬆️
apm-integrations-confluentinc-kafka-javascript-18 41.26% <83.33%> (+0.02%) ⬆️
apm-integrations-confluentinc-kafka-javascript-20 41.28% <83.33%> (+0.02%) ⬆️
apm-integrations-confluentinc-kafka-javascript-22 41.28% <83.33%> (+0.02%) ⬆️
apm-integrations-confluentinc-kafka-javascript-24 41.21% <83.33%> (+0.02%) ⬆️
apm-integrations-couchbase-18 34.60% <83.33%> (+0.06%) ⬆️
apm-integrations-couchbase-eol 34.73% <83.33%> (+0.14%) ⬆️
apm-integrations-dns 34.33% <83.33%> (+0.05%) ⬆️
apm-integrations-elasticsearch 35.06% <83.33%> (+0.05%) ⬆️
apm-integrations-http-latest 42.28% <87.50%> (+0.10%) ⬆️
apm-integrations-http-maintenance 42.34% <87.50%> (+0.10%) ⬆️
apm-integrations-http-oldest 42.35% <87.50%> (+0.10%) ⬆️
apm-integrations-http2 39.67% <83.33%> (+0.06%) ⬆️
apm-integrations-kafkajs-latest 41.16% <83.33%> (+0.03%) ⬆️
apm-integrations-kafkajs-oldest 41.21% <83.33%> (+0.02%) ⬆️
apm-integrations-net 35.02% <83.33%> (+0.06%) ⬆️
apm-integrations-next-11.1.4 29.34% <12.50%> (-0.04%) ⬇️
apm-integrations-next-13.2.0 30.78% <12.50%> (-0.05%) ⬇️
apm-integrations-next-gte.10.2.0.and.lt.11 23.10% <ø> (ø)
apm-integrations-next-gte.11.0.0.and.lt.13 30.79% <12.50%> (-0.05%) ⬇️
apm-integrations-next-gte.13.0.0.and.lt.14 31.04% <12.50%> (-0.04%) ⬇️
apm-integrations-next-gte.14.0.0.and.lte.14.2.6 30.88% <12.50%> (-0.02%) ⬇️
apm-integrations-next-gte.14.2.7.and.lt.15 30.86% <12.50%> (-0.05%) ⬇️
apm-integrations-next-gte.15.0.0 30.92% <12.50%> (-0.04%) ⬇️
apm-integrations-oracledb 34.69% <83.33%> (+0.06%) ⬆️
apm-integrations-prisma-18-gte.6.16.0.and.lt.7.0.0 35.02% <83.33%> (+0.06%) ⬆️
apm-integrations-prisma-latest-all 35.34% <83.33%> (+0.05%) ⬆️
apm-integrations-restify 36.57% <83.33%> (+0.06%) ⬆️
apm-integrations-sharedb 34.00% <83.33%> (+0.06%) ⬆️
apm-integrations-tedious 34.49% <83.33%> (+0.06%) ⬆️
appsec-express 52.13% <87.50%> (+0.05%) ⬆️
appsec-fastify 48.82% <87.50%> (+0.06%) ⬆️
appsec-graphql 49.10% <87.50%> (+0.04%) ⬆️
appsec-integration-active 37.50% <85.18%> (+0.06%) ⬆️
appsec-integration-latest 37.47% <85.18%> (+0.06%) ⬆️
appsec-integration-maintenance 37.50% <85.18%> (+0.06%) ⬆️
appsec-integration-oldest 37.49% <85.18%> (+0.06%) ⬆️
appsec-kafka 41.68% <83.33%> (+0.09%) ⬆️
appsec-ldapjs 40.87% <83.33%> (+0.03%) ⬆️
appsec-lodash 40.98% <83.33%> (+0.03%) ⬆️
appsec-macos 56.10% <87.50%> (+0.07%) ⬆️
appsec-mongodb-core 45.18% <83.33%> (+0.04%) ⬆️
appsec-mongoose 46.02% <83.33%> (+0.04%) ⬆️
appsec-mysql 48.16% <87.50%> (+0.04%) ⬆️
appsec-next-latest-11.1.4 29.46% <12.50%> (-0.04%) ⬇️
appsec-next-latest-13.2.0 30.92% <12.50%> (-0.05%) ⬇️
appsec-next-latest-gte.10.2.0.and.lt.11 28.71% <ø> (ø)
appsec-next-latest-gte.11.0.0.and.lt.13 30.91% <12.50%> (-0.05%) ⬇️
appsec-next-latest-gte.13.0.0.and.lt.14 31.15% <12.50%> (-0.04%) ⬇️
appsec-next-latest-gte.14.0.0.and.lte.14.2.6 31.00% <12.50%> (-0.05%) ⬇️
appsec-next-latest-gte.14.2.7.and.lt.15 31.00% <12.50%> (-0.05%) ⬇️
appsec-next-latest-gte.15.0.0 31.00% <12.50%> (-0.05%) ⬇️
appsec-next-oldest-11.1.4 29.47% <12.50%> (-0.04%) ⬇️
appsec-next-oldest-13.2.0 31.21% <12.50%> (-0.05%) ⬇️
appsec-next-oldest-gte.10.2.0.and.lt.11 28.84% <ø> (ø)
appsec-next-oldest-gte.11.0.0.and.lt.13 30.92% <12.50%> (-0.05%) ⬇️
appsec-next-oldest-gte.13.0.0.and.lt.14 31.39% <12.50%> (-0.04%) ⬇️
appsec-next-oldest-gte.14.0.0.and.lte.14.2.6 31.24% <12.50%> (-0.05%) ⬇️
appsec-next-oldest-gte.14.2.7.and.lt.15 31.24% <12.50%> (-0.05%) ⬇️
appsec-next-oldest-gte.15.0.0 31.24% <12.50%> (-0.05%) ⬇️
appsec-node-serialize 40.19% <83.33%> (+0.03%) ⬆️
appsec-passport 43.82% <87.50%> (+0.10%) ⬆️
appsec-postgres 47.72% <87.50%> (+0.06%) ⬆️
appsec-sourcing 39.55% <83.33%> (+0.05%) ⬆️
appsec-stripe 41.59% <87.50%> (+0.10%) ⬆️
appsec-template 40.35% <83.33%> (+0.03%) ⬆️
appsec-ubuntu 56.15% <87.50%> (+0.05%) ⬆️
appsec-windows 56.03% <87.50%> (+0.07%) ⬆️
debugger-ubuntu-active 43.34% <77.77%> (+0.08%) ⬆️
debugger-ubuntu-latest 43.30% <77.77%> (+0.13%) ⬆️
debugger-ubuntu-maintenance 43.36% <77.77%> (+0.13%) ⬆️
debugger-ubuntu-oldest 43.79% <77.77%> (+0.13%) ⬆️
instrumentations-instrumentation-bluebird 29.33% <12.50%> (-0.05%) ⬇️
instrumentations-instrumentation-body-parser 37.04% <83.33%> (+0.06%) ⬆️
instrumentations-instrumentation-child_process 34.94% <83.33%> (+0.06%) ⬆️
instrumentations-instrumentation-cookie-parser 31.16% <12.50%> (-0.04%) ⬇️
instrumentations-instrumentation-express 31.37% <12.50%> (-0.04%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 31.27% <12.50%> (-0.04%) ⬇️
instrumentations-instrumentation-express-session 36.73% <83.33%> (+0.06%) ⬆️
instrumentations-instrumentation-fs 29.02% <12.50%> (-0.05%) ⬇️
instrumentations-instrumentation-generic-pool 30.24% <ø> (ø)
instrumentations-instrumentation-http 36.40% <83.33%> (+0.06%) ⬆️
instrumentations-instrumentation-knex 29.31% <12.50%> (-0.05%) ⬇️
instrumentations-instrumentation-light-my-request 36.66% <83.33%> (+0.06%) ⬆️
instrumentations-instrumentation-mongoose 30.36% <12.50%> (-0.05%) ⬇️
instrumentations-instrumentation-multer 36.82% <83.33%> (+0.06%) ⬆️
instrumentations-instrumentation-mysql2 34.92% <83.33%> (+0.06%) ⬆️
instrumentations-instrumentation-passport 40.44% <87.50%> (+0.10%) ⬆️
instrumentations-instrumentation-passport-http 40.23% <87.50%> (+0.10%) ⬆️
instrumentations-instrumentation-passport-local 40.72% <87.50%> (+0.10%) ⬆️
instrumentations-instrumentation-pg 34.49% <83.33%> (+0.08%) ⬆️
instrumentations-instrumentation-promise 29.27% <12.50%> (-0.05%) ⬇️
instrumentations-instrumentation-promise-js 29.28% <12.50%> (-0.05%) ⬇️
instrumentations-instrumentation-q 29.31% <12.50%> (-0.05%) ⬇️
instrumentations-instrumentation-url 29.27% <12.50%> (-0.05%) ⬇️
instrumentations-instrumentation-when 29.29% <12.50%> (-0.05%) ⬇️
instrumentations-integration-esbuild-active 19.58% <ø> (ø)
instrumentations-integration-esbuild-latest 19.57% <ø> (ø)
instrumentations-integration-esbuild-maintenance 19.58% <ø> (ø)
instrumentations-integration-esbuild-oldest 19.57% <ø> (ø)
llmobs-ai 37.87% <83.33%> (+0.06%) ⬆️
llmobs-anthropic 37.93% <83.33%> (+0.06%) ⬆️
llmobs-bedrock 36.59% <83.33%> (+0.05%) ⬆️
llmobs-google-genai 36.94% <83.33%> (-0.07%) ⬇️
llmobs-langchain 36.65% <83.33%> (+0.05%) ⬆️
llmobs-openai 40.69% <83.33%> (+0.06%) ⬆️
llmobs-sdk-active 45.53% <83.33%> (+0.07%) ⬆️
llmobs-sdk-latest 45.47% <83.33%> (+0.07%) ⬆️
llmobs-sdk-maintenance 45.53% <83.33%> (+0.07%) ⬆️
llmobs-sdk-oldest 45.52% <83.33%> (+0.07%) ⬆️
llmobs-vertex-ai 37.10% <83.33%> (+0.06%) ⬆️
openfeature-macos 38.10% <77.77%> (+0.14%) ⬆️
openfeature-ubuntu 38.18% <77.77%> (+0.13%) ⬆️
openfeature-unit-active 48.62% <ø> (ø)
openfeature-unit-latest 48.46% <ø> (ø)
openfeature-unit-maintenance 48.62% <ø> (ø)
openfeature-unit-oldest 48.62% <ø> (ø)
openfeature-windows 37.98% <77.77%> (+0.19%) ⬆️
platform-core 37.45% <ø> (ø)
platform-esbuild 40.80% <ø> (ø)
platform-instrumentations-misc 30.76% <12.50%> (+0.03%) ⬆️
platform-integration-active 47.20% <92.59%> (+0.23%) ⬆️
platform-integration-latest 47.15% <92.59%> (+0.22%) ⬆️
platform-integration-maintenance 47.20% <92.59%> (+0.22%) ⬆️
platform-integration-oldest 47.37% <92.59%> (+0.22%) ⬆️
platform-shimmer 42.46% <ø> (ø)
platform-unit-guardrails 36.24% <ø> (ø)
platform-webpack 20.68% <ø> (ø)
plugins-azure-durable-functions 37.24% <77.77%> (?)
plugins-azure-event-hubs 34.96% <77.77%> (+0.15%) ⬆️
plugins-azure-service-bus 35.41% <77.77%> (+0.14%) ⬆️
plugins-bullmq 40.19% <83.33%> (-0.08%) ⬇️
plugins-cassandra 34.70% <83.33%> (-0.07%) ⬇️
plugins-cookie 26.66% <ø> (ø)
plugins-cookie-parser 26.47% <ø> (ø)
plugins-crypto 27.72% <ø> (ø)
plugins-dd-trace-api 34.86% <83.33%> (+0.06%) ⬆️
plugins-express-mongo-sanitize 26.60% <ø> (ø)
plugins-express-session 26.43% <ø> (ø)
plugins-fastify 38.81% <83.33%> (+0.06%) ⬆️
plugins-fetch 35.14% <83.33%> (+0.05%) ⬆️
plugins-fs 35.22% <83.33%> (+0.06%) ⬆️
plugins-generic-pool 25.58% <ø> (ø)
plugins-google-cloud-pubsub 42.51% <83.33%> (+0.04%) ⬆️
plugins-grpc 37.57% <83.33%> (+0.06%) ⬆️
plugins-handlebars 26.64% <ø> (ø)
plugins-hapi 36.70% <83.33%> (+0.06%) ⬆️
plugins-hono 36.99% <83.33%> (+0.06%) ⬆️
plugins-ioredis 35.30% <83.33%> (+0.06%) ⬆️
plugins-knex 26.32% <ø> (ø)
plugins-langgraph 34.56% <83.33%> (+0.06%) ⬆️
plugins-ldapjs 24.20% <ø> (ø)
plugins-light-my-request 26.06% <ø> (ø)
plugins-limitd-client 29.57% <12.50%> (-0.05%) ⬇️
plugins-lodash 25.66% <ø> (ø)
plugins-mariadb 36.21% <83.33%> (+0.06%) ⬆️
plugins-memcached 34.96% <83.33%> (+0.06%) ⬆️
plugins-microgateway-core ?
plugins-modelcontextprotocol-sdk 33.85% <83.33%> (+0.06%) ⬆️
plugins-moleculer 37.66% <83.33%> (+0.06%) ⬆️
plugins-mongodb 36.13% <87.50%> (+0.10%) ⬆️
plugins-mongodb-core 35.77% <87.50%> (+0.10%) ⬆️
plugins-mongoose 35.62% <83.33%> (+0.06%) ⬆️
plugins-multer 26.43% <ø> (ø)
plugins-mysql 35.72% <87.50%> (+0.10%) ⬆️
plugins-mysql2 36.01% <87.50%> (+0.10%) ⬆️
plugins-node-serialize 26.70% <ø> (ø)
plugins-opensearch 34.57% <83.33%> (+0.06%) ⬆️
plugins-passport-http 26.48% <ø> (ø)
plugins-pino 31.29% <12.50%> (-0.05%) ⬇️
plugins-postgres 34.11% <87.50%> (+0.12%) ⬆️
plugins-process 27.72% <ø> (ø)
plugins-pug 26.66% <ø> (ø)
plugins-redis 35.36% <83.33%> (+0.06%) ⬆️
plugins-router 39.16% <83.33%> (+0.06%) ⬆️
plugins-sequelize 25.36% <ø> (ø)
plugins-test-and-upstream-amqp10 35.20% <83.33%> (+0.19%) ⬆️
plugins-test-and-upstream-amqplib 40.41% <83.33%> (+0.04%) ⬆️
plugins-test-and-upstream-apollo 36.02% <83.33%> (+0.05%) ⬆️
plugins-test-and-upstream-avsc 34.53% <83.33%> (+0.06%) ⬆️
plugins-test-and-upstream-bunyan 30.65% <12.50%> (-0.05%) ⬇️
plugins-test-and-upstream-connect 37.31% <83.33%> (+<0.01%) ⬆️
plugins-test-and-upstream-graphql 36.95% <83.33%> (+0.04%) ⬆️
plugins-test-and-upstream-koa 36.96% <83.33%> (+0.06%) ⬆️
plugins-test-and-upstream-protobufjs 34.74% <83.33%> (+0.06%) ⬆️
plugins-test-and-upstream-rhea 40.43% <83.33%> (+0.04%) ⬆️
plugins-undici 35.74% <83.33%> (-0.07%) ⬇️
plugins-url 27.72% <ø> (ø)
plugins-valkey 34.96% <83.33%> (+0.06%) ⬆️
plugins-vm 27.72% <ø> (ø)
plugins-winston 31.15% <12.50%> (-0.05%) ⬇️
plugins-ws 38.36% <83.33%> (+0.06%) ⬆️
profiling-macos 42.89% <77.77%> (+0.02%) ⬆️
profiling-ubuntu 43.29% <77.77%> (+0.07%) ⬆️
profiling-windows 40.12% <77.77%> (+0.06%) ⬆️
serverless-aws-sdk-latest-aws-sdk 35.01% <83.33%> (+0.05%) ⬆️
serverless-aws-sdk-latest-bedrockruntime 33.38% <83.33%> (+0.05%) ⬆️
serverless-aws-sdk-latest-client 22.27% <ø> (ø)
serverless-aws-sdk-latest-dynamodb 35.80% <83.33%> (+0.05%) ⬆️
serverless-aws-sdk-latest-eventbridge 28.94% <12.50%> (-0.04%) ⬇️
serverless-aws-sdk-latest-kinesis 38.72% <83.33%> (+0.03%) ⬆️
serverless-aws-sdk-latest-lambda 35.96% <83.33%> (+0.05%) ⬆️
serverless-aws-sdk-latest-s3 33.95% <83.33%> (+0.05%) ⬆️
serverless-aws-sdk-latest-serverless-peer-service 40.14% <83.33%> (+0.04%) ⬆️
serverless-aws-sdk-latest-sns 39.94% <83.33%> (+0.03%) ⬆️
serverless-aws-sdk-latest-sqs 39.08% <83.33%> (+0.03%) ⬆️
serverless-aws-sdk-latest-stepfunctions 34.54% <83.33%> (+0.05%) ⬆️
serverless-aws-sdk-latest-util 47.70% <ø> (ø)
serverless-aws-sdk-oldest-aws-sdk 35.07% <83.33%> (?)
serverless-aws-sdk-oldest-bedrockruntime 33.42% <83.33%> (+0.05%) ⬆️
serverless-aws-sdk-oldest-client 22.65% <ø> (ø)
serverless-aws-sdk-oldest-dynamodb 35.85% <83.33%> (+0.05%) ⬆️
serverless-aws-sdk-oldest-eventbridge 28.99% <12.50%> (-0.04%) ⬇️
serverless-aws-sdk-oldest-kinesis 38.85% <83.33%> (+0.03%) ⬆️
serverless-aws-sdk-oldest-lambda 36.00% <83.33%> (+0.05%) ⬆️
serverless-aws-sdk-oldest-s3 34.01% <83.33%> (+0.05%) ⬆️
serverless-aws-sdk-oldest-serverless-peer-service 40.21% <83.33%> (+0.04%) ⬆️
serverless-aws-sdk-oldest-sns 40.11% <83.33%> (+0.03%) ⬆️
serverless-aws-sdk-oldest-sqs 39.14% <83.33%> (+0.03%) ⬆️
serverless-aws-sdk-oldest-stepfunctions 34.59% <83.33%> (+0.05%) ⬆️
serverless-aws-sdk-oldest-util 48.02% <ø> (ø)
serverless-azure-functions-eventhubs 38.59% <77.77%> (+0.13%) ⬆️
serverless-azure-functions-servicebus 38.64% <77.77%> (+0.13%) ⬆️
serverless-lambda ?
test-optimization-cucumber-latest-7.0.0 50.15% <77.77%> (-0.01%) ⬇️
test-optimization-cucumber-latest-latest 52.77% <77.77%> (+0.08%) ⬆️
test-optimization-cucumber-oldest-7.0.0 50.19% <77.77%> (+0.10%) ⬆️
test-optimization-cypress-latest-12.0.0-commonJS 48.24% <77.77%> (+0.07%) ⬆️
test-optimization-cypress-latest-12.0.0-esm 48.27% <77.77%> (+0.63%) ⬆️
test-optimization-cypress-latest-14.5.4-commonJS 48.09% <77.77%> (+0.07%) ⬆️
test-optimization-cypress-latest-14.5.4-esm 48.12% <77.77%> (+0.05%) ⬆️
test-optimization-cypress-latest-latest-commonJS 48.59% <77.77%> (+0.07%) ⬆️
test-optimization-cypress-latest-latest-esm 48.62% <77.77%> (+0.07%) ⬆️
test-optimization-cypress-oldest-12.0.0-commonJS 48.28% <77.77%> (+0.07%) ⬆️
test-optimization-cypress-oldest-12.0.0-esm 48.31% <77.77%> (+0.07%) ⬆️
test-optimization-cypress-oldest-14.5.4-commonJS 48.13% <77.77%> (+0.07%) ⬆️
test-optimization-cypress-oldest-14.5.4-esm 48.16% <77.77%> (+0.07%) ⬆️
test-optimization-jest-latest-latest 54.35% <77.77%> (+0.04%) ⬆️
test-optimization-jest-latest-oldest 53.52% <77.77%> (+0.08%) ⬆️
test-optimization-jest-oldest-latest 54.36% <77.77%> (+0.05%) ⬆️
test-optimization-jest-oldest-oldest 53.45% <77.77%> (+0.05%) ⬆️
test-optimization-mocha-latest-latest 52.96% <77.77%> (+0.07%) ⬆️
test-optimization-mocha-latest-oldest 50.55% <77.77%> (+0.02%) ⬆️
test-optimization-mocha-oldest-latest 53.03% <77.77%> (+0.07%) ⬆️
test-optimization-mocha-oldest-oldest 50.52% <77.77%> (+0.07%) ⬆️
test-optimization-playwright-latest-latest-playwright-active-test-span 43.70% <11.11%> (+0.32%) ⬆️
test-optimization-playwright-latest-latest-playwright-atr 42.45% <11.11%> (+0.14%) ⬆️
test-optimization-playwright-latest-latest-playwright-efd 42.72% <11.11%> (+0.13%) ⬆️
test-optimization-playwright-latest-latest-playwright-impacted-tests 42.35% <11.11%> (+0.03%) ⬆️
test-optimization-playwright-latest-latest-playwright-reporting 42.48% <11.11%> (+0.12%) ⬆️
test-optimization-playwright-latest-latest-playwright-test-management 44.43% <11.11%> (+0.14%) ⬆️
test-optimization-playwright-latest-oldest-playwright-active-test-span 43.73% <11.11%> (+0.32%) ⬆️
test-optimization-playwright-latest-oldest-playwright-atr 42.62% <11.11%> (+0.15%) ⬆️
test-optimization-playwright-latest-oldest-playwright-efd 42.73% <11.11%> (+0.13%) ⬆️
test-optimization-playwright-latest-oldest-playwright-impacted-tests 42.37% <11.11%> (+0.03%) ⬆️
test-optimization-playwright-latest-oldest-playwright-reporting 42.52% <11.11%> (+0.13%) ⬆️
test-optimization-playwright-latest-oldest-playwright-test-management 44.47% <11.11%> (+0.14%) ⬆️
test-optimization-playwright-oldest-latest-playwright-active-test-span 43.74% <11.11%> (+0.34%) ⬆️
test-optimization-playwright-oldest-latest-playwright-atr 42.49% <11.11%> (+0.14%) ⬆️
test-optimization-playwright-oldest-latest-playwright-efd 42.73% <11.11%> (+0.13%) ⬆️
test-optimization-playwright-oldest-latest-playwright-impacted-tests 42.40% <11.11%> (+0.03%) ⬆️
test-optimization-playwright-oldest-latest-playwright-reporting 42.49% <11.11%> (+0.12%) ⬆️
test-optimization-playwright-oldest-latest-playwright-test-management 44.44% <11.11%> (+0.14%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-active-test-span 43.77% <11.11%> (+0.32%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-atr 42.66% <11.11%> (+0.15%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-efd 42.75% <11.11%> (+0.13%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-impacted-tests 42.41% <11.11%> (+0.03%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-reporting 42.53% <11.11%> (+0.13%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-test-management 44.49% <11.11%> (+0.14%) ⬆️
test-optimization-selenium-latest 45.62% <11.11%> (+0.10%) ⬆️
test-optimization-selenium-oldest 45.08% <11.11%> (+0.11%) ⬆️
test-optimization-testopt-active 47.18% <77.77%> (+0.12%) ⬆️
test-optimization-testopt-latest 47.14% <77.77%> (+0.12%) ⬆️
test-optimization-testopt-maintenance 47.18% <77.77%> (+0.12%) ⬆️
test-optimization-testopt-oldest 47.96% <77.77%> (+0.13%) ⬆️
test-optimization-vitest-latest 50.75% <11.11%> (+0.15%) ⬆️
test-optimization-vitest-oldest 47.43% <11.11%> (+0.35%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 1, 2026

Benchmarks

Benchmark execution time: 2026-05-06 22:13:08

Comparing candidate commit ac38d52 in PR branch BridgeAR/2026-05-01-pr8188-8-perf-encode-compact-int with baseline commit 50aa025 in branch master.

Found 23 performance improvements and 1 performance regressions! Performance is the same for 1724 metrics, 96 unstable metrics.

scenario:encoders-0.4-20

  • 🟩 execution_time [-55.855ms; -46.795ms] or [-6.938%; -5.812%]
  • 🟩 max_rss_usage [-15.625MB; -12.252MB] or [-7.542%; -5.914%]

scenario:encoders-0.4-22

  • 🟩 execution_time [-54.990ms; -48.633ms] or [-7.075%; -6.257%]

scenario:encoders-0.4-24

  • 🟩 execution_time [-58.208ms; -52.743ms] or [-7.521%; -6.815%]

scenario:encoders-0.4-events-native-18

  • 🟩 execution_time [-660.561ms; -564.232ms] or [-10.765%; -9.195%]
  • 🟩 max_rss_usage [-24.695MB; -22.869MB] or [-6.096%; -5.646%]

scenario:encoders-0.4-events-native-20

  • 🟩 cpu_user_time [-157.716ms; -118.810ms] or [-7.035%; -5.300%]
  • 🟩 execution_time [-682.096ms; -580.119ms] or [-11.909%; -10.129%]
  • 🟩 instructions [-1029.9M instructions; -957.0M instructions] or [-7.157%; -6.651%]
  • 🟩 max_rss_usage [-23.646MB; -22.597MB] or [-5.886%; -5.625%]

scenario:encoders-0.4-events-native-22

  • 🟩 cpu_user_time [-186.334ms; -143.257ms] or [-8.751%; -6.728%]
  • 🟩 execution_time [-685.433ms; -570.749ms] or [-12.285%; -10.229%]
  • 🟩 instructions [-1009.3M instructions; -933.3M instructions] or [-7.534%; -6.966%]
  • 🟩 max_rss_usage [-24.511MB; -23.389MB] or [-5.909%; -5.639%]

scenario:encoders-0.4-events-native-24

  • 🟩 cpu_user_time [-168.080ms; -125.035ms] or [-7.930%; -5.899%]
  • 🟩 execution_time [-662.437ms; -565.080ms] or [-11.858%; -10.116%]
  • 🟩 instructions [-964.3M instructions; -915.7M instructions] or [-7.272%; -6.905%]
  • 🟩 max_rss_usage [-23.719MB; -21.609MB] or [-5.726%; -5.217%]

scenario:encoders-0.5-22

  • 🟥 max_rss_usage [+7.150MB; +13.206MB] or [+5.795%; +10.704%]
  • 🟩 execution_time [-25.493ms; -20.381ms] or [-7.449%; -5.955%]

scenario:encoders-0.5-events-legacy-18

  • 🟩 max_rss_usage [-35.724MB; -29.594MB] or [-24.598%; -20.377%]

scenario:encoders-0.5-events-legacy-20

  • 🟩 max_rss_usage [-26.219MB; -19.864MB] or [-18.330%; -13.887%]

scenario:encoders-0.5-events-legacy-22

  • 🟩 max_rss_usage [-9.891MB; -7.449MB] or [-7.288%; -5.489%]

scenario:encoders-0.5-events-legacy-24

  • 🟩 max_rss_usage [-15.128MB; -10.989MB] or [-11.068%; -8.040%]

BridgeAR added 3 commits May 6, 2026 23:47
…k ints

The 0.4 trace export used to emit `span.error`, `span.start`, `span.duration`,
every integer value in `span.meta` / `span.metrics`, and every `int_value` in
span events as a fixed 9-byte float64. msgpack's compact int variants (fixint
/ uint8 / uint16 / uint32 / int*) carry the same number across the wire in
1-5 bytes for the small values these fields actually hold in production. The
agent decodes both encodings as the same Go int64 / float64.

The following improvements are implemented:

1. The pre-encoded `KEY_*_PREFIX` buffers for `error`, `start`, and `duration`
   are replaced with the bare key buffers. The hot loop now emits the key,
   then calls `#encodeIntOrFloat` which picks the smallest valid msgpack
   encoding for the value. `#writeIntegerField` and `#writeLongField` are
   removed with their only callers.
2. `#encodeMetaEntries` (the 0.4-private fast path for `span.meta` and
   `span.metrics`) emits the numeric value via `#encodeIntOrFloat`. Integer
   metrics like `process.pid: 4321` shrink from 9 to 3 bytes; small ones
   like `_sampling_priority_v1: 1` shrink to a single fixint byte.
3. Span event attribute `int_value` in `#emitAttribute` and `#emitArrayItem`
   emits via the same helper. The `type: 2` tag stays; only the wire
   encoding of the value byte changes.

`#encodeIntOrFloat` deliberately avoids the NaN-coerces-to-0 behavior of
`MsgpackEncoder.encodeNumber` — `Number.isInteger(NaN)` is `false`, so NaN
keeps its float64 bits.

`_encodeMap` (shared with the 0.5 encoder and the CI-visibility encoders) is
left on float64 for now: those go to different agent intakes that weren't
part of the wire-format review.

The 0.4 spec test updates the four `start, 123n` / `duration, 456n`
assertions to bare numbers, since small ints now decode as `Number`
regardless of `useBigInt64`. Trace / span / parent IDs still use uint64 and
stay on bigint.

Microbench numbers are flat — per-span CPU is unchanged. The win is on the
wire: a typical 30-span trace shrinks by ~50 B per span (4 B from `error`,
~8 B per small `duration`, ~6 B per integer metric, ~8 B per integer event
attribute).
Following the 0.4 change, the 0.5 trace export now also emits `span.error`,
`span.start`, `span.duration`, and every integer value in `span.meta` /
`span.metrics` as the smallest valid msgpack int. Same agent decoder
behavior, smaller wire.

Two targeted edits:

1. The `_encode` loop swaps `_encodeInteger(span.error)`,
   `_encodeLong(span.start || 0)`, and `_encodeLong(span.duration || 0)` for
   `_encodeIntOrFloat`. Large timestamps and durations still take the uint64
   branch (same 9 bytes), but small values like `error: 0` collapse to a
   single fixint byte.
2. `_encodeMap` is overridden in 0.5 with the same shape as the inherited
   0.4 method, but the numeric branch goes through `_encodeIntOrFloat`. The
   0.4 base method is left on float64 because the CI-visibility and
   span-stats encoders inherit it and target a different intake that wasn't
   part of this review.

`#encodeIntOrFloat` moves from `#private` to `_encodeIntOrFloat` so the
subclass can call it. NaN handling stays — `Number.isInteger(NaN)` is
`false`, so NaN keeps its float64 bits instead of coercing to fixint 0 the
way `MsgpackEncoder.encodeNumber` would.
`error: 0`, `_sampling_priority_v1: 1`, attribute counts, http status codes,
and most small metric values land in the msgpack positive-fixint range
(0..127). The current dispatch through `Number.isInteger`, the `>= 0`
branch, and `MsgpackEncoder.encodeUnsigned`'s size cascade costs more than
the actual encoding for these values.

A single check identifies them: `value === (value & 0x7F)` is true iff
`value` is an exact integer in [0, 127]. The bitwise `&` coerces non-integer
and out-of-range values into something that can't equal `value` again. NaN,
±Infinity, negatives, and floats with a fractional part all fall through to
the existing dispatch.

Recovers the ~3 % CPU the compact-int change cost on metric-heavy spans
without growing the wire format.
@BridgeAR BridgeAR force-pushed the BridgeAR/2026-05-01-pr8188-8-perf-encode-compact-int branch from ca25265 to ac38d52 Compare May 6, 2026 21:49
@BridgeAR BridgeAR changed the title perf(encode): drop the per-span filter Array allocations in the 0.4 e… perf(encode): emit span fields and event attributes as compact msgpack ints May 6, 2026
@BridgeAR BridgeAR marked this pull request as ready for review May 6, 2026 22:18
@BridgeAR BridgeAR requested a review from a team as a code owner May 6, 2026 22:18
@BridgeAR BridgeAR removed the blocked label May 8, 2026
@BridgeAR BridgeAR merged commit 81e10d1 into master May 11, 2026
983 of 1009 checks passed
@BridgeAR BridgeAR deleted the BridgeAR/2026-05-01-pr8188-8-perf-encode-compact-int branch May 11, 2026 13:51
@dd-octo-sts dd-octo-sts Bot mentioned this pull request May 12, 2026
rochdev pushed a commit that referenced this pull request May 13, 2026
…k ints (#8229)

* perf(encode): emit span fields and event attributes as compact msgpack ints

The 0.4 trace export used to emit `span.error`, `span.start`, `span.duration`,
every integer value in `span.meta` / `span.metrics`, and every `int_value` in
span events as a fixed 9-byte float64. msgpack's compact int variants (fixint
/ uint8 / uint16 / uint32 / int*) carry the same number across the wire in
1-5 bytes for the small values these fields actually hold in production. The
agent decodes both encodings as the same Go int64 / float64.

The following improvements are implemented:

1. The pre-encoded `KEY_*_PREFIX` buffers for `error`, `start`, and `duration`
   are replaced with the bare key buffers. The hot loop now emits the key,
   then calls `#encodeIntOrFloat` which picks the smallest valid msgpack
   encoding for the value. `#writeIntegerField` and `#writeLongField` are
   removed with their only callers.
2. `#encodeMetaEntries` (the 0.4-private fast path for `span.meta` and
   `span.metrics`) emits the numeric value via `#encodeIntOrFloat`. Integer
   metrics like `process.pid: 4321` shrink from 9 to 3 bytes; small ones
   like `_sampling_priority_v1: 1` shrink to a single fixint byte.
3. Span event attribute `int_value` in `#emitAttribute` and `#emitArrayItem`
   emits via the same helper. The `type: 2` tag stays; only the wire
   encoding of the value byte changes.

`#encodeIntOrFloat` deliberately avoids the NaN-coerces-to-0 behavior of
`MsgpackEncoder.encodeNumber` — `Number.isInteger(NaN)` is `false`, so NaN
keeps its float64 bits.

`_encodeMap` (shared with the 0.5 encoder and the CI-visibility encoders) is
left on float64 for now: those go to different agent intakes that weren't
part of the wire-format review.

The 0.4 spec test updates the four `start, 123n` / `duration, 456n`
assertions to bare numbers, since small ints now decode as `Number`
regardless of `useBigInt64`. Trace / span / parent IDs still use uint64 and
stay on bigint.

Microbench numbers are flat — per-span CPU is unchanged. The win is on the
wire: a typical 30-span trace shrinks by ~50 B per span (4 B from `error`,
~8 B per small `duration`, ~6 B per integer metric, ~8 B per integer event
attribute).

* perf(encode): extend compact msgpack int encoding to the 0.5 wire

Following the 0.4 change, the 0.5 trace export now also emits `span.error`,
`span.start`, `span.duration`, and every integer value in `span.meta` /
`span.metrics` as the smallest valid msgpack int. Same agent decoder
behavior, smaller wire.

Two targeted edits:

1. The `_encode` loop swaps `_encodeInteger(span.error)`,
   `_encodeLong(span.start || 0)`, and `_encodeLong(span.duration || 0)` for
   `_encodeIntOrFloat`. Large timestamps and durations still take the uint64
   branch (same 9 bytes), but small values like `error: 0` collapse to a
   single fixint byte.
2. `_encodeMap` is overridden in 0.5 with the same shape as the inherited
   0.4 method, but the numeric branch goes through `_encodeIntOrFloat`. The
   0.4 base method is left on float64 because the CI-visibility and
   span-stats encoders inherit it and target a different intake that wasn't
   part of this review.

`#encodeIntOrFloat` moves from `#private` to `_encodeIntOrFloat` so the
subclass can call it. NaN handling stays — `Number.isInteger(NaN)` is
`false`, so NaN keeps its float64 bits instead of coercing to fixint 0 the
way `MsgpackEncoder.encodeNumber` would.

* perf(encode): inline a fixint fast path in _encodeIntOrFloat

`error: 0`, `_sampling_priority_v1: 1`, attribute counts, http status codes,
and most small metric values land in the msgpack positive-fixint range
(0..127). The current dispatch through `Number.isInteger`, the `>= 0`
branch, and `MsgpackEncoder.encodeUnsigned`'s size cascade costs more than
the actual encoding for these values.

A single check identifies them: `value === (value & 0x7F)` is true iff
`value` is an exact integer in [0, 127]. The bitwise `&` coerces non-integer
and out-of-range values into something that can't equal `value` again. NaN,
±Infinity, negatives, and floats with a fractional part all fall through to
the existing dispatch.

Recovers the ~3 % CPU the compact-int change cost on metric-heavy spans
without growing the wire format.
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.

2 participants