Skip to content

fix(node): Update node tracing ESM imports. #4876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/includes/getting-started-config/node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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___",
Expand All @@ -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___",
Expand Down