Skip to content

Conversation

@timfish
Copy link
Collaborator

@timfish timfish commented Mar 23, 2023

ref getsentry/sentry-javascript#5815 and #6518

This PR updates our instructions to remove the dependency on using the @sentry/tracing package for the node.js SDK and its derivatives. The node.js SDK now enables tracing support by default and the tracing integrations are now available on the Integrations namespace.

Before:

import * as Sentry from '@sentry/node';
import '@sentry/tracing';

Sentry.init({
  dsn: '__DSN__',
  tracesSampleRate: 1.0,
});
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';

Sentry.init({
  dsn: '__DSN__',
  tracesSampleRate: 1.0,
  integrations: [new Tracing.Integrations.Postgres()],
});

After:

import * as Sentry from '@sentry/node';

Sentry.init({
  dsn: '__DSN__',
  tracesSampleRate: 1.0,
  integrations: [...Sentry.autoDiscoverNodePerformanceMonitoringIntegrations()],
});
import * as Sentry from '@sentry/node';

Sentry.init({
  dsn: '__DSN__',
  tracesSampleRate: 1.0,
  integrations: [new Sentry.Integrations.Postgres()],
});

@vercel
Copy link

vercel bot commented Mar 23, 2023

@timfish is attempting to deploy a commit to the Sentry Team on Vercel.

A member of the Team first needs to authorize it.

@timfish timfish marked this pull request as ready for review March 23, 2023 18:53
@vercel
Copy link

vercel bot commented Mar 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 29, 2023 at 9:21AM (UTC)

@AbhiPrasad
Copy link
Member

cc @JonasBa - we removed the tracing package requirement!

@AbhiPrasad AbhiPrasad merged commit 1bc4bd8 into getsentry:master Mar 30, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 15, 2023
@timfish timfish deleted the tracing/node branch September 29, 2023 17:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants