Skip to content

fix: make DD_TRACING_ENABLED an alias of DD_APM_TRACING_ENABLED#8140

Merged
BridgeAR merged 3 commits intomasterfrom
BridgeAR/2026-04-28-fix-dd-tracing-enabled
Apr 29, 2026
Merged

fix: make DD_TRACING_ENABLED an alias of DD_APM_TRACING_ENABLED#8140
BridgeAR merged 3 commits intomasterfrom
BridgeAR/2026-04-28-fix-dd-tracing-enabled

Conversation

@BridgeAR
Copy link
Copy Markdown
Member

It was accidentially made an alias of DD_TRACE_ENABLED, which acts differently.

It was accidentially made an alias of DD_TRACE_ENABLED, which acts
differently.
@datadog-prod-us1-4

This comment has been minimized.

@BridgeAR BridgeAR marked this pull request as ready for review April 28, 2026 14:02
@BridgeAR BridgeAR requested review from a team as code owners April 28, 2026 14:02
@BridgeAR BridgeAR requested review from khanayan123 and removed request for a team April 28, 2026 14:02
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.19%. Comparing base (95010b2) to head (5d1e09d).
⚠️ Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8140      +/-   ##
==========================================
+ Coverage   74.11%   77.19%   +3.07%     
==========================================
  Files         786      813      +27     
  Lines       36400    37658    +1258     
==========================================
+ Hits        26979    29069    +2090     
+ Misses       9421     8589     -832     
Flag Coverage Δ
aiguard-macos 35.82% <100.00%> (-0.66%) ⬇️
aiguard-ubuntu 35.93% <100.00%> (-0.66%) ⬇️
aiguard-windows 35.72% <100.00%> (-0.66%) ⬇️
apm-capabilities-tracing-macos 48.20% <100.00%> (+0.09%) ⬆️
apm-capabilities-tracing-ubuntu-active 48.23% <100.00%> (+0.05%) ⬆️
apm-capabilities-tracing-ubuntu-latest 48.20% <100.00%> (+0.05%) ⬆️
apm-capabilities-tracing-ubuntu-maintenance 48.23% <100.00%> (+0.05%) ⬆️
apm-capabilities-tracing-ubuntu-oldest 48.21% <100.00%> (+0.05%) ⬆️
apm-capabilities-tracing-windows ?
apm-integrations-aerospike-18-gte.5.2.0 34.97% <100.00%> (?)
apm-integrations-aerospike-20-gte.5.5.0 34.99% <100.00%> (?)
apm-integrations-aerospike-22-gte.5.12.1 34.99% <100.00%> (?)
apm-integrations-aerospike-22-gte.6.0.0 34.99% <100.00%> (?)
apm-integrations-aerospike-eol- 34.89% <100.00%> (?)
apm-integrations-child-process 36.15% <100.00%> (+0.02%) ⬆️
apm-integrations-confluentinc-kafka-javascript-18 41.83% <100.00%> (?)
apm-integrations-confluentinc-kafka-javascript-20 41.85% <100.00%> (?)
apm-integrations-confluentinc-kafka-javascript-22 41.85% <100.00%> (?)
apm-integrations-confluentinc-kafka-javascript-24 41.78% <100.00%> (?)
apm-integrations-couchbase-18 35.15% <100.00%> (+0.02%) ⬆️
apm-integrations-couchbase-eol 35.21% <100.00%> (-0.01%) ⬇️
apm-integrations-dns 35.00% <100.00%> (?)
apm-integrations-elasticsearch 35.55% <100.00%> (?)
apm-integrations-http-latest 42.98% <100.00%> (?)
apm-integrations-http-maintenance 43.04% <100.00%> (?)
apm-integrations-http-oldest 43.05% <100.00%> (?)
apm-integrations-http2 40.35% <100.00%> (?)
apm-integrations-kafkajs-latest 41.71% <100.00%> (?)
apm-integrations-kafkajs-oldest 41.77% <100.00%> (?)
apm-integrations-net 35.66% <100.00%> (?)
apm-integrations-next-11.1.4 29.43% <100.00%> (?)
apm-integrations-next-13.2.0 31.28% <100.00%> (?)
apm-integrations-next-gte.10.2.0.and.lt.11 23.33% <ø> (?)
apm-integrations-next-gte.11.0.0.and.lt.13 31.29% <100.00%> (?)
apm-integrations-next-gte.13.0.0.and.lt.14 31.54% <100.00%> (?)
apm-integrations-next-gte.14.0.0.and.lte.14.2.6 31.36% <100.00%> (?)
apm-integrations-next-gte.14.2.7.and.lt.15 31.36% <100.00%> (?)
apm-integrations-next-gte.15.0.0 31.42% <100.00%> (?)
apm-integrations-oracledb ?
apm-integrations-prisma-18-gte.6.16.0.and.lt.7.0.0 35.52% <100.00%> (?)
apm-integrations-prisma-latest-all 35.85% <100.00%> (?)
apm-integrations-sharedb 34.57% <100.00%> (?)
apm-integrations-tedious 35.13% <100.00%> (?)
appsec-express 52.78% <100.00%> (-0.03%) ⬇️
appsec-fastify 49.25% <100.00%> (-0.05%) ⬇️
appsec-graphql 49.54% <100.00%> (-0.12%) ⬇️
appsec-kafka 42.07% <100.00%> (+0.02%) ⬆️
appsec-ldapjs 41.30% <100.00%> (-0.08%) ⬇️
appsec-lodash 41.42% <100.00%> (+<0.01%) ⬆️
appsec-macos 56.79% <100.00%> (-0.04%) ⬇️
appsec-mongodb-core 45.69% <100.00%> (-0.02%) ⬇️
appsec-mongoose 46.57% <100.00%> (-0.01%) ⬇️
appsec-mysql 48.74% <100.00%> (-0.02%) ⬇️
appsec-next-latest-11.1.4 29.60% <100.00%> (?)
appsec-next-latest-13.2.0 31.49% <100.00%> (?)
appsec-next-latest-gte.10.2.0.and.lt.11 31.60% <ø> (?)
appsec-next-latest-gte.11.0.0.and.lt.13 31.47% <100.00%> (?)
appsec-next-latest-gte.13.0.0.and.lt.14 31.67% <100.00%> (?)
appsec-next-latest-gte.14.0.0.and.lte.14.2.6 31.52% <100.00%> (?)
appsec-next-latest-gte.14.2.7.and.lt.15 31.52% <100.00%> (?)
appsec-next-latest-gte.15.0.0 31.52% <100.00%> (?)
appsec-next-oldest-11.1.4 29.62% <100.00%> (?)
appsec-next-oldest-13.2.0 31.73% <100.00%> (?)
appsec-next-oldest-gte.10.2.0.and.lt.11 31.76% <ø> (?)
appsec-next-oldest-gte.11.0.0.and.lt.13 31.49% <100.00%> (?)
appsec-next-oldest-gte.13.0.0.and.lt.14 31.92% <100.00%> (?)
appsec-next-oldest-gte.14.0.0.and.lte.14.2.6 31.77% <100.00%> (?)
appsec-next-oldest-gte.14.2.7.and.lt.15 31.77% <100.00%> (?)
appsec-next-oldest-gte.15.0.0 31.77% <100.00%> (?)
appsec-node-serialize 40.60% <100.00%> (+0.01%) ⬆️
appsec-passport 44.59% <100.00%> (-0.01%) ⬇️
appsec-postgres 48.33% <100.00%> (-0.02%) ⬇️
appsec-sourcing 40.09% <100.00%> (+<0.01%) ⬆️
appsec-stripe 42.32% <100.00%> (-0.01%) ⬇️
appsec-template 40.76% <100.00%> (+0.01%) ⬆️
appsec-ubuntu 56.87% <100.00%> (-0.04%) ⬇️
appsec-windows 56.68% <100.00%> (-0.02%) ⬇️
debugger-ubuntu-active 62.13% <ø> (?)
debugger-ubuntu-latest 62.03% <ø> (?)
debugger-ubuntu-maintenance 62.13% <ø> (?)
debugger-ubuntu-oldest 62.23% <ø> (?)
instrumentations-instrumentation-bluebird 29.88% <100.00%> (+0.04%) ⬆️
instrumentations-instrumentation-body-parser 37.74% <100.00%> (+0.02%) ⬆️
instrumentations-instrumentation-child_process 35.53% <100.00%> (+0.02%) ⬆️
instrumentations-instrumentation-cookie-parser 31.81% <100.00%> (+0.04%) ⬆️
instrumentations-instrumentation-express 32.03% <100.00%> (+0.04%) ⬆️
instrumentations-instrumentation-express-mongo-sanitize 31.93% <100.00%> (+0.04%) ⬆️
instrumentations-instrumentation-express-session 37.38% <100.00%> (+0.02%) ⬆️
instrumentations-instrumentation-fs 29.56% <100.00%> (+0.04%) ⬆️
instrumentations-instrumentation-generic-pool 30.59% <ø> (+0.06%) ⬆️
instrumentations-instrumentation-http 36.99% <100.00%> (+0.02%) ⬆️
instrumentations-instrumentation-knex 29.85% <100.00%> (+0.04%) ⬆️
instrumentations-instrumentation-light-my-request 37.30% <100.00%> (+0.01%) ⬆️
instrumentations-instrumentation-mongoose 30.94% <100.00%> (+0.03%) ⬆️
instrumentations-instrumentation-multer 37.52% <100.00%> (+0.02%) ⬆️
instrumentations-instrumentation-mysql2 35.49% <100.00%> (+0.02%) ⬆️
instrumentations-instrumentation-passport 41.17% <100.00%> (-0.08%) ⬇️
instrumentations-instrumentation-passport-http 40.95% <100.00%> (+0.01%) ⬆️
instrumentations-instrumentation-passport-local 41.46% <100.00%> (+<0.01%) ⬆️
instrumentations-instrumentation-pg 35.03% <100.00%> (+0.03%) ⬆️
instrumentations-instrumentation-promise 29.82% <100.00%> (+0.04%) ⬆️
instrumentations-instrumentation-promise-js 29.83% <100.00%> (+0.04%) ⬆️
instrumentations-instrumentation-q 29.86% <100.00%> (+0.04%) ⬆️
instrumentations-instrumentation-url 29.83% <100.00%> (+0.04%) ⬆️
instrumentations-instrumentation-when 29.84% <100.00%> (+0.04%) ⬆️
llmobs-ai 38.45% <100.00%> (+0.01%) ⬆️
llmobs-anthropic 37.94% <100.00%> (+0.02%) ⬆️
llmobs-bedrock 37.15% <100.00%> (+0.01%) ⬆️
llmobs-google-genai 37.58% <100.00%> (+0.01%) ⬆️
llmobs-langchain 37.09% <100.00%> (+0.02%) ⬆️
llmobs-openai 41.26% <100.00%> (+<0.01%) ⬆️
llmobs-vertex-ai 37.77% <100.00%> (+0.01%) ⬆️
openfeature-unit-active 50.43% <ø> (?)
openfeature-unit-latest 50.28% <ø> (?)
openfeature-unit-maintenance 50.43% <ø> (?)
openfeature-unit-oldest 50.43% <ø> (?)
platform-core 36.53% <ø> (+6.49%) ⬆️
platform-esbuild 40.80% <ø> (+7.97%) ⬆️
platform-instrumentations-misc 31.34% <100.00%> (+0.11%) ⬆️
platform-shimmer 42.11% <ø> (+6.39%) ⬆️
platform-unit-guardrails 35.88% <ø> (+4.48%) ⬆️
platform-webpack 20.78% <100.00%> (+0.04%) ⬆️
plugins-azure-durable-functions 25.36% <ø> (ø)
plugins-azure-event-hubs 25.51% <ø> (ø)
plugins-azure-service-bus 24.92% <ø> (ø)
plugins-bullmq 40.68% <100.00%> (-0.08%) ⬇️
plugins-cassandra 35.26% <100.00%> (+0.05%) ⬆️
plugins-cookie 26.47% <ø> (ø)
plugins-cookie-parser 26.28% <ø> (ø)
plugins-crypto 27.32% <ø> (+1.62%) ⬆️
plugins-dd-trace-api 35.48% <100.00%> (+0.03%) ⬆️
plugins-express-mongo-sanitize 26.42% <ø> (ø)
plugins-express-session 26.24% <ø> (ø)
plugins-fastify 39.38% <100.00%> (+0.04%) ⬆️
plugins-fetch 35.87% <100.00%> (+0.02%) ⬆️
plugins-fs 35.75% <100.00%> (+0.02%) ⬆️
plugins-generic-pool 25.40% <ø> (ø)
plugins-google-cloud-pubsub 43.07% <100.00%> (+<0.01%) ⬆️
plugins-grpc 38.12% <100.00%> (+0.02%) ⬆️
plugins-handlebars 26.46% <ø> (ø)
plugins-hapi 37.36% <100.00%> (+0.02%) ⬆️
plugins-hono 37.61% <100.00%> (+0.02%) ⬆️
plugins-ioredis 35.80% <100.00%> (+0.03%) ⬆️
plugins-knex 26.14% <ø> (ø)
plugins-langgraph 35.14% <100.00%> (+0.02%) ⬆️
plugins-ldapjs 24.02% <ø> (ø)
plugins-light-my-request 25.88% <ø> (ø)
plugins-limitd-client 30.12% <100.00%> (+0.04%) ⬆️
plugins-lodash 25.47% <ø> (ø)
plugins-mariadb 36.67% <100.00%> (+0.02%) ⬆️
plugins-memcached 35.45% <100.00%> (+0.03%) ⬆️
plugins-microgateway-core 36.45% <100.00%> (+0.02%) ⬆️
plugins-modelcontextprotocol-sdk 34.39% <100.00%> (+0.02%) ⬆️
plugins-moleculer 38.14% <100.00%> (+0.02%) ⬆️
plugins-mongodb 36.64% <100.00%> (+0.05%) ⬆️
plugins-mongodb-core 36.27% <100.00%> (+0.02%) ⬆️
plugins-mongoose 36.12% <100.00%> (-0.08%) ⬇️
plugins-multer 26.24% <ø> (ø)
plugins-mysql 36.40% <100.00%> (+0.02%) ⬆️
plugins-mysql2 36.50% <100.00%> (+0.02%) ⬆️
plugins-node-serialize 26.51% <ø> (ø)
plugins-opensearch 35.11% <100.00%> (+0.02%) ⬆️
plugins-passport-http 26.30% <ø> (ø)
plugins-pino 31.91% <100.00%> (+0.03%) ⬆️
plugins-postgres 34.50% <100.00%> (+0.03%) ⬆️
plugins-process 27.32% <ø> (+1.62%) ⬆️
plugins-pug 26.47% <ø> (ø)
plugins-redis 36.01% <100.00%> (+0.03%) ⬆️
plugins-router 39.90% <100.00%> (+0.04%) ⬆️
plugins-sequelize 25.18% <ø> (ø)
plugins-test-and-upstream-amqp10 35.64% <100.00%> (+0.03%) ⬆️
plugins-test-and-upstream-amqplib 40.92% <100.00%> (+0.01%) ⬆️
plugins-test-and-upstream-apollo 36.61% <100.00%> (+0.02%) ⬆️
plugins-test-and-upstream-avsc 35.10% <100.00%> (-0.41%) ⬇️
plugins-test-and-upstream-bunyan 31.26% <100.00%> (+0.04%) ⬆️
plugins-test-and-upstream-connect 37.95% <100.00%> (+0.02%) ⬆️
plugins-test-and-upstream-graphql 37.29% <100.00%> (+0.01%) ⬆️
plugins-test-and-upstream-koa 37.56% <100.00%> (+0.02%) ⬆️
plugins-test-and-upstream-protobufjs 35.32% <100.00%> (-0.41%) ⬇️
plugins-test-and-upstream-rhea 41.00% <100.00%> (+0.01%) ⬆️
plugins-undici 36.62% <100.00%> (+0.02%) ⬆️
plugins-url 27.32% <ø> (+1.62%) ⬆️
plugins-valkey 35.49% <100.00%> (+0.03%) ⬆️
plugins-vm 27.32% <ø> (+1.62%) ⬆️
plugins-winston 31.73% <100.00%> (+0.07%) ⬆️
plugins-ws 39.07% <100.00%> (+0.01%) ⬆️
profiling-macos 40.69% <100.00%> (+1.40%) ⬆️
profiling-ubuntu 40.85% <100.00%> (+1.38%) ⬆️
profiling-windows 40.87% <100.00%> (+1.42%) ⬆️
serverless-azure-functions-client 25.25% <ø> (ø)
serverless-azure-functions-eventhubs 25.25% <ø> (ø)
serverless-azure-functions-servicebus 25.25% <ø> (ø)
serverless-lambda 33.56% <100.00%> (?)

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.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 55b8d1a7c7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/dd-trace/src/index.js
szegedi
szegedi previously approved these changes Apr 28, 2026
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Apr 28, 2026

Benchmarks

Benchmark execution time: 2026-04-29 13:39:06

Comparing candidate commit 5d1e09d in PR branch BridgeAR/2026-04-28-fix-dd-tracing-enabled with baseline commit 95010b2 in branch master.

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 28, 2026

Overall package size

Self size: 5.67 MB
Deduped: 6.51 MB
No deduping: 6.51 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

@watson
Copy link
Copy Markdown
Collaborator

watson commented Apr 29, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d244269a6b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/dd-trace/src/index.js
@BridgeAR BridgeAR merged commit abf7139 into master Apr 29, 2026
880 of 881 checks passed
@BridgeAR BridgeAR deleted the BridgeAR/2026-04-28-fix-dd-tracing-enabled branch April 29, 2026 15:55
dd-octo-sts Bot pushed a commit that referenced this pull request Apr 29, 2026
It was accidentially made an alias of DD_TRACE_ENABLED, which acts
differently.
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Apr 29, 2026
'should capture and send expected payload when a log line probe is triggered',
testBasicInputWithoutDD.bind(null, t)
)
it('should capture and send expected payload when a log line probe is triggered', testBasicInput.bind(null, t))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not sure we want to remove testBasicInputWithoutDD. I would assume that's still relevant here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In standalone APM mode (DD_APM_TRACING_ENABLED=false / DD_TRACING_ENABLED=false) the tracer is fully active locally, it just stops shipping spans the agent does not need.

The active span returned by tracer.scope().active()?.context() is still a real span with a trace_id and span_id, so the dd field IS populated in the debugger payload. That's why the new test correctly uses testBasicInput (which asserts the dd field is present and equal to the local span's ids) instead of testBasicInputWithoutDD.

The only scenario where the helper would be relevant is DD_TRACE_ENABLED=false, but after this PR that flag unconditionally short-circuits to the noop proxy, which means DI is never started in the test app and the breakpoint would never fire — so the helper had no remaining caller and I removed it.

I will open a follow-up that adds an explicit assertion that DI does not start when DD_TRACE_ENABLED=false, so the new behavior is locked down by a test.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I thought that when DD_TRACING_ENABLED=false then there would be no trace/span created?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The spans are still created, they are just not send out later. Span creation is only turned off with DD_TRACE_ENABLED being false.

BridgeAR added a commit that referenced this pull request Apr 29, 2026
The template integration test compared its output against a hardcoded
`util.inspect` string and version-gated the bracketed `[byteLength]` form
on `>=24.11.1`. The same change was later backported to Node.js v22.22.1,
which broke `node-active` on master once GitHub Actions started serving
v22.22.x to that job (PR CI happened to land on v22.22.0 and stayed
green).

Probe the current `util.inspect` output for `[byteLength]` instead, so
the assertion tracks Node's actual behavior on whatever patch the runner
picks up. This avoids having to enumerate every release line that
backports the change.

Refs: nodejs/node#60131
Refs: #8140
dd-octo-sts Bot pushed a commit that referenced this pull request Apr 29, 2026
The template integration test compared its output against a hardcoded
`util.inspect` string and version-gated the bracketed `[byteLength]` form
on `>=24.11.1`. The same change was later backported to Node.js v22.22.1,
which broke `node-active` on master once GitHub Actions started serving
v22.22.x to that job (PR CI happened to land on v22.22.0 and stayed
green).

Probe the current `util.inspect` output for `[byteLength]` instead, so
the assertion tracks Node's actual behavior on whatever patch the runner
picks up. This avoids having to enumerate every release line that
backports the change.

Refs: nodejs/node#60131
Refs: #8140
BridgeAR added a commit that referenced this pull request Apr 30, 2026
It was accidentially made an alias of DD_TRACE_ENABLED, which acts
differently.
BridgeAR added a commit that referenced this pull request Apr 30, 2026
The template integration test compared its output against a hardcoded
`util.inspect` string and version-gated the bracketed `[byteLength]` form
on `>=24.11.1`. The same change was later backported to Node.js v22.22.1,
which broke `node-active` on master once GitHub Actions started serving
v22.22.x to that job (PR CI happened to land on v22.22.0 and stayed
green).

Probe the current `util.inspect` output for `[byteLength]` instead, so
the assertion tracks Node's actual behavior on whatever patch the runner
picks up. This avoids having to enumerate every release line that
backports the change.

Refs: nodejs/node#60131
Refs: #8140
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.

3 participants