Skip to content

Commit

Permalink
Add minimum version to otel node docs and fix snippets (#8080)
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst committed Oct 4, 2023
1 parent c94a29e commit 751015d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ npm install @sentry/nextjs @sentry/opentelemetry-node
yarn add @sentry/nextjs @sentry/opentelemetry-node
```

The minimum required version of the `@sentry/node` and the `@sentry/opentelemetry-node` package is `7.20.0` and their versions should always be aligned.

<Note>

Note that @sentry/opentelemetry-node depends on the following peer dependencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ npm install @sentry/node @sentry/opentelemetry-node
yarn add @sentry/node @sentry/opentelemetry-node
```

The minimum required version of the `@sentry/node` and the `@sentry/opentelemetry-node` package is `7.20.0` and their versions should always be aligned.

<Note>

Note that @sentry/opentelemetry-node depends on the following peer dependencies:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
1. Follow the Next.js instructions to set up a [manual OpenTelemetry configuration](https://nextjs.org/docs/app/building-your-application/optimizing/open-telemetry#manual-opentelemetry-configuration).

2. Check to make sure you've added `instrumentation.{js,ts}` and `instrumentation.node.{js,ts}` files to your application.
2. Check to make sure you've added `instrumentation.{js,ts}` and `instrumentation.node.{js,ts}` files to your application. Note that, until this feature moves out of the experimental phase, Next.js requires you to set `experimental.instrumentationHook: true` in your `next.config.js` to enable these files.

3. Enable your `sentry.server.config.js` file to be able to use the OpenTelemetry instrumenter option.

Expand All @@ -25,6 +25,10 @@ import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
import { Resource } from "@opentelemetry/resources";
import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
import { SimpleSpanProcessor } from "@opentelemetry/sdk-trace-node";
import {
SentrySpanProcessor,
SentryPropagator,
} from "@sentry/opentelemetry-node";

const sdk = new NodeSDK({
resource: new Resource({
Expand Down

1 comment on commit 751015d

@vercel
Copy link

@vercel vercel bot commented on 751015d Oct 4, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

sentry-docs – ./

sentry-docs.sentry.dev
docs.sentry.io
sentry-docs-git-master.sentry.dev

Please sign in to comment.