Skip to content

v5.102.0 proposal - #8339

Merged
BridgeAR merged 38 commits into
v5.xfrom
v5.102.0-proposal
May 8, 2026
Merged

BridgeAR merged 38 commits into
v5.xfrom
v5.102.0-proposal

Conversation

@dd-octo-sts

@dd-octo-sts dd-octo-sts Bot commented May 7, 2026 •

Copy link
Copy Markdown
Contributor
  • [3daff728b8] - (SEMVER-PATCH) fix: tolerate non-string span event names and whitespace-suffixed step functions JSON (Ruben Bridgewater) #8358
  • [130a30caf8] - (SEMVER-PATCH) chore(ci) update one-pipeline (gh-worker-campaigns-3e9aa4[bot]) #8342
  • [9001878b55] - (SEMVER-PATCH) refactor: dedupe redundant chars in regex character classes (Ruben Bridgewater) #8346
  • [6c7179306d] - (SEMVER-PATCH) refactor(appsec): convert WAF duration BigInt to Number, not via parseInt (Ruben Bridgewater) #8306
  • [14a0a822a3] - (SEMVER-PATCH) refactor: dedupe identical function bodies (Ruben Bridgewater) #8347
  • [0e7a8c7256] - (SEMVER-PATCH) refactor: activate three sonarjs test/loop rules (Ruben Bridgewater) #8349
  • [80076dd5af] - (SEMVER-PATCH) chore(eslint): activate n/hashbang and n/no-process-exit (Ruben Bridgewater) #8352
  • [46c61ffdd1] - (SEMVER-PATCH) refactor(prefer-rest-params): convert non-instrumentation wrappers (Ruben Bridgewater) #8353
  • [bb4f61acaa] - (SEMVER-PATCH) refactor(prefer-rest-params): convert instrumentations a-c (Ruben Bridgewater)
  • [a66a186421] - (SEMVER-PATCH) refactor(prefer-rest-params): convert instrumentations d-l (Ruben Bridgewater) #8355
  • [418179b183] - (SEMVER-PATCH) refactor(prefer-rest-params): convert instrumentations m-z (Ruben Bridgewater) #8356
  • [1afa83174a] - (SEMVER-PATCH) build(types): add index.d.v5.ts snapshot and v5-release swap script (Ruben Bridgewater) #8333
  • [66d49013dc] - (SEMVER-PATCH) update all slow benchmarks to run less iterations (Roch Devost) #8345
  • [16c4e16b60] - (SEMVER-PATCH) update llmobs encode unicode mixed benchmarks with less iterations (Roch Devost) #8344
  • [035fb236b2] - (SEMVER-PATCH) [test optimization] fix mocha EFD callback test arity (Juan Antonio Fernández de Alba) #8338
  • [5c7c227eb8] - (SEMVER-MINOR) feat(llmobs): enhance LLM Observability span processor span kind, embedding & retrieval input and output (Sam Brenner) #8299
  • [d422180bbc] - (SEMVER-PATCH) [test optimizaton] Use duration buckets for vitest EFD retries (Juan Antonio Fernández de Alba) #8288
  • [1764a646dc] - (SEMVER-PATCH) fix(index): Add truncate type to database plugin interfaces (Pablo Erhard) #8336
  • [ce8a754efa] - (SEMVER-PATCH) chore: add sonar linter (Ruben Bridgewater) #8150
  • [16016c6b5a] - (SEMVER-PATCH) perf(shimmer): drop assertNotClass toString call (Ruben Bridgewater) #8329
  • [4c45faa946] - (SEMVER-PATCH) fix(google-cloud-pubsub): honor DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED on consumer and push spans (Crystal Luc-Magloire) #8125
  • [771253286d] - (SEMVER-PATCH) perf(appsec): trim per-request allocations in waf and reporter (Ruben Bridgewater) #8326
  • [2c8447bb13] - (SEMVER-PATCH) test: decouple request specs from nock 13 internals (Ruben Bridgewater) #8305
  • [8d64c6e392] - (SEMVER-PATCH) [test optimization] Use duration buckets for cucumber EFD retries (Juan Antonio Fernández de Alba) #8287
  • [8a10090138] - (SEMVER-PATCH) perf(aws-sdk): cache instrumentation handles and dedupe per-call work (Ruben Bridgewater) #8231
  • [6c0da23ceb] - (SEMVER-PATCH) [test optimization] Use duration buckets for mocha EFD retries (Juan Antonio Fernández de Alba) #8286
  • [baeb04586b] - (SEMVER-PATCH) fix(ci): approve pnpm package-manager builds (Juan Antonio Fernández de Alba) #8331
  • [a200dc4d96] - (SEMVER-PATCH) chore(iast): Improve stringifyWithRanges performance (Ugaitz Urien) #8271
  • [19ef5f86f2] - (SEMVER-PATCH) test(jest,vitest): split integration specs into parallel CI jobs via SPEC matrix (Roch Devost) #8311
  • [97853d2969] - (SEMVER-PATCH) ci: add fail-fast: false to jobs with matrix (Charles de Beauchesne) #8314
  • [0fdc801f66] - (SEMVER-PATCH) fix(test-optimization): edge cases when computing final_status tag on playwright (Sebastián Kay) #8249
  • [50aa02547e] - (SEMVER-PATCH) test: reuse azure function process to lower tests run time (Roch Devost) #8102
  • [fe9678ab94] - (SEMVER-PATCH) fix(net): restore Socket.emit after the connect handshake (Ruben Bridgewater) #8275
  • [5168c02d94] - (SEMVER-PATCH) perf(encode): drop the per-span filter Array allocations in the 0.4 e… (Ruben Bridgewater) #8233
  • [6bf78256b2] - (SEMVER-PATCH) ci(benchmarks): bump microbenchmark splits from 5 to 6 (Fayssal DEFAA) #8283
  • [ff0e435df9] - (SEMVER-PATCH) chore(ci): pin all Docker images to SHA digests (Roch Devost) #8298
  • [c54290e695] - (SEMVER-PATCH) test(kafkajs): wait for leaders on createTopics to fix DSM flakes (Eric Firth) #8300

ericfirth and others added 22 commits May 7, 2026 19:06
)

Three DSM tests have been flaking on master with
"KafkaJSProtocolError: This server does not host this topic-partition",
thrown from consumer.subscribe -> Cluster.refreshMetadata in beforeEach.

Root cause: createTopics({ waitForLeaders: false }) returns as soon as
the controller acks topic creation, before partition leaders are
elected and propagated. The immediate consumer.subscribe call then
lands a metadata refresh on a broker that does not yet host the
partition leader. Flip the flag to true (which is also the kafkajs
default) so the admin call waits for leader election before returning.

Apply the same fix to the sister index.spec.js, which has the same
anti-pattern but has so far been masked by producer-first test
ordering.

Verified locally with 20 consecutive green runs of dsm.spec.js.
* chore(ci): pin all Docker images to SHA digests

Pin every Docker image reference in docker-compose.yml and GitHub
Actions workflows to its manifest-list SHA digest, matching the
pattern already used for GitHub Actions versions. The original
tag is preserved as an inline comment for readability.

Two exceptions:
- bitnami/openldap:latest – image no longer available on Docker Hub
- aerospike:${{ matrix.aerospike-image }} – dynamic matrix variable,
  cannot be pinned statically

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* chore(ci): add lint check for unpinned Docker image references

Adds scripts/check-docker-image-shas.js which scans all tracked YAML
files and fails if any `image:` reference does not use the
`name@sha256:<digest> # tag` form. Wired into `npm run lint` alongside
the existing check-no-mcr-images check.

Skips dynamic GitHub Actions expressions (${{ ... }}), plain env-var
references ($VAR), and a small explicit allowlist for images that
genuinely cannot be pinned at this time.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* fix(ci): pin bitnami/openldap to bitnamilegacy and remove allowlist

bitnami/openldap:latest returns 404 on Docker Hub; the correct image is
bitnamilegacy/openldap:latest (already used in appsec.yml). Update
docker-compose.yml to match and pin it to its SHA digest.

With no remaining exceptions, drop the ALLOWED_UNPINNED allowlist from
the check-docker-image-shas script entirely.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* chore(ci): move aerospike image ref into matrix so SHA check applies

Rename matrix key aerospike-image → image and embed the full
aerospike@sha256: reference directly in each matrix entry. The service
container now references ${{ matrix.image }}, which the SHA validator
skips (it's an expression), but the matrix value lines themselves are
plain `image:` YAML entries that the validator does check.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* fix(ci): move comment outside flow sequence for aerospike base image

A # inside a quoted YAML flow sequence string is not a comment — it
becomes part of the value, making the Docker image reference invalid.
Move the version comment after the closing bracket where YAML treats
it as a real comment.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* chore(ci): improve check-docker-image-shas error message

Replace the dead-end reference to a non-existent script with a clear,
actionable message pointing to the image's registry page.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* chore(ci): add aerospike job name to use version instead of SHA

Add an aerospike-version matrix key and a name: field so job names
show the readable version tag (e.g. ce-6.4.0.3) rather than the full
SHA digest.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
#8233)

* perf(encode): drop the per-span filter Array allocations in the 0.4 encoder

Each of `_encodeMap`, `_encodeMetaStruct`, `_encodeObjectAsMap`, and
`_encodeObjectAsArray` walked the input twice -- once via
`Object.keys(value).filter(k => typeof value[k] === 'string' || ...)`
to build a pre-filtered `validKeys` Array, then over that Array to
emit pairs. Each call allocates the closure plus the `validKeys`
Array; the encoder runs once per finished span on the flush path, and
each span flushes through `_encodeMap` for `meta` and `metrics`, so
that's at minimum two allocations per span before any nested
`meta_struct`.

Walk the input twice instead -- once to count valid entries (no
allocations, just typeof checks), once to emit pairs. Same time
complexity, lower constant factor: ~13% faster on the typical span
`meta` shape (10 string/number keys + 1 dropped). For
`_encodeObjectAsArray` the `validValue` Array (sized to the surviving
items) is replaced with a `{ length: validCount }` shape passed to
`_encodeArrayPrefix`, which only reads `.length`.

Drive-by experiment: the audit also suggested narrowing the per-span
`try/catch` in `agentless-json.js` to wrap only the `JSON.stringify`
call. A 1-second microbench against a realistic span shows wide
3.19 Mops/s vs narrow 3.21 Mops/s -- inside the noise band, modern V8
does not penalise a function-scope `try/catch` around the hot work.
Leave the wide catch as-is; the narrower variant would lose the
formatSpan / spanToJSON defensive coverage for no measurable win.

* perf(encode): specialize the 0.4 encoder hot path

This is mainly a performance improvement for the agent-encoding hot path. The
0.4 encoder runs once per exported trace, so the previous two-pass map walk,
per-call `Uint8Array` view allocations, and V8 dictionary-mode transitions
from `delete` all amortized poorly.

The following improvements are implemented:

1. The string cache now stores the encoded fixstr/str32 bytes as a Buffer
   subarray instead of `{ start, end }`. Each `_encodeString` cache hit
   becomes one map lookup plus a native `Uint8Array.set`, with no per-call
   view allocation.
2. `_encodeMap` runs a single pass with a count-and-patch slot. The dedicated
   typeof-only pre-loop is gone, and the polymorphic `_encodeValue` switch is
   split into specialized string and number branches at the call site.
3. The span-level keys (`trace_id`, `span_id`, `meta`, …) and their value
   prefix bytes are pre-encoded at module load. The hot loop emits each via
   one `bytes.set` and skips the cache entirely. For the ID, error, start,
   and duration fields the key + value-prefix byte are fused into a single
   buffer so each field is one `bytes.reserve` instead of two.
4. `formatSpanEvents` and `convertSpanEventAttributeValues` are gone. A
   specialized `#encodeSpanEvents` walks the raw events directly and emits
   OTel typed wrappers inline (`[0x82, 'type', N, '*_value', value]`),
   bypassing both the pre-conversion mutation and the recursive generic
   walker. Filter-out is handled by rewinding `bytes.length` instead of
   counting twice. With the native-events config picked once at construction,
   the hot path also no longer pays a per-span `config.trace.nativeSpanEvents`
   check.
5. Every `delete` in the format pipeline becomes `= undefined`. `delete
   span.span_events` (and the two attribute-filter deletes inside event
   formatting) would push every event-bearing span and attribute object into
   V8 dictionary mode for the rest of its lifetime; the encoder skips
   undefined-valued keys, so the wire output stays unchanged.

Wire format stays decoder-compatible. The only changes are fixmap (`0x82` /
`0x83`) in place of `0xDF + 4-byte count` for the span-event outer map and
the typed-wrapper inner map, fixmap(1) for `array_value`, and a fixint type
discriminator instead of float64. All decode to identical JS structures and
the existing span_events tests verify each shape against the pre-existing
expected output.

Drive-by fix:

* `MsgpackChunk._minSize` / `_resize` and the encoder's `_msgpack`, `_limit`,
  `_writer`, `_config`, `_debugEncoding` move to `#private`. The 0.4 spec
  test that toggled `_debugEncoding` now injects `DD_TRACE_ENCODING_DEBUG:
  true` via the proxyquired config rather than poking the field after
  construction.

Microbench, 20k traces × 30 spans:

* 0.4 with native span events: ~644k → ~1.05M spans/s.
* 0.4 with legacy span events: ~644k → ~770k spans/s.
* 0.4 spans without events: ~430k → ~1.45M spans/s.
* 0.5 spans without events: ~1.34M → ~2.55M spans/s.

* perf(encode): emit span fixed fields in a single reserve

The map prefix byte, the optional `type` field, the three IDs, and the
`name` / `resource` / `service` strings used to be seven separate
`bytes.reserve` + `Uint8Array.set` round trips. They're all known sizes
once the cached string entries are pre-fetched, so they can collapse into
one `bytes.reserve` covering the whole block followed by sequential native
writes into the freshly-grown buffer.

`_encode` now:

1. Looks up `name` / `resource` / `service` (and `type` when present) in the
   string cache up front.
2. Sums the block size from the known key-buffer lengths and the cached
   value-entry lengths.
3. Reserves once, then writes the map prefix byte, the optional type field,
   the three ID fields (via the new no-reserve `#writeIdAt` helper), and the
   three string fields directly into the buffer.

`error` / `start` / `duration` and the meta / metrics / span_events / meta_struct
sections stay on their own reserves because their value sizes only become
known during encoding.

`#writeIdField` and `#writeKeyAndString` had no callers left after this and
are removed; net the file shrinks.

* perf(encode): hand-write the legacy span_events stringifier

Both `0.4` (in legacy mode) and `0.5` (always) serialize `span.span_events`
into a JSON string and hang it off `span.meta.events` for agents that don't
support the native top-level slot. `JSON.stringify` is the dominant cost on
event-bearing spans.

The shape is fixed by `extractSpanEvents` (`{ name, time_unix_nano,
attributes? }`) and attribute values are pre-sanitized to primitives or
arrays of primitives, so the stringifier doesn't need to handle cycles,
`toJSON` hooks, replacer callbacks, or symbols. A specialized walker that
emits the JSON string directly is ~7 % faster than `JSON.stringify` on a
representative event payload — measured standalone — and produces
byte-for-byte identical output for the post-sanitization shape.

The hot piece is `escapeJsonString`: it scans the string once for `"`, `\`,
or any control char in U+0000–U+001F and, if none is present, returns
`"<str>"` directly. Strings that need escaping fall back to
`JSON.stringify` to keep surrogate-pair / lone-surrogate handling correct.
Numbers go through `Number.isFinite` to match `JSON.stringify`'s
`NaN`/`Infinity` → `null` collapse.

`stringifySpanEvents` is exported from `0.4.js` and reused from `0.5.js` —
the wire shape is identical so a second copy would only invite drift.

End-to-end this lifts `0.5 with-events` and `0.4 (legacy) with-events` by
~3-5 %; the standalone stringify win is larger but the overall encode
pipeline has plenty of other work per span.
This drops `datadog-instrumentations/src/net.js` from the stack trace
of unhandled socket errors. The crash itself is unchanged: a socket
without an `'error'` listener still terminates the process, which is
upstream behaviour. The dd-trace frame just made the integration look
like the cause.

The wrap on `Socket.emit` only needs to live until `'ready'` and
`'connect'` bind the parent context (see `addTraceBind` in `tcp.js`).
It now restores the original emit after both have fired, and on
`'error'` / `'close'` for the pre-connect failure path, instead of
staying for the lifetime of the socket.

Fixes: #3866
* refactor(azure-functions): move span group collection helper to FakeAgent

Add collectGroups() to FakeAgent and refactor EH/SB specs to use it,
eliminating the duplicated collectingAssert/isXInvokeGroup helpers per
BridgeAR's review.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* fix(azure-functions): use correct span name in batch-links-disabled tests

The tryAdd assertions were checking for 'azure.functions.create' which
is not a span name emitted by the tracer. The actual names are
'azure.eventhubs.create' and 'azure.servicebus.create', so the absence
check was trivially passing.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…#8231)

* perf(aws-sdk): cache instrumentation handles and dedupe per-call work

The AWS instrumentation runs inside customer code on every traced
SDK call, so per-send work compounds. The cleanups below all live on
the same per-call code path.

The instrumentation hook (`packages/datadog-instrumentations/src/
aws-sdk.js`) cached the seven diagnostic-channel handles per
service slug in a `Map`, the stripped Client / Command class names
per constructor in `WeakMap`s, and the `getChannelSuffix` slug list
in a module-scope `Set`. The Command-class wrap of
`deserialize` was running `shimmer.wrap(command, ...)` per-send;
when `command.deserialize` is inherited from the prototype (the
`@aws-sdk/client-*` v3 default) it now wraps the prototype once via
a `patchedCommandPrototypes` `WeakSet`, mirroring the
`patchedClientConfigProtocols` pattern directly below. Per-instance
wrap remains the fallback for shapes that override `deserialize` as
an own property.

The plugin (`packages/datadog-plugin-aws-sdk/`) drops several full
JSON round-trips on customer payloads. A new
`BaseAwsSdkPlugin.injectFieldIntoJsonObject` static helper splices
`,"<key>":<value>` before the trailing `}` when the payload ends
cleanly and does not already carry the key, falling back to
`JSON.parse` + assign + `JSON.stringify` only when the cheap path
can't match. EventBridge `Detail`, Step Functions `input`, and
Lambda `ClientContext.custom` use it; the no-`ClientContext` path
in Lambda skips parsing entirely. SQS stringifies `ddInfo` once
after both `tracer.inject` and `DsmPathwayCodec.encode` have
populated it, and `responseExtract` returns the parsed Body so
`responseExtractDSMContext` reuses it for `message[0]` instead of
re-parsing. Kinesis stringifies each record once for both the
1 MiB size check and the outgoing Buffer, and the response-side
`JSON.parse` is wrapped in `try`/`catch` so a non-JSON record skips
DSM extraction without throwing through the response handler.

A new `util.js#isEmpty` / `hasAtLeast` pair replaces every
`Object.keys(x).length === 0` and `Object.keys(x).length >= N`
emptiness / quota check on the SQS, SNS, and Kinesis inject paths.
The for-in shape they wrap is what makes them cheap — it's the
only allocation-free shape in JS for the check, and a microbench
across empty, 1-key, 4-key, and 10-key objects pins it as
1.24-1.36x faster than `Object.keys(x).length`.

Drive-by fix:

* `extractResponseBody` swaps `Object.entries(...).filter(...)` +
  `Object.fromEntries(...)` for a module-scope `Set` of the AWS SDK
  envelope keys plus a `{...response}` spread followed by `delete`s
  for each excluded key. `hasOwnProperty` becomes `Object.hasOwn`.
* `sqs.js responseExtractDSMContext` hoists
  `params.QueueUrl.slice(QueueUrl.lastIndexOf('/') + 1)` out of the
  per-message receive loop, and `sns.js generateTags` reads the
  trailing ARN segment via `slice(lastIndexOf(':') + 1)` instead of
  `split(':').at(-1)`. Each saves an Array allocation per call.
* `wrapDeserialize` changes from `(deserialize, channelSuffix,
  responseIndex)` to `(deserialize, headersCh, responseIndex)`
  since the cached channel handle is what the caller already has.

* perf(aws-sdk): drop arguments mutation, narrow inject try/catch, build response body without spread+delete

Three focused wins on the AWS SDK instrumentation hot path:

1. `wrapRequest` (`@aws-sdk` v2). Setting `arguments[0] = wrapCb(...)`
   forced V8 to materialise the arguments object on every call, deopting
   both `wrappedRequest` and the downstream `send.apply(this,
   arguments)`. `Request.send` only accepts an optional callback in both
   v2 and v3 SDKs, so dispatch the (at most one-arg) call site through
   explicit `runStores(ctx, send, this, wrappedCb)` / `runStores(ctx,
   send, this)` branches and let V8 keep the optimised function.

2. `requestInject` in `eventbridge.js`, `stepfunctions.js`, and
   `lambda.js`. The `try/catch` covered the entire body, including
   `tracer.inject`, `Buffer.byteLength`, and `Buffer.from(...,
   'base64').toString('utf8')` -- none of which throw on the inject
   path. The only throwing surface is the `JSON.parse` slow path inside
   `BaseAwsSdkPlugin.injectFieldIntoJsonObject` (and the inline
   `JSON.parse(clientContextJson)` in the lambda `"custom"` branch).
   Narrow the catch to wrap only those calls so the rest of each inject
   stays in V8's optimisable surface and any future bug in
   `tracer.inject` actually surfaces in CI instead of being silently
   logged. Behaviourally equivalent for the malformed-JSON path that
   the catch was guarding.

3. `BaseAwsSdkPlugin#extractResponseBody`. `{ ...response }` followed
   by `delete body[key]` for the four metadata keys allocated a copy
   and then pushed the copy into V8 dictionary mode for every SDK
   response. Filter on build instead -- only copy the keys we want.
   Bench (typical 4-of-8-keys SNS/SQS response shape):

   - spread + delete : 4.7 Mops/s
   - filter on build : 11.0 Mops/s (+2.35x)

`sns.js`'s `delete params.MessageAttributes._datadog` is left in place:
the surrounding `params` is the customer's request and the AWS SDK
serialiser walks `MessageAttributes` by `Object.keys`, so dropping our
placeholder via assignment to `undefined` would surface a stub key the
serialiser would have to render.
Three nock 13 simulation details leak into the test setup and break
under nock 14's mswjs/interceptors backend.

1. Replace plain-object `replyWithError({ code: 'ECONNRESET' })` at the
   four remaining sites with real `Error` instances. nock 14 stopped
   auto-promoting these into `Error`s, so the request never sees a
   retriable failure and the test hangs.

2. UDS / windows-pipe parse tests assert directly on `options.socketPath`
   via a `http.request` spy. That is the contract `parseUrl()` owes the
   caller for `unix:` URLs.

3. `defaults the request timeout to 2 seconds` switches to a `http.request`
   spy. mswjs creates a `ClientRequest` subclass whose own setTimeout
   swallows the abort path, so a real-timer test cannot fire here; live
   timeout coverage stays in `should have a configurable timeout`.

Refs: #8280
* perf(appsec): defer WAF Set clone and reuse metrics object per run

`run()` paid two per-call allocations the common path threw away:

1. `new Set(this.addressesToSkip)` cloned the skip set up front, but
   the only branch that adds to it (`preventDuplicateAddresses`)
   fires for at most one address per run. Clone lazily inside that
   branch instead.
2. The 10-key `metrics` literal was rebuilt every run.
   `Reporter.reportMetrics` reads its fields synchronously without
   retaining the reference, so preallocate on the wrapper and reset
   the nine mutable fields at the top of `run()`.

`rulesVersion` / `wafVersion` keep their constructor-time values.

Bench (Node 24.13 / V8 13.6, n=1 M+ x 7 trials, drop best+worst):
  Set clone + 10-key alloc              17.44 ns/op
  lazy clone + reused metrics            4.47 ns/op   speedup: 3.90x

* perf(appsec): use shared isEmpty helper and one-walk header filter

Two per-request allocations on the AppSec hot path:

1. Replace the local `isEmptyObject` with the shared `isEmpty` helper
   from `../util`.
2. `requestHeaders = { ...req.headers }; delete requestHeaders.cookie`
   walked the keys twice and forced a hidden-class transition for the
   dropped property. A single-pass `copyHeadersOmitting` builds the
   trimmed copy in one walk; same shape applied to the `set-cookie`
   strip in `onResponseWriteHead`.

Bench (Node 24.13 / V8 13.6, n=1 M+ x 7 trials, 8-key headers):
  { ...headers }; delete .cookie       193.32 ns/op
  single-pass copyHeadersOmitting       88.59 ns/op   speedup: 2.18x

* perf(appsec): iterate metricsQueue Map directly when applying tags

`rootSpan.addTags(Object.fromEntries(metricsQueue))` materialised a
fresh plain object on every `finishRequest` call only to hand its
entries to `addTags`, which already iterates them.

Bench (Node 24.13 / V8 13.6, n=1 M+ x 7 trials, 4-entry queue):
  Object.fromEntries(map) + addTags    213.08 ns/op
  setTag per Map entry                  37.87 ns/op   speedup: 5.63x
…AMES_ENABLED on consumer and push spans (#8125)

Makes the GCP Pub/Sub pull-consumer and push-subscription spans honor DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED=true, while preserving the existing observable behavior in v0 default and explicit v1.
`Function.prototype.toString.call(target).startsWith('class')`
materializes the target's full source on every wrap, and `wrapFunction`
runs on multiple instrumentation hot paths.

Class constructors have a non-writable `prototype` descriptor; arrows /
async / method-shorthand have no own `prototype`. The `'prototype' in
target` gate skips the descriptor lookup for the no-prototype shapes;
the `in` operator returns a boolean without materialising the prototype
reference, so it's cheaper than reading `target.prototype`. The check
preserves the existing test that pins behaviour when user code overrides
`target.toString`.

Bench (Node 24.13 / V8 13.6, n=1 M+ x 7 trials, drop best+worst):
toString().startsWith                28.15 ns/op
descriptor lookup unconditional      12.99 ns/op
'prototype' in gate + descriptor     10.29 ns/op
eslint-plugin-sonarjs catches small bugs the existing linters miss.
The well-defined rules go on now; the noisier ones stay 'off' with
their current violation counts so they can be enabled in follow-ups.

A handful of fixtures opt out of specific rules via inline disable
because the flagged shape is the test's surface: `no-unused-collection`
on the OOM profiler's heap anchor and the debugger snapshot's
target-code collections; `no-all-duplicated-branches` on the EFD jest
snapshot fixtures whose retry-dependent branches the EFD spec exercises.

Two auto-fix corrections are folded in:

1. The LLMObs SDK "uses wrap correctly" integration test reaches into
   the wrap via `arguments`, not a named parameter. `no-extra-arguments`
   had cascaded the empty signature back to the entry call and dropped
   the workflow span's `inputValue`. Restore the call site and disable
   the rule on the single `workflow(input)` line.
2. `max-collection-size` debugger fixture's `eslint-disable` block
   moves inline onto `function run ()`. The auto-fix had prepended a
   3-line block at file top, shifting every subsequent line down; the
   debugger spec's hardcoded line-29 breakpoint then sat inside the
   populating for-loop instead of `return`, fired 499 times, and
   `npm run test:debugger:ci` hung on the unhandled hits.

Drive-by fix:

* Deduplicate `yarn.lock`.
* Add `@DataDog/apm-sdk-capabilities-js` ownership for
  `scripts/verify-exercised-tests.js`, matching the other
  `/scripts/...` entries in that group.
The `DatabasePlugin` base class supports a `truncate` option via its
`maybeTruncate()` method, but this was missing from the TypeScript
definitions. This adds a `DatabaseInstrumentation` interface with the
`truncate` property and updates the plugin interfaces that actually
call `maybeTruncate()` (pg and prisma) to extend it.

When `truncate` is `true`, resource names are capped at 5000 characters
(matching the Datadog agent default). A numeric value overrides the
limit. This prevents large queries from blocking the event loop during
synchronous trace encoding.

Co-authored-by: Tom Quist <tomquist@users.noreply.github.com>
…edding & retrieval input and output (#8299)

* user processor supports span kind, scrubbing embedding and retrieval IO

* merge span trace parent tags with own tags for user span processor, but not actual span

* remove parent tags
@dd-octo-sts dd-octo-sts Bot mentioned this pull request May 7, 2026
@github-actions

github-actions Bot commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 5.78 MB
Deduped: 6.63 MB
No deduping: 6.63 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

sabrenner
sabrenner previously approved these changes May 7, 2026
@sabrenner
sabrenner marked this pull request as ready for review May 7, 2026 19:07
@sabrenner
sabrenner requested review from a team as code owners May 7, 2026 19:07
BridgeAR added 8 commits May 8, 2026 11:03
…8333)

* build(types): add index.d.v5.ts snapshot and v5-release swap script

Master's `index.d.ts` is the v6 type surface from this PR forward; the new `index.d.v5.ts` is a frozen byte-copy of the current (v5) surface that the v5 release line publishes via `scripts/release/swap-v5-types.js`. The swap runs from `scripts/release/proposal.js` only when `releaseLine === '5'` and lands as a separate commit so the version-bump commit stays single-purpose. Public TypeScript declarations now go in both files unless the API is v6-only -- captured in AGENTS.md alongside the existing version-check guidance.

* build(types): move v5 swap to prepack and drop test/workflow scaffolding

The swap should affect the published v5 tarball and nothing else: not the
git history of v5.x, not the proposal PR, not master CI. Wiring it through
scripts/release/proposal.js made it a committed change on the proposal
branch, which would conflict on the next cherry-pick. prepack runs the
swap at npm pack / npm publish time only, on a working tree that gets
discarded after publish.

The standalone test and its dedicated CI workflow are gone -- the only
observable contract is "did npm publish ship the v5 typings", which the
published tarball already verifies.
Same shape change applied to instrumentation files starting `[m-z]*`.
* refactor(prefer-rest-params): convert instrumentations d-l

Same shape change applied to instrumentation files starting `[d-l]*`.

* fix(instrumentations/lodash): keep `arguments` on the channel message

The `prefer-rest-params` rewrite renamed the published property from
`arguments` to `args`. The IAST taint-tracking handler reads
`message.arguments` to forward call args to `TaintedUtils`, so taint
propagation broke for every instrumented lodash op and `AppSec /
lodash` failed.
Same shape change as the previous PR — `function () { … arguments … }`
becomes `function (...args)` — applied to instrumentation files
starting `[a-c]*`. Microbench in the previous commit confirmed the two
shapes are equivalent on the shimmer hot path; this batch keeps each
PR under the 400-line review budget.
…8353)

Replaces `function () { … arguments … }` with `function (...args)` in
benchmarks, tests, plugins, and `dd-trace/src` modules outside the
instrumentation hot path. Microbench on the canonical shimmer
forwarding shape (`fn.apply(this, arguments)` vs `fn.apply(this, args)`)
on Node 24.13.0 / V8 13.6 over 7 trials of 5 M iterations each (drop
best+worst): arguments 5.87 ns/call, ...args 5.95 ns/call — 0.08 ns
delta is inside the 0.2-0.7 ns trial-to-trial noise, so the modern
syntax does not cost meaningful perf in modern V8 even on the
instrumentation hot path.

The instrumentation files (`packages/datadog-instrumentations/src/*`)
ship in follow-up PRs to keep each diff under the 400-line review
budget. The eslint rule stays off until all 928 hits are migrated;
final activation lands when the last file is done.
The remaining hits are CLI scripts, driver/harness fixtures, and
debugger target apps where the shebang lets the file run as
`./script.js` and `process.exit` is the expected termination signal.
The path-glob overrides keep the rules off for those layers so they
still challenge accidental shebangs / bare `process.exit` in library
code.
Moves test cleanup before `done()` (no-code-after-done), splits
nested-loop counters in the IAST handler / debugger snapshot pruner /
llmobs unicode encoder out of the outer index (updated-loop-counter),
and disables `stable-tests` for the CI-visibility retry fixtures whose
`this.retries(N)` is the contract under test. The remaining genuine
retries (Playwright chromium, profiler timing, AWS SDK serverless,
naming-schema agent flush) keep targeted disables with the actual
flake source spelled out.
Activates `sonarjs/no-identical-functions`. Test fixtures whose bodies
close over per-`it` state (http2 inline `app` handlers, per-test
event/chunk buffers) keep targeted `eslint-disable` lines — the
duplication is what makes each test self-contained — so the rule still
catches new duplicates outside that pattern.
@dd-octo-sts
dd-octo-sts Bot force-pushed the v5.102.0-proposal branch from 30f7251 to e5d97b0 Compare May 8, 2026 11:03
BridgeAR
BridgeAR previously approved these changes May 8, 2026
@BridgeAR
BridgeAR dismissed their stale review May 8, 2026 11:29

Still missing one PR landing

watson added a commit that referenced this pull request May 8, 2026
…p functions JSON (#8358)

* fix(aws-sdk): inject step functions context for whitespace-suffixed JSON

The cheap shape gate added in #8231 rejects payloads serialized with
trailing whitespace (`'{"a":1}\n'`), so a caller that pretty-prints
the JSON loses distributed-tracing propagation through `startExecution`
/ `startSyncExecution`.

Trim trailing whitespace before the brace check; whitespace-suffixed
payloads now fall through to the slow path inside
`injectFieldIntoJsonObject`. `String.prototype.trimEnd` returns the
input unchanged when no whitespace is present, so the common path
allocates nothing.

Refs: #8231
Refs: #8339

* fix(encode): skip native span events with a non-string name

`Span.addEvent` and the OTel bridge accept any value for `name` without
type-checking it; the typed-wrapper encoder added in #8233 then routes
`event.name` straight into `Buffer.byteLength` on the first cache miss,
which throws on `null` / `Symbol(...)` and aborts the entire trace
export. The legacy stringifier already defers non-string names to
`JSON.stringify`; the native path lacked the equivalent guard.

Drop offending events from the native path so the rest of the trace
still exports.

Refs: #8233
Refs: #8339

* Apply suggestions from code review

Co-authored-by: Thomas Watson <w@tson.dk>

---------

Co-authored-by: Thomas Watson <w@tson.dk>
BridgeAR and others added 5 commits May 8, 2026 11:51
…eInt (#8306)

`Number.parseInt(end - start)` forces a `String(bigint)` round-trip
through decimal stringify and re-parse before scaling by 1e3 — a slower
path than the direct BigInt-to-Number coercion the code intended. No
observable behaviour change in the normal value range.

Bench (Node 24.13 / V8 13.6, n=1 M+ x 7 trials, drop best+worst):
  Number.parseInt(bigint)               32.57 ns/op
  Number(bigint)                        10.21 ns/op   speedup: 3.19x
Co-authored-by: gh-worker-campaigns-3e9aa4[bot] <244854796+gh-worker-campaigns-3e9aa4[bot]@users.noreply.github.com>
…p functions JSON (#8358)

* fix(aws-sdk): inject step functions context for whitespace-suffixed JSON

The cheap shape gate added in #8231 rejects payloads serialized with
trailing whitespace (`'{"a":1}\n'`), so a caller that pretty-prints
the JSON loses distributed-tracing propagation through `startExecution`
/ `startSyncExecution`.

Trim trailing whitespace before the brace check; whitespace-suffixed
payloads now fall through to the slow path inside
`injectFieldIntoJsonObject`. `String.prototype.trimEnd` returns the
input unchanged when no whitespace is present, so the common path
allocates nothing.

Refs: #8231
Refs: #8339

* fix(encode): skip native span events with a non-string name

`Span.addEvent` and the OTel bridge accept any value for `name` without
type-checking it; the typed-wrapper encoder added in #8233 then routes
`event.name` straight into `Buffer.byteLength` on the first cache miss,
which throws on `null` / `Symbol(...)` and aborts the entire trace
export. The legacy stringifier already defers non-string names to
`JSON.stringify`; the native path lacked the equivalent guard.

Drop offending events from the native path so the rest of the trace
still exports.

Refs: #8233
Refs: #8339

* Apply suggestions from code review

Co-authored-by: Thomas Watson <w@tson.dk>

---------

Co-authored-by: Thomas Watson <w@tson.dk>
@dd-octo-sts
dd-octo-sts Bot force-pushed the v5.102.0-proposal branch from e5d97b0 to c13bae4 Compare May 8, 2026 11:51
@pr-commenter

pr-commenter Bot commented May 8, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-08 12:08:08

Comparing candidate commit c13bae4 in PR branch v5.102.0-proposal with baseline commit 2daa69c in branch v5.x.

Found 127 performance improvements and 74 performance regressions! Performance is the same for 1543 metrics, 100 unstable metrics.

scenario:encoders-0.4-18

  • 🟩 cpu_user_time [-356.191ms; -338.295ms] or [-39.987%; -37.978%]
  • 🟩 execution_time [-359.389ms; -349.577ms] or [-28.403%; -27.628%]
  • 🟩 instructions [-3.2G instructions; -3.2G instructions] or [-45.819%; -45.523%]

scenario:encoders-0.4-20

  • 🟩 cpu_user_time [-327.576ms; -303.031ms] or [-43.668%; -40.396%]
  • 🟩 execution_time [-328.785ms; -318.807ms] or [-29.229%; -28.342%]
  • 🟩 instructions [-2.8G instructions; -2.8G instructions] or [-49.320%; -48.930%]

scenario:encoders-0.4-22

  • 🟩 cpu_user_time [-289.091ms; -273.309ms] or [-42.389%; -40.074%]
  • 🟩 execution_time [-282.108ms; -275.737ms] or [-26.795%; -26.190%]
  • 🟩 instructions [-2.4G instructions; -2.4G instructions] or [-47.687%; -47.299%]

scenario:encoders-0.4-24

  • 🟩 cpu_user_time [-270.090ms; -244.917ms] or [-40.995%; -37.174%]
  • 🟩 execution_time [-263.776ms; -239.418ms] or [-25.550%; -23.191%]
  • 🟩 instructions [-2.5G instructions; -2.4G instructions] or [-49.535%; -49.071%]

scenario:encoders-0.4-events-legacy-18

  • 🟩 cpu_user_time [-378.243ms; -337.380ms] or [-16.844%; -15.025%]
  • 🟩 execution_time [-368.865ms; -354.019ms] or [-9.412%; -9.033%]
  • 🟩 instructions [-3.6G instructions; -3.6G instructions] or [-22.605%; -22.387%]

scenario:encoders-0.4-events-legacy-20

  • 🟩 cpu_user_time [-366.712ms; -323.584ms] or [-17.326%; -15.289%]
  • 🟩 execution_time [-366.029ms; -350.022ms] or [-9.651%; -9.229%]
  • 🟩 instructions [-3.4G instructions; -3.4G instructions] or [-23.481%; -23.245%]

scenario:encoders-0.4-events-legacy-22

  • 🟩 cpu_user_time [-153.033ms; -121.363ms] or [-8.312%; -6.592%]
  • 🟩 instructions [-1.4G instructions; -1.3G instructions] or [-11.282%; -10.957%]

scenario:encoders-0.4-events-legacy-24

  • 🟩 cpu_user_time [-150.284ms; -107.723ms] or [-8.172%; -5.857%]
  • 🟩 instructions [-1.6G instructions; -1.5G instructions] or [-12.727%; -12.426%]

scenario:encoders-0.4-events-native-18

  • 🟩 cpu_user_time [-3.681s; -3.585s] or [-58.548%; -57.020%]
  • 🟩 execution_time [-5.482s; -5.368s] or [-47.139%; -46.156%]
  • 🟩 instructions [-29.1G instructions; -28.8G instructions] or [-61.972%; -61.175%]
  • 🟩 max_rss_usage [-101.451MB; -100.045MB] or [-20.071%; -19.793%]

scenario:encoders-0.4-events-native-20

  • 🟩 cpu_user_time [-3.269s; -3.191s] or [-59.643%; -58.215%]
  • 🟩 execution_time [-5.045s; -4.924s] or [-47.081%; -45.950%]
  • 🟩 instructions [-26.3G instructions; -25.9G instructions] or [-64.917%; -64.012%]
  • 🟩 max_rss_usage [-104.961MB; -103.876MB] or [-20.721%; -20.507%]

scenario:encoders-0.4-events-native-22

  • 🟩 cpu_user_time [-2.963s; -2.879s] or [-58.467%; -56.814%]
  • 🟩 execution_time [-4.716s; -4.579s] or [-45.995%; -44.658%]
  • 🟩 instructions [-23.9G instructions; -23.8G instructions] or [-64.189%; -63.794%]
  • 🟩 max_rss_usage [-103.101MB; -101.484MB] or [-19.952%; -19.639%]

scenario:encoders-0.4-events-native-24

  • 🟩 cpu_user_time [-2.936s; -2.862s] or [-58.353%; -56.866%]
  • 🟩 execution_time [-4.720s; -4.599s] or [-45.836%; -44.662%]
  • 🟩 instructions [-24.2G instructions; -24.1G instructions] or [-64.761%; -64.319%]
  • 🟩 max_rss_usage [-105.716MB; -103.442MB] or [-20.370%; -19.932%]

scenario:encoders-0.5-18

  • 🟩 cpu_user_time [-62.893ms; -51.715ms] or [-16.478%; -13.550%]
  • 🟩 execution_time [-63.214ms; -55.788ms] or [-13.404%; -11.829%]
  • 🟩 instructions [-487.5M instructions; -459.5M instructions] or [-18.522%; -17.458%]
  • 🟩 max_rss_usage [-19.175MB; -11.581MB] or [-13.959%; -8.430%]

scenario:encoders-0.5-20

  • 🟩 cpu_user_time [-58.888ms; -43.843ms] or [-19.052%; -14.184%]
  • 🟩 execution_time [-58.462ms; -49.231ms] or [-14.826%; -12.485%]
  • 🟩 instructions [-485.2M instructions; -451.4M instructions] or [-23.894%; -22.230%]
  • 🟩 max_rss_usage [-18.409MB; -10.830MB] or [-13.777%; -8.105%]

scenario:encoders-0.5-22

  • 🟩 cpu_user_time [-57.778ms; -45.737ms] or [-18.948%; -14.999%]
  • 🟩 execution_time [-59.063ms; -50.276ms] or [-14.817%; -12.612%]
  • 🟩 instructions [-479.6M instructions; -442.8M instructions] or [-23.891%; -22.056%]
  • 🟩 max_rss_usage [-25.626MB; -21.181MB] or [-17.444%; -14.419%]

scenario:encoders-0.5-24

  • 🟩 cpu_user_time [-67.123ms; -56.597ms] or [-24.770%; -20.886%]
  • 🟩 execution_time [-64.754ms; -55.989ms] or [-17.846%; -15.431%]
  • 🟩 instructions [-492.7M instructions; -470.7M instructions] or [-26.208%; -25.040%]
  • 🟩 max_rss_usage [-25.986MB; -16.880MB] or [-17.413%; -11.311%]

scenario:encoders-0.5-events-legacy-18

  • 🟩 instructions [-650.5M instructions; -626.1M instructions] or [-7.923%; -7.626%]
  • 🟩 max_rss_usage [-19.081MB; -12.683MB] or [-11.777%; -7.828%]

scenario:encoders-0.5-events-legacy-20

  • 🟩 instructions [-855.8M instructions; -827.3M instructions] or [-11.352%; -10.974%]
  • 🟩 max_rss_usage [-24.632MB; -14.236MB] or [-15.283%; -8.833%]

scenario:encoders-0.5-events-legacy-22

  • 🟥 cpu_user_time [+108.131ms; +121.135ms] or [+12.712%; +14.240%]
  • 🟥 execution_time [+119.820ms; +126.715ms] or [+12.527%; +13.248%]
  • 🟥 instructions [+712.4M instructions; +735.2M instructions] or [+11.837%; +12.216%]
  • 🟩 max_rss_usage [-35.778MB; -33.129MB] or [-21.013%; -19.457%]

scenario:encoders-0.5-events-legacy-24

  • 🟥 cpu_user_time [+66.768ms; +92.675ms] or [+7.968%; +11.060%]
  • 🟥 execution_time [+74.054ms; +98.144ms] or [+7.814%; +10.356%]
  • 🟥 instructions [+571.9M instructions; +623.2M instructions] or [+9.608%; +10.469%]
  • 🟩 max_rss_usage [-38.575MB; -35.267MB] or [-22.228%; -20.322%]

scenario:plugin-aws-sdk-eventbridge-inject-detail-18

  • 🟩 cpu_user_time [-2.535s; -2.487s] or [-52.969%; -51.969%]
  • 🟩 execution_time [-2.537s; -2.490s] or [-52.595%; -51.614%]
  • 🟩 instructions [-24.2G instructions; -24.1G instructions] or [-54.055%; -53.937%]

scenario:plugin-aws-sdk-eventbridge-inject-detail-20

  • 🟩 cpu_user_time [-2.586s; -2.561s] or [-52.720%; -52.211%]
  • 🟩 execution_time [-2.586s; -2.560s] or [-52.526%; -52.001%]
  • 🟩 instructions [-24.2G instructions; -24.1G instructions] or [-53.680%; -53.356%]

scenario:plugin-aws-sdk-eventbridge-inject-detail-22

  • 🟩 cpu_user_time [-1.878s; -1.858s] or [-55.967%; -55.354%]
  • 🟩 execution_time [-1.878s; -1.857s] or [-55.626%; -55.002%]
  • 🟩 instructions [-18.3G instructions; -18.3G instructions] or [-55.820%; -55.657%]

scenario:plugin-aws-sdk-eventbridge-inject-detail-24

  • 🟩 cpu_user_time [-1.981s; -1.873s] or [-54.658%; -51.691%]
  • 🟩 execution_time [-1.981s; -1.874s] or [-54.331%; -51.393%]
  • 🟩 instructions [-17.5G instructions; -17.5G instructions] or [-53.545%; -53.414%]

scenario:plugin-aws-sdk-extract-response-body-18

  • 🟩 cpu_user_time [-2.589s; -2.571s] or [-80.404%; -79.830%]
  • 🟩 execution_time [-2.602s; -2.585s] or [-79.897%; -79.390%]
  • 🟩 instructions [-23.7G instructions; -23.5G instructions] or [-78.327%; -77.687%]

scenario:plugin-aws-sdk-extract-response-body-20

  • 🟩 cpu_user_time [-2.323s; -2.305s] or [-81.669%; -81.009%]
  • 🟩 execution_time [-2.324s; -2.305s] or [-81.203%; -80.516%]
  • 🟩 instructions [-22.3G instructions; -22.2G instructions] or [-78.995%; -78.536%]

scenario:plugin-aws-sdk-extract-response-body-22

  • 🟩 cpu_user_time [-2.273s; -2.239s] or [-83.734%; -82.479%]
  • 🟩 execution_time [-2.272s; -2.237s] or [-83.126%; -81.849%]
  • 🟩 instructions [-21.9G instructions; -21.8G instructions] or [-80.783%; -80.428%]

scenario:plugin-aws-sdk-extract-response-body-24

  • 🟩 cpu_user_time [-1.819s; -1.774s] or [-81.520%; -79.504%]
  • 🟩 execution_time [-1.819s; -1.773s] or [-80.749%; -78.726%]
  • 🟩 instructions [-16.5G instructions; -16.3G instructions] or [-76.005%; -75.374%]

scenario:plugin-aws-sdk-lambda-inject-no-context-18

  • 🟩 instructions [-2.3G instructions; -2.3G instructions] or [-8.379%; -8.351%]

scenario:plugin-aws-sdk-lambda-inject-no-context-20

  • 🟩 cpu_user_time [-283.823ms; -248.890ms] or [-10.422%; -9.139%]
  • 🟩 execution_time [-284.971ms; -252.247ms] or [-10.319%; -9.134%]
  • 🟩 instructions [-2.6G instructions; -2.6G instructions] or [-10.834%; -10.806%]

scenario:plugin-graphql-long-control-18

  • 🟥 cpu_user_time [+464.095ms; +525.307ms] or [+35.184%; +39.825%]
  • 🟥 execution_time [+520.783ms; +569.503ms] or [+34.534%; +37.764%]
  • 🟥 max_rss_usage [+82.500MB; +86.400MB] or [+23.740%; +24.862%]

scenario:plugin-graphql-long-control-20

  • 🟥 cpu_user_time [+453.697ms; +504.118ms] or [+34.400%; +38.223%]
  • 🟥 execution_time [+523.931ms; +561.535ms] or [+35.081%; +37.599%]
  • 🟥 max_rss_usage [+78.541MB; +86.142MB] or [+22.680%; +24.875%]

scenario:plugin-graphql-long-control-22

  • 🟥 cpu_user_time [+524.601ms; +571.992ms] or [+42.183%; +45.993%]
  • 🟥 execution_time [+553.888ms; +605.916ms] or [+38.716%; +42.353%]
  • 🟥 max_rss_usage [+80.411MB; +84.824MB] or [+22.714%; +23.960%]

scenario:plugin-graphql-long-control-24

  • 🟥 cpu_user_time [+427.892ms; +514.086ms] or [+37.103%; +44.576%]
  • 🟥 execution_time [+476.706ms; +566.275ms] or [+35.082%; +41.674%]
  • 🟥 max_rss_usage [+86.779MB; +93.109MB] or [+20.849%; +22.370%]

scenario:plugin-graphql-long-with-async-hooks-18

  • 🟥 cpu_user_time [+0.999s; +1.142s] or [+55.615%; +63.601%]
  • 🟥 execution_time [+1.067s; +1.186s] or [+52.543%; +58.385%]
  • 🟥 max_rss_usage [+69.042MB; +86.580MB] or [+14.999%; +18.809%]

scenario:plugin-graphql-long-with-async-hooks-20

  • 🟥 cpu_user_time [+1.075s; +1.170s] or [+62.432%; +67.941%]
  • 🟥 execution_time [+1.114s; +1.186s] or [+56.024%; +59.667%]
  • 🟥 max_rss_usage [+55.516MB; +78.857MB] or [+12.106%; +17.196%]

scenario:plugin-graphql-long-with-async-hooks-22

  • 🟥 cpu_user_time [+514.992ms; +546.026ms] or [+29.462%; +31.237%]
  • 🟥 execution_time [+565.923ms; +599.664ms] or [+28.567%; +30.270%]
  • 🟥 max_rss_usage [+90.525MB; +99.173MB] or [+19.415%; +21.269%]
  • 🟩 instructions [-746.3M instructions; -360.9M instructions] or [-13.448%; -6.503%]

scenario:plugin-graphql-long-with-async-hooks-24

  • 🟥 cpu_user_time [+382.270ms; +430.040ms] or [+23.826%; +26.804%]
  • 🟥 execution_time [+453.628ms; +483.338ms] or [+24.357%; +25.952%]
  • 🟥 max_rss_usage [+111.133MB; +123.704MB] or [+22.026%; +24.517%]

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

  • 🟩 instructions [-3.0G instructions; -2.1G instructions] or [-11.554%; -8.239%]

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

  • 🟩 instructions [-2.6G instructions; -2.1G instructions] or [-11.594%; -9.115%]

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

  • 🟥 max_rss_usage [+76.629MB; +80.310MB] or [+8.508%; +8.916%]
  • 🟩 instructions [-2.0G instructions; -1.3G instructions] or [-9.412%; -6.230%]

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

  • 🟥 max_rss_usage [+154.025MB; +178.947MB] or [+19.862%; +23.076%]
  • 🟩 instructions [-4.1G instructions; -2.9G instructions] or [-20.595%; -14.801%]

scenario:plugin-graphql-long-with-depth-and-collapse-on-18

  • 🟥 cpu_user_time [+597.217ms; +780.720ms] or [+17.841%; +23.323%]
  • 🟥 execution_time [+650.930ms; +847.724ms] or [+17.468%; +22.749%]
  • 🟥 instructions [+697.1M instructions; +1146.8M instructions] or [+6.551%; +10.777%]
  • 🟥 max_rss_usage [+93.053MB; +97.254MB] or [+14.650%; +15.311%]

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

  • 🟥 cpu_user_time [+551.896ms; +794.644ms] or [+17.064%; +24.569%]
  • 🟥 execution_time [+626.970ms; +853.793ms] or [+17.418%; +23.719%]
  • 🟥 instructions [+572.9M instructions; +1112.9M instructions] or [+5.638%; +10.952%]
  • 🟥 max_rss_usage [+96.470MB; +98.978MB] or [+15.237%; +15.633%]

scenario:plugin-graphql-long-with-depth-and-collapse-on-22

  • 🟥 cpu_user_time [+706.633ms; +828.699ms] or [+22.301%; +26.153%]
  • 🟥 execution_time [+740.290ms; +856.237ms] or [+20.809%; +24.069%]
  • 🟥 instructions [+786.8M instructions; +993.1M instructions] or [+7.849%; +9.907%]
  • 🟥 max_rss_usage [+90.427MB; +96.324MB] or [+14.025%; +14.939%]

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

  • 🟥 execution_time [+737.092ms; +955.170ms] or [+28.833%; +37.364%]
  • 🟥 max_rss_usage [+85.401MB; +103.361MB] or [+14.861%; +17.986%]

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

  • 🟥 cpu_user_time [+684.912ms; +737.044ms] or [+28.214%; +30.361%]
  • 🟥 execution_time [+735.837ms; +777.357ms] or [+27.185%; +28.719%]
  • 🟥 max_rss_usage [+85.713MB; +88.938MB] or [+17.771%; +18.440%]

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

  • 🟥 cpu_user_time [+697.835ms; +764.157ms] or [+30.028%; +32.882%]
  • 🟥 execution_time [+736.105ms; +794.864ms] or [+28.035%; +30.273%]
  • 🟥 max_rss_usage [+86.430MB; +93.198MB] or [+17.997%; +19.406%]

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

  • 🟥 cpu_user_time [+659.678ms; +706.174ms] or [+28.762%; +30.789%]
  • 🟥 execution_time [+679.227ms; +717.580ms] or [+26.177%; +27.655%]
  • 🟥 instructions [+654.3M instructions; +1022.7M instructions] or [+9.183%; +14.353%]
  • 🟥 max_rss_usage [+88.317MB; +92.056MB] or [+18.013%; +18.775%]

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

  • 🟥 cpu_user_time [+407.303ms; +472.212ms] or [+29.606%; +34.324%]
  • 🟥 execution_time [+455.897ms; +520.966ms] or [+28.081%; +32.089%]
  • 🟥 max_rss_usage [+93.340MB; +101.692MB] or [+21.567%; +23.497%]

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

  • 🟥 cpu_user_time [+634.808ms; +836.343ms] or [+19.211%; +25.310%]
  • 🟥 execution_time [+694.025ms; +884.228ms] or [+18.909%; +24.091%]
  • 🟥 instructions [+771.9M instructions; +1155.0M instructions] or [+7.166%; +10.723%]
  • 🟥 max_rss_usage [+92.366MB; +97.673MB] or [+14.562%; +15.399%]

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

  • 🟥 cpu_user_time [+599.284ms; +695.226ms] or [+18.780%; +21.787%]
  • 🟥 execution_time [+667.397ms; +752.863ms] or [+18.774%; +21.178%]
  • 🟥 instructions [+751.9M instructions; +1014.8M instructions] or [+7.400%; +9.988%]
  • 🟥 max_rss_usage [+91.985MB; +96.327MB] or [+14.458%; +15.140%]

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

  • 🟥 cpu_user_time [+658.809ms; +806.103ms] or [+20.735%; +25.371%]
  • 🟥 execution_time [+715.705ms; +854.280ms] or [+20.169%; +24.074%]
  • 🟥 instructions [+0.9G instructions; +1.2G instructions] or [+8.938%; +11.706%]
  • 🟥 max_rss_usage [+86.776MB; +92.171MB] or [+13.399%; +14.232%]

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

  • 🟥 cpu_user_time [+784.243ms; +978.926ms] or [+35.046%; +43.746%]
  • 🟥 execution_time [+821.665ms; +1035.359ms] or [+32.007%; +40.331%]
  • 🟥 max_rss_usage [+84.992MB; +95.594MB] or [+14.787%; +16.632%]

scenario:shimmer-startup-arrow-wrapfn-18

  • 🟩 cpu_user_time [-18.827ms; -15.779ms] or [-13.459%; -11.280%]
  • 🟩 execution_time [-18.113ms; -17.008ms] or [-11.775%; -11.057%]
  • 🟩 instructions [-99.9M instructions; -80.3M instructions] or [-9.987%; -8.025%]

scenario:shimmer-startup-arrow-wrapfn-20

  • 🟩 cpu_user_time [-16.793ms; -13.426ms] or [-12.854%; -10.278%]
  • 🟩 execution_time [-16.699ms; -14.400ms] or [-11.707%; -10.095%]
  • 🟩 instructions [-76.3M instructions; -56.2M instructions] or [-8.165%; -6.013%]

scenario:shimmer-startup-arrow-wrapfn-22

  • 🟩 cpu_user_time [-14.059ms; -10.474ms] or [-11.826%; -8.811%]
  • 🟩 execution_time [-12.727ms; -10.208ms] or [-9.724%; -7.799%]
  • 🟩 instructions [-72.2M instructions; -47.4M instructions] or [-8.122%; -5.334%]

scenario:shimmer-startup-arrow-wrapfn-24

  • 🟩 cpu_user_time [-15.114ms; -10.810ms] or [-13.504%; -9.658%]
  • 🟩 execution_time [-12.473ms; -10.184ms] or [-10.006%; -8.169%]
  • 🟩 instructions [-71.2M instructions; -54.1M instructions] or [-8.157%; -6.196%]

scenario:shimmer-startup-asyncarrow-wrapfn-18

  • 🟩 cpu_user_time [-19.754ms; -16.004ms] or [-12.792%; -10.364%]
  • 🟩 execution_time [-18.615ms; -17.710ms] or [-11.003%; -10.468%]
  • 🟩 instructions [-98.1M instructions; -79.9M instructions] or [-8.932%; -7.274%]

scenario:shimmer-startup-asyncarrow-wrapfn-20

  • 🟩 cpu_user_time [-18.256ms; -14.113ms] or [-12.539%; -9.694%]
  • 🟩 execution_time [-18.330ms; -15.327ms] or [-11.611%; -9.709%]
  • 🟩 instructions [-75.6M instructions; -53.6M instructions] or [-7.315%; -5.188%]

scenario:shimmer-startup-asyncarrow-wrapfn-22

  • 🟩 cpu_user_time [-14.948ms; -11.394ms] or [-11.186%; -8.526%]
  • 🟩 execution_time [-14.319ms; -11.897ms] or [-9.803%; -8.145%]

scenario:shimmer-startup-asyncarrow-wrapfn-24

  • 🟩 cpu_user_time [-15.290ms; -10.165ms] or [-10.516%; -6.991%]
  • 🟩 execution_time [-15.809ms; -11.203ms] or [-9.885%; -7.005%]

scenario:shimmer-startup-asyncdeclared-wrapfn-18

  • 🟩 cpu_user_time [-20.146ms; -17.015ms] or [-13.020%; -10.997%]
  • 🟩 execution_time [-19.259ms; -17.635ms] or [-11.438%; -10.474%]
  • 🟩 instructions [-90.7M instructions; -85.8M instructions] or [-8.222%; -7.787%]

scenario:shimmer-startup-asyncdeclared-wrapfn-20

  • 🟩 cpu_user_time [-19.215ms; -14.253ms] or [-13.225%; -9.810%]
  • 🟩 execution_time [-17.949ms; -14.914ms] or [-11.439%; -9.504%]
  • 🟩 instructions [-63.8M instructions; -57.4M instructions] or [-6.160%; -5.539%]

scenario:shimmer-startup-asyncdeclared-wrapfn-22

  • 🟩 cpu_user_time [-13.429ms; -9.689ms] or [-10.103%; -7.289%]
  • 🟩 execution_time [-13.788ms; -11.090ms] or [-9.501%; -7.642%]
  • 🟩 instructions [-60.9M instructions; -54.6M instructions] or [-6.053%; -5.426%]

scenario:shimmer-startup-asyncdeclared-wrapfn-24

  • 🟩 cpu_user_time [-17.176ms; -12.467ms] or [-11.780%; -8.551%]
  • 🟩 execution_time [-17.543ms; -13.472ms] or [-10.978%; -8.431%]
  • 🟩 instructions [-64.4M instructions; -57.6M instructions] or [-5.898%; -5.269%]

@BridgeAR
BridgeAR enabled auto-merge (rebase) May 8, 2026 12:54
@BridgeAR
BridgeAR merged commit e36a8a6 into v5.x May 8, 2026
899 checks passed
@BridgeAR
BridgeAR deleted the v5.102.0-proposal branch May 8, 2026 12:55
BridgeAR added a commit that referenced this pull request May 8, 2026
…p functions JSON (#8358)

* fix(aws-sdk): inject step functions context for whitespace-suffixed JSON

The cheap shape gate added in #8231 rejects payloads serialized with
trailing whitespace (`'{"a":1}\n'`), so a caller that pretty-prints
the JSON loses distributed-tracing propagation through `startExecution`
/ `startSyncExecution`.

Trim trailing whitespace before the brace check; whitespace-suffixed
payloads now fall through to the slow path inside
`injectFieldIntoJsonObject`. `String.prototype.trimEnd` returns the
input unchanged when no whitespace is present, so the common path
allocates nothing.

Refs: #8231
Refs: #8339

* fix(encode): skip native span events with a non-string name

`Span.addEvent` and the OTel bridge accept any value for `name` without
type-checking it; the typed-wrapper encoder added in #8233 then routes
`event.name` straight into `Buffer.byteLength` on the first cache miss,
which throws on `null` / `Symbol(...)` and aborts the entire trace
export. The legacy stringifier already defers non-string names to
`JSON.stringify`; the native path lacked the equivalent guard.

Drop offending events from the native path so the rest of the trace
still exports.

Refs: #8233
Refs: #8339

* Apply suggestions from code review

Co-authored-by: Thomas Watson <w@tson.dk>

---------

Co-authored-by: Thomas Watson <w@tson.dk>
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.

10 participants