diff --git a/src/includes/getting-started-config/node.mdx b/src/includes/getting-started-config/node.mdx index 4dd0d47791150a..b5a0ea881be70b 100644 --- a/src/includes/getting-started-config/node.mdx +++ b/src/includes/getting-started-config/node.mdx @@ -4,7 +4,11 @@ Once this is done, Sentry's Node SDK captures all transactions and unhandled exc import * as Sentry from "@sentry/node"; // Importing @sentry/tracing patches the global hub for tracing to work. -import * as Tracing from "@sentry/tracing"; +import "@sentry/tracing"; + +// If you want to use `@sentry/tracing` in your project directly, use a named import instead: +// import * as SentryTracing from "@sentry/tracing" +// Unused named imports are not guaranteed to patch the global hub. Sentry.init({ dsn: "___PUBLIC_DSN___", @@ -19,7 +23,7 @@ Sentry.init({ const Sentry = require("@sentry/node"); // Importing @sentry/tracing patches the global hub for tracing to work. -const Tracing = require("@sentry/tracing"); +const SentryTracing = require("@sentry/tracing"); Sentry.init({ dsn: "___PUBLIC_DSN___",