Skip to content

fix(fetch): rename globalThis.fetch wrapper from "value" to "fetch"#8406

Merged
pabloerhard merged 1 commit into
masterfrom
BridgeAR/2026-05-11-fetch-name-rename
May 11, 2026
Merged

fix(fetch): rename globalThis.fetch wrapper from "value" to "fetch"#8406
pabloerhard merged 1 commit into
masterfrom
BridgeAR/2026-05-11-fetch-name-rename

Conversation

@BridgeAR
Copy link
Copy Markdown
Member

Summary

globalThis.fetch's wrapper carries the name value, so every stack frame that flows through fetch surfaces as at value instead of at fetch. Rename the wrapper -- and the inner let fetch slot it forwards to, since the named function expression's name shadows the outer binding and would self-recurse otherwise -- so frames blend with bundled-undici fetch.

Test plan

  • New packages/datadog-instrumentations/test/fetch.spec.js pins globalThis.fetch.name === 'fetch' after the instrumentation loads and that the wrapper forwards calls without self-recursion:

    ./node_modules/.bin/mocha packages/datadog-instrumentations/test/fetch.spec.js
    
  • nyc on the file reports 87.5% line / statement coverage. The uncovered region is the pre-existing serverless-only stub path (lines 9-11); the rename on those lines is identity-preserving.

Refs: nodejs/undici#2701

`globalThis.fetch`'s wrapper carries the name `value`, so every stack
frame that flows through fetch surfaces as `at value` instead of
`at fetch`. Renaming the wrapper makes frames blend with bundled-undici
fetch.

The diff also renames the inner `let fetch` slot. A named function
expression `function fetch (...)` binds `fetch` to itself inside its
body; without the slot rename the wrapper calls itself and
stack-overflows on first invocation.

Retiring the wrap is blocked on upstream undici PR #2701: bundled
undici in Node 18+ exposes only `undici:request:*` channels, and the
existing undici plugin already subscribes to those.

Architecture review (baseline -> proposal, 1-10):

1. Drift prevention            7 -> 7
2. Coupling at module boundary 8 -> 8
3. Explicit contracts          7 -> 7
4. Testability at boundaries   5 -> 8 (spec pins the name and the
                                         recursion-safety invariant)
5. Extensibility               7 -> 7
6. Hot-path fitness            8 -> 8

Refs: nodejs/undici#2701
@github-actions
Copy link
Copy Markdown
Contributor

Overall package size

Self size: 5.81 MB
Deduped: 6.65 MB
No deduping: 6.65 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.11 | 25.74 kB | 25.74 kB |

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 10, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.96%. Comparing base (807fceb) to head (e1e6c3c).

Files with missing lines Patch % Lines
packages/datadog-instrumentations/src/fetch.js 80.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8406   +/-   ##
=======================================
  Coverage   89.96%   89.96%           
=======================================
  Files         836      836           
  Lines       44867    44867           
  Branches     8320     8320           
=======================================
  Hits        40366    40366           
  Misses       4501     4501           
Flag Coverage Δ
aiguard-integration-active 40.55% <80.00%> (ø)
aiguard-integration-latest 40.50% <80.00%> (ø)
aiguard-integration-maintenance 40.55% <80.00%> (ø)
aiguard-macos 35.23% <60.00%> (-0.09%) ⬇️
aiguard-ubuntu 35.33% <60.00%> (-0.09%) ⬇️
aiguard-windows 35.14% <60.00%> (-0.09%) ⬇️
apm-capabilities-tracing-macos 49.04% <60.00%> (ø)
apm-capabilities-tracing-ubuntu-active 49.06% <60.00%> (ø)
apm-capabilities-tracing-ubuntu-latest 49.03% <60.00%> (ø)
apm-capabilities-tracing-ubuntu-maintenance 49.06% <60.00%> (-0.19%) ⬇️
apm-capabilities-tracing-ubuntu-oldest 49.05% <60.00%> (-0.19%) ⬇️
apm-capabilities-tracing-windows 49.03% <60.00%> (-0.02%) ⬇️
apm-integrations-aerospike-18-gte.5.2.0 34.27% <60.00%> (-0.09%) ⬇️
apm-integrations-aerospike-20-gte.5.5.0 34.28% <60.00%> (-0.09%) ⬇️
apm-integrations-aerospike-22-gte.5.12.1 34.28% <60.00%> (-0.09%) ⬇️
apm-integrations-aerospike-22-gte.6.0.0 34.28% <60.00%> (-0.09%) ⬇️
apm-integrations-aerospike-eol- 34.19% <0.00%> (-0.09%) ⬇️
apm-integrations-child-process 35.25% <60.00%> (-0.09%) ⬇️
apm-integrations-confluentinc-kafka-javascript-18 41.09% <60.00%> (-0.09%) ⬇️
apm-integrations-confluentinc-kafka-javascript-20 41.11% <60.00%> (-0.09%) ⬇️
apm-integrations-confluentinc-kafka-javascript-22 41.11% <60.00%> (-0.09%) ⬇️
apm-integrations-confluentinc-kafka-javascript-24 41.04% <60.00%> (-0.09%) ⬇️
apm-integrations-couchbase-18 34.59% <60.00%> (-0.17%) ⬇️
apm-integrations-couchbase-eol 34.48% <0.00%> (-0.31%) ⬇️
apm-integrations-dns 34.13% <60.00%> (-0.09%) ⬇️
apm-integrations-elasticsearch 34.93% <60.00%> (-0.08%) ⬇️
apm-integrations-http-latest 42.08% <60.00%> (-0.08%) ⬇️
apm-integrations-http-maintenance 42.14% <60.00%> (-0.08%) ⬇️
apm-integrations-http-oldest 42.14% <60.00%> (-0.08%) ⬇️
apm-integrations-http2 39.45% <60.00%> (-0.09%) ⬇️
apm-integrations-kafkajs-latest 40.98% <60.00%> (-0.09%) ⬇️
apm-integrations-kafkajs-oldest 41.03% <60.00%> (-0.09%) ⬇️
apm-integrations-net 34.82% <60.00%> (-0.09%) ⬇️
apm-integrations-next-11.1.4 29.06% <60.00%> (-0.06%) ⬇️
apm-integrations-next-13.2.0 30.72% <60.00%> (-0.08%) ⬇️
apm-integrations-next-gte.10.2.0.and.lt.11 22.99% <ø> (ø)
apm-integrations-next-gte.11.0.0.and.lt.13 30.73% <60.00%> (-0.08%) ⬇️
apm-integrations-next-gte.13.0.0.and.lt.14 30.97% <60.00%> (-0.08%) ⬇️
apm-integrations-next-gte.14.0.0.and.lte.14.2.6 30.79% <60.00%> (-0.11%) ⬇️
apm-integrations-next-gte.14.2.7.and.lt.15 30.79% <60.00%> (-0.08%) ⬇️
apm-integrations-next-gte.15.0.0 30.86% <60.00%> (-0.08%) ⬇️
apm-integrations-oracledb 34.57% <0.00%> (-0.09%) ⬇️
apm-integrations-prisma-18-gte.6.16.0.and.lt.7.0.0 34.95% <60.00%> (-0.08%) ⬇️
apm-integrations-prisma-latest-all 35.36% <60.00%> (-0.08%) ⬇️
apm-integrations-restify 36.40% <60.00%> (-0.01%) ⬇️
apm-integrations-sharedb 33.81% <60.00%> (-0.09%) ⬇️
apm-integrations-tedious 34.37% <60.00%> (-0.09%) ⬇️
appsec-express 51.90% <60.00%> (-0.07%) ⬇️
appsec-fastify 48.62% <60.00%> (-0.07%) ⬇️
appsec-graphql 48.90% <60.00%> (-0.07%) ⬇️
appsec-integration-active 36.91% <60.00%> (ø)
appsec-integration-latest 36.88% <60.00%> (ø)
appsec-integration-maintenance 36.90% <60.00%> (ø)
appsec-integration-oldest 36.90% <60.00%> (ø)
appsec-kafka 41.44% <60.00%> (-0.03%) ⬇️
appsec-ldapjs 40.65% <60.00%> (-0.07%) ⬇️
appsec-lodash 40.76% <60.00%> (-0.07%) ⬇️
appsec-macos 55.75% <60.00%> (-0.06%) ⬇️
appsec-mongodb-core 45.09% <60.00%> (-0.07%) ⬇️
appsec-mongoose 45.95% <60.00%> (-0.07%) ⬇️
appsec-mysql 47.99% <60.00%> (-0.02%) ⬇️
appsec-next-latest-11.1.4 29.15% <60.00%> (-0.08%) ⬇️
appsec-next-latest-13.2.0 30.86% <60.00%> (-0.09%) ⬇️
appsec-next-latest-gte.10.2.0.and.lt.11 28.66% <ø> (ø)
appsec-next-latest-gte.11.0.0.and.lt.13 30.84% <60.00%> (-0.09%) ⬇️
appsec-next-latest-gte.13.0.0.and.lt.14 31.09% <60.00%> (-0.09%) ⬇️
appsec-next-latest-gte.14.0.0.and.lte.14.2.6 30.93% <60.00%> (-0.09%) ⬇️
appsec-next-latest-gte.14.2.7.and.lt.15 30.93% <60.00%> (-0.09%) ⬇️
appsec-next-latest-gte.15.0.0 30.93% <60.00%> (-0.09%) ⬇️
appsec-next-oldest-11.1.4 29.16% <60.00%> (-0.09%) ⬇️
appsec-next-oldest-13.2.0 31.14% <60.00%> (-0.09%) ⬇️
appsec-next-oldest-gte.10.2.0.and.lt.11 28.78% <ø> (ø)
appsec-next-oldest-gte.11.0.0.and.lt.13 30.86% <60.00%> (-0.09%) ⬇️
appsec-next-oldest-gte.13.0.0.and.lt.14 31.33% <60.00%> (-0.08%) ⬇️
appsec-next-oldest-gte.14.0.0.and.lte.14.2.6 31.17% <60.00%> (-0.09%) ⬇️
appsec-next-oldest-gte.14.2.7.and.lt.15 31.17% <60.00%> (-0.09%) ⬇️
appsec-next-oldest-gte.15.0.0 31.17% <60.00%> (-0.09%) ⬇️
appsec-node-serialize 39.97% <60.00%> (-0.07%) ⬇️
appsec-passport 43.63% <60.00%> (-0.08%) ⬇️
appsec-postgres 47.54% <60.00%> (-0.07%) ⬇️
appsec-sourcing 39.31% <60.00%> (-0.07%) ⬇️
appsec-stripe 41.41% <60.00%> (-0.08%) ⬇️
appsec-template 40.13% <60.00%> (-0.07%) ⬇️
appsec-ubuntu 55.83% <60.00%> (-0.07%) ⬇️
appsec-windows 55.69% <60.00%> (-0.06%) ⬇️
debugger-ubuntu-active 43.23% <60.00%> (+0.04%) ⬆️
debugger-ubuntu-latest 43.13% <60.00%> (ø)
debugger-ubuntu-maintenance 43.19% <60.00%> (-0.43%) ⬇️
debugger-ubuntu-oldest 43.63% <60.00%> (ø)
instrumentations-instrumentation-bluebird 29.25% <60.00%> (-0.09%) ⬇️
instrumentations-instrumentation-body-parser 36.86% <60.00%> (-0.08%) ⬇️
instrumentations-instrumentation-child_process 34.74% <60.00%> (-0.09%) ⬇️
instrumentations-instrumentation-cookie-parser 31.09% <60.00%> (-0.08%) ⬇️
instrumentations-instrumentation-express 31.31% <60.00%> (-0.08%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 31.21% <60.00%> (-0.08%) ⬇️
instrumentations-instrumentation-express-session 36.55% <60.00%> (-0.08%) ⬇️
instrumentations-instrumentation-fs 28.94% <60.00%> (-0.09%) ⬇️
instrumentations-instrumentation-generic-pool 29.86% <60.00%> (ø)
instrumentations-instrumentation-http 36.22% <60.00%> (-0.09%) ⬇️
instrumentations-instrumentation-knex 29.22% <60.00%> (-0.09%) ⬇️
instrumentations-instrumentation-light-my-request 36.48% <60.00%> (-0.08%) ⬇️
instrumentations-instrumentation-mongoose 30.35% <60.00%> (-0.08%) ⬇️
instrumentations-instrumentation-multer 36.65% <60.00%> (-0.08%) ⬇️
instrumentations-instrumentation-mysql2 34.77% <60.00%> (-0.09%) ⬇️
instrumentations-instrumentation-passport 40.27% <60.00%> (-0.08%) ⬇️
instrumentations-instrumentation-passport-http 40.05% <60.00%> (-0.08%) ⬇️
instrumentations-instrumentation-passport-local 40.53% <60.00%> (-0.08%) ⬇️
instrumentations-instrumentation-pg 34.32% <60.00%> (-0.09%) ⬇️
instrumentations-instrumentation-promise 29.19% <60.00%> (-0.09%) ⬇️
instrumentations-instrumentation-promise-js 29.19% <60.00%> (-0.09%) ⬇️
instrumentations-instrumentation-q 29.22% <60.00%> (-0.09%) ⬇️
instrumentations-instrumentation-url 29.19% <60.00%> (-0.09%) ⬇️
instrumentations-instrumentation-when 29.21% <60.00%> (-0.09%) ⬇️
instrumentations-integration-esbuild-active 19.30% <60.00%> (ø)
instrumentations-integration-esbuild-latest 19.29% <60.00%> (ø)
instrumentations-integration-esbuild-maintenance 19.30% <60.00%> (ø)
instrumentations-integration-esbuild-oldest 19.29% <60.00%> (ø)
llmobs-ai 37.69% <80.00%> (-0.08%) ⬇️
llmobs-anthropic 37.75% <80.00%> (-0.08%) ⬇️
llmobs-bedrock 36.45% <60.00%> (-0.08%) ⬇️
llmobs-google-genai 36.77% <80.00%> (-0.08%) ⬇️
llmobs-langchain 36.48% <80.00%> (-0.07%) ⬇️
llmobs-openai 40.52% <80.00%> (-0.08%) ⬇️
llmobs-sdk-active 45.33% <60.00%> (-0.09%) ⬇️
llmobs-sdk-latest 45.26% <60.00%> (-0.09%) ⬇️
llmobs-sdk-maintenance 45.33% <60.00%> (-0.09%) ⬇️
llmobs-sdk-oldest 45.31% <60.00%> (-0.09%) ⬇️
llmobs-vertex-ai 36.92% <60.00%> (-0.08%) ⬇️
openfeature-macos 37.92% <60.00%> (ø)
openfeature-ubuntu 38.00% <60.00%> (ø)
openfeature-unit-active 48.51% <ø> (ø)
openfeature-unit-latest 48.35% <ø> (ø)
openfeature-unit-maintenance 48.51% <ø> (ø)
openfeature-unit-oldest 48.51% <ø> (ø)
openfeature-windows 37.79% <60.00%> (+0.04%) ⬆️
platform-core 37.27% <ø> (ø)
platform-esbuild 40.61% <ø> (ø)
platform-instrumentations-misc 30.69% <60.00%> (ø)
platform-integration-active 46.92% <60.00%> (-0.01%) ⬇️
platform-integration-latest 46.89% <60.00%> (ø)
platform-integration-maintenance 46.95% <60.00%> (+0.01%) ⬆️
platform-integration-oldest 47.11% <60.00%> (ø)
platform-shimmer 42.29% <ø> (ø)
platform-unit-guardrails 36.12% <ø> (ø)
platform-webpack 20.44% <60.00%> (ø)
plugins-azure-durable-functions 36.91% <60.00%> (ø)
plugins-azure-event-hubs 34.75% <60.00%> (ø)
plugins-azure-service-bus 35.22% <60.00%> (ø)
plugins-bullmq 40.12% <60.00%> (+0.02%) ⬆️
plugins-cassandra 34.58% <60.00%> (-0.08%) ⬇️
plugins-cookie 26.65% <ø> (?)
plugins-cookie-parser 26.46% <ø> (ø)
plugins-crypto 27.69% <ø> (ø)
plugins-dd-trace-api 34.67% <60.00%> (-0.09%) ⬇️
plugins-express-mongo-sanitize 26.59% <ø> (ø)
plugins-express-session 26.42% <ø> (ø)
plugins-fastify 38.63% <60.00%> (-0.08%) ⬇️
plugins-fetch 34.96% <80.00%> (-0.08%) ⬇️
plugins-fs 35.02% <60.00%> (-0.09%) ⬇️
plugins-generic-pool 25.58% <ø> (ø)
plugins-google-cloud-pubsub 42.39% <60.00%> (-0.09%) ⬇️
plugins-grpc 37.40% <60.00%> (-0.08%) ⬇️
plugins-handlebars 26.63% <ø> (ø)
plugins-hapi 36.52% <60.00%> (-0.09%) ⬇️
plugins-hono 36.81% <60.00%> (-0.08%) ⬇️
plugins-ioredis 35.10% <60.00%> (-0.09%) ⬇️
plugins-knex 26.31% <ø> (ø)
plugins-langgraph 34.38% <60.00%> (-0.09%) ⬇️
plugins-ldapjs 24.20% <ø> (ø)
plugins-light-my-request 26.06% <ø> (ø)
plugins-limitd-client 29.49% <60.00%> (-0.09%) ⬇️
plugins-lodash 25.65% <ø> (ø)
plugins-mariadb 36.00% <60.00%> (-0.15%) ⬇️
plugins-memcached 34.76% <60.00%> (-0.09%) ⬇️
plugins-microgateway-core 35.65% <60.00%> (-0.09%) ⬇️
plugins-modelcontextprotocol-sdk 33.66% <60.00%> (-0.09%) ⬇️
plugins-moleculer 37.48% <60.00%> (-0.09%) ⬇️
plugins-mongodb 35.95% <60.00%> (-0.08%) ⬇️
plugins-mongodb-core 35.67% <60.00%> (-0.11%) ⬇️
plugins-mongoose 35.46% <60.00%> (-0.08%) ⬇️
plugins-multer 26.42% <ø> (ø)
plugins-mysql 35.74% <60.00%> (-0.09%) ⬇️
plugins-mysql2 35.82% <60.00%> (-0.09%) ⬇️
plugins-node-serialize 26.69% <ø> (ø)
plugins-opensearch 34.46% <60.00%> (-0.09%) ⬇️
plugins-passport-http 26.47% <ø> (ø)
plugins-pino 31.19% <60.00%> (-0.09%) ⬇️
plugins-postgres 33.83% <60.00%> (-0.10%) ⬇️
plugins-process 27.69% <ø> (ø)
plugins-pug 26.65% <ø> (ø)
plugins-redis 35.10% <60.00%> (-0.15%) ⬇️
plugins-router 38.97% <60.00%> (-0.21%) ⬇️
plugins-sequelize 25.36% <ø> (ø)
plugins-test-and-upstream-amqp10 35.00% <60.00%> (-0.09%) ⬇️
plugins-test-and-upstream-amqplib 40.20% <60.00%> (-0.11%) ⬇️
plugins-test-and-upstream-apollo 35.87% <60.00%> (-0.08%) ⬇️
plugins-test-and-upstream-avsc 34.34% <60.00%> (-0.09%) ⬇️
plugins-test-and-upstream-bunyan 30.57% <60.00%> (-0.09%) ⬇️
plugins-test-and-upstream-connect 37.13% <60.00%> (-0.14%) ⬇️
plugins-test-and-upstream-graphql 36.76% <60.00%> (-0.11%) ⬇️
plugins-test-and-upstream-koa 36.78% <60.00%> (-0.08%) ⬇️
plugins-test-and-upstream-protobufjs 34.55% <60.00%> (-0.09%) ⬇️
plugins-test-and-upstream-rhea 40.24% <60.00%> (-0.09%) ⬇️
plugins-undici 35.69% <60.00%> (-0.08%) ⬇️
plugins-url 27.69% <ø> (ø)
plugins-valkey 34.77% <60.00%> (-0.09%) ⬇️
plugins-vm 27.69% <ø> (ø)
plugins-winston 31.08% <60.00%> (-0.09%) ⬇️
plugins-ws 38.31% <60.00%> (+0.06%) ⬆️
profiling-macos 42.65% <60.00%> (-0.12%) ⬇️
profiling-ubuntu 43.06% <60.00%> (-0.07%) ⬇️
profiling-windows 39.96% <60.00%> (-0.07%) ⬇️
serverless-aws-sdk-latest-aws-sdk 34.66% <60.00%> (-0.07%) ⬇️
serverless-aws-sdk-latest-bedrockruntime 33.00% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-latest-client 22.38% <ø> (ø)
serverless-aws-sdk-latest-dynamodb 35.62% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-latest-eventbridge 28.76% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-latest-kinesis 38.56% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-latest-lambda 35.81% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-latest-s3 33.77% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-latest-serverless-peer-service 39.93% <40.00%> (-0.09%) ⬇️
serverless-aws-sdk-latest-sns 39.66% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-latest-sqs 38.94% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-latest-stepfunctions 34.38% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-latest-util 47.71% <ø> (ø)
serverless-aws-sdk-oldest-aws-sdk 34.75% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-oldest-bedrockruntime 33.28% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-oldest-client 22.75% <ø> (ø)
serverless-aws-sdk-oldest-dynamodb 35.69% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-oldest-eventbridge 28.81% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-oldest-kinesis 38.69% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-oldest-lambda 35.89% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-oldest-s3 33.83% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-oldest-serverless-peer-service 39.99% <40.00%> (-0.09%) ⬇️
serverless-aws-sdk-oldest-sns 39.98% <60.00%> (+0.04%) ⬆️
serverless-aws-sdk-oldest-sqs 38.83% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-oldest-stepfunctions 34.46% <60.00%> (-0.08%) ⬇️
serverless-aws-sdk-oldest-util 48.03% <ø> (ø)
serverless-azure-functions-eventhubs 38.40% <60.00%> (ø)
serverless-azure-functions-servicebus 38.46% <60.00%> (ø)
serverless-lambda 32.76% <60.00%> (-0.08%) ⬇️
test-optimization-cucumber-latest-7.0.0 50.42% <60.00%> (+0.20%) ⬆️
test-optimization-cucumber-latest-latest 53.05% <60.00%> (+0.12%) ⬆️
test-optimization-cucumber-oldest-7.0.0 50.35% <60.00%> (+0.12%) ⬆️
test-optimization-cypress-latest-12.0.0-commonJS 48.25% <60.00%> (+0.05%) ⬆️
test-optimization-cypress-latest-12.0.0-esm 48.31% <60.00%> (+0.07%) ⬆️
test-optimization-cypress-latest-14.5.4-commonJS 48.10% <60.00%> (+0.07%) ⬆️
test-optimization-cypress-latest-14.5.4-esm 48.13% <60.00%> (+0.07%) ⬆️
test-optimization-cypress-latest-latest-commonJS 48.60% <60.00%> (+0.07%) ⬆️
test-optimization-cypress-latest-latest-esm 48.63% <60.00%> (+0.06%) ⬆️
test-optimization-cypress-oldest-12.0.0-commonJS 48.29% <60.00%> (+0.07%) ⬆️
test-optimization-cypress-oldest-12.0.0-esm 48.32% <60.00%> (+0.07%) ⬆️
test-optimization-cypress-oldest-14.5.4-commonJS 48.14% <60.00%> (+0.07%) ⬆️
test-optimization-cypress-oldest-14.5.4-esm 48.17% <60.00%> (+0.07%) ⬆️
test-optimization-jest-latest-latest 54.82% <60.00%> (+0.08%) ⬆️
test-optimization-jest-latest-oldest 53.60% <60.00%> (+0.05%) ⬆️
test-optimization-jest-oldest-latest 54.82% <60.00%> (+0.08%) ⬆️
test-optimization-jest-oldest-oldest 53.56% <60.00%> (+0.08%) ⬆️
test-optimization-mocha-latest-latest 53.33% <60.00%> (+0.08%) ⬆️
test-optimization-mocha-latest-oldest 50.94% <60.00%> (+0.08%) ⬆️
test-optimization-mocha-oldest-latest 53.39% <60.00%> (+0.08%) ⬆️
test-optimization-mocha-oldest-oldest 50.88% <60.00%> (+0.08%) ⬆️
test-optimization-playwright-latest-latest-playwright-active-test-span 44.24% <60.00%> (+0.28%) ⬆️
test-optimization-playwright-latest-latest-playwright-atr 43.00% <60.00%> (+0.11%) ⬆️
test-optimization-playwright-latest-latest-playwright-efd 43.38% <60.00%> (+0.09%) ⬆️
test-optimization-playwright-latest-latest-playwright-final-status 43.47% <60.00%> (+0.13%) ⬆️
test-optimization-playwright-latest-latest-playwright-impacted-tests 42.93% <60.00%> (ø)
test-optimization-playwright-latest-latest-playwright-reporting 42.42% <60.00%> (+0.09%) ⬆️
test-optimization-playwright-latest-latest-playwright-test-management 44.61% <60.00%> (+0.10%) ⬆️
test-optimization-playwright-latest-oldest-playwright-active-test-span 44.30% <60.00%> (+0.28%) ⬆️
test-optimization-playwright-latest-oldest-playwright-atr 43.21% <60.00%> (+0.11%) ⬆️
test-optimization-playwright-latest-oldest-playwright-efd 43.43% <60.00%> (+0.09%) ⬆️
test-optimization-playwright-latest-oldest-playwright-final-status 43.50% <60.00%> (+0.11%) ⬆️
test-optimization-playwright-latest-oldest-playwright-impacted-tests 42.98% <60.00%> (ø)
test-optimization-playwright-latest-oldest-playwright-reporting 42.49% <60.00%> (+0.09%) ⬆️
test-optimization-playwright-latest-oldest-playwright-test-management 44.68% <60.00%> (+0.10%) ⬆️
test-optimization-playwright-oldest-latest-playwright-active-test-span 44.25% <60.00%> (+0.26%) ⬆️
test-optimization-playwright-oldest-latest-playwright-atr 43.04% <60.00%> (+0.11%) ⬆️
test-optimization-playwright-oldest-latest-playwright-efd 43.39% <60.00%> (+0.09%) ⬆️
test-optimization-playwright-oldest-latest-playwright-final-status 43.48% <60.00%> (+0.11%) ⬆️
test-optimization-playwright-oldest-latest-playwright-impacted-tests 42.97% <60.00%> (ø)
test-optimization-playwright-oldest-latest-playwright-reporting 42.44% <60.00%> (+0.09%) ⬆️
test-optimization-playwright-oldest-latest-playwright-test-management 44.62% <60.00%> (+0.10%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-active-test-span 44.34% <60.00%> (+0.28%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-atr 43.25% <60.00%> (+0.11%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-efd 43.44% <60.00%> (+0.09%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-final-status 43.57% <60.00%> (+0.14%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-impacted-tests 43.02% <60.00%> (ø)
test-optimization-playwright-oldest-oldest-playwright-reporting 42.50% <60.00%> (+0.09%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-test-management 44.70% <60.00%> (+0.10%) ⬆️
test-optimization-selenium-latest 45.62% <60.00%> (+0.07%) ⬆️
test-optimization-selenium-oldest 45.12% <60.00%> (+0.07%) ⬆️
test-optimization-testopt-active 46.98% <60.00%> (+0.13%) ⬆️
test-optimization-testopt-latest 46.94% <60.00%> (+0.13%) ⬆️
test-optimization-testopt-maintenance 46.98% <60.00%> (+0.13%) ⬆️
test-optimization-testopt-oldest 47.85% <60.00%> (+0.14%) ⬆️
test-optimization-vitest-latest 50.97% <60.00%> (+0.13%) ⬆️
test-optimization-vitest-oldest 47.68% <60.00%> (+0.33%) ⬆️

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.

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

datadog-prod-us1-5 Bot commented May 10, 2026

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 80.00%
Overall Coverage: 86.75% (-0.00%)

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

@BridgeAR BridgeAR marked this pull request as ready for review May 10, 2026 23:54
@BridgeAR BridgeAR requested a review from a team as a code owner May 10, 2026 23:54
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 11, 2026

Benchmarks

Benchmark execution time: 2026-05-11 00:14:06

Comparing candidate commit e1e6c3c in PR branch BridgeAR/2026-05-11-fetch-name-rename with baseline commit 807fceb in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1739 metrics, 105 unstable metrics.

@pabloerhard pabloerhard merged commit cd377ff into master May 11, 2026
1040 of 1041 checks passed
@pabloerhard pabloerhard deleted the BridgeAR/2026-05-11-fetch-name-rename branch May 11, 2026 17:02
@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
…8406)

`globalThis.fetch`'s wrapper carries the name `value`, so every stack
frame that flows through fetch surfaces as `at value` instead of
`at fetch`. Renaming the wrapper makes frames blend with bundled-undici
fetch.

The diff also renames the inner `let fetch` slot. A named function
expression `function fetch (...)` binds `fetch` to itself inside its
body; without the slot rename the wrapper calls itself and
stack-overflows on first invocation.

Retiring the wrap is blocked on upstream undici PR #2701: bundled
undici in Node 18+ exposes only `undici:request:*` channels, and the
existing undici plugin already subscribes to those.

Architecture review (baseline -> proposal, 1-10):

1. Drift prevention            7 -> 7
2. Coupling at module boundary 8 -> 8
3. Explicit contracts          7 -> 7
4. Testability at boundaries   5 -> 8 (spec pins the name and the
                                         recursion-safety invariant)
5. Extensibility               7 -> 7
6. Hot-path fitness            8 -> 8

Refs: nodejs/undici#2701
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