Skip to content

dd-trace 5 to 6 Migration#1

Open
codemod[bot] wants to merge 1 commit into
mainfrom
codemod-23fbf0bb
Open

dd-trace 5 to 6 Migration#1
codemod[bot] wants to merge 1 commit into
mainfrom
codemod-23fbf0bb

Conversation

@codemod
Copy link
Copy Markdown

@codemod codemod Bot commented May 14, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the demo tracer initialization/config to match expected dd-trace v6 configuration patterns as part of a v5→v6 migration for the sample orders-api service.

Changes:

  • Updates tracer.init options (propagation style, sampling/rate limiting, and moves AppSec/IAST out of experimental).
  • Renames integration filters from whitelist/blacklist to allowlist/blocklist.
  • Updates span link API usage and renames several Datadog-related environment variables.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 27 to 35
tracer.use("http", {
whitelist: ["/health"],
blacklist: [/admin/]
allowlist: ["/health"],
blocklist: [/admin/]
});

tracer.use("redis", {
whitelist: ["cache"],
blacklist: ["internal"]
allowlist: ["cache"],
blocklist: ["internal"]
});
enabled: true,
rules: "appsec-rules.json"
},
apmTracingEnabled: false,
const otherSpan = tracer.scope().active();

span?.addLink(otherSpan!.context(), { feature: "checkout" });
span?.addLink({ context: otherSpan!.context(), attributes: { feature: "checkout" } });
Comment on lines 20 to +45
env: {
DD_PROFILING_EXPERIMENTAL_CPU_ENABLED: "true",
DD_TRACE_EXPERIMENTAL_RUNTIME_ID_ENABLED: "true",
DD_TRACE_PROPAGATION_STYLE: "b3 single header"
DD_PROFILING_CPU_ENABLED: "true",
DD_RUNTIME_METRICS_RUNTIME_ID_ENABLED: "true",
DD_TRACE_PROPAGATION_STYLE: "b3"
}
});

tracer.use("http", {
whitelist: ["/health"],
blacklist: [/admin/]
allowlist: ["/health"],
blocklist: [/admin/]
});

tracer.use("redis", {
whitelist: ["cache"],
blacklist: ["internal"]
allowlist: ["cache"],
blocklist: ["internal"]
});

const span = tracer.scope().active();
const otherSpan = tracer.scope().active();

span?.addLink(otherSpan!.context(), { feature: "checkout" });
span?.addLink({ context: otherSpan!.context(), attributes: { feature: "checkout" } });

process.env.DD_PROFILING_EXPERIMENTAL_TIMELINE_ENABLED = "true";
process.env["DD_PROFILING_EXPERIMENTAL_ENDPOINT_COLLECTION_ENABLED"] = "false";
process.env.DD_TRACE_EXPERIMENTAL_RUNTIME_ID_ENABLED = "true";
process.env.DD_TRACE_PROPAGATION_STYLE = "b3 single header";
process.env.DD_PROFILING_TIMELINE_ENABLED = "true";
process.env["DD_PROFILING_ENDPOINT_COLLECTION_ENABLED"] = "false";
process.env.DD_RUNTIME_METRICS_RUNTIME_ID_ENABLED = "true";
process.env.DD_TRACE_PROPAGATION_STYLE = "b3";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants