Skip to content
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

Sentry messes up NextJS Opentelemtry #13127

Closed
3 tasks done
Meemaw opened this issue Jul 31, 2024 · 2 comments
Closed
3 tasks done

Sentry messes up NextJS Opentelemtry #13127

Meemaw opened this issue Jul 31, 2024 · 2 comments
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK

Comments

@Meemaw
Copy link

Meemaw commented Jul 31, 2024

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

8.20.0

Framework Version

14.2.5

Link to Sentry event

No response

Reproduction Example/SDK Setup

In instrumentation.ts

import { registerOTel } from "@vercel/otel"
import * as Sentry from "@sentry/nextjs"

export function register() {
  Sentry.init({})
  registerOTel("my-service")
}

Steps to Reproduce

  1. Add Sentry.init({}) to the next instrumentation hook
  2. Otel integration stops working

Expected Result

Sentry shouldn't mess with otel instrumentation from nextjs.

Actual Result

Traces are not produced/send to collector

@chargome
Copy link
Member

chargome commented Jul 31, 2024

Hey @Meemaw thanks for reaching out!

For a custom otel setup some additional steps are required: https://docs.sentry.io/platforms/javascript/guides/nextjs/tracing/instrumentation/opentelemetry/#using-a-custom-opentelemetry-setup.
We're currently updating this part of the docs, so you'll likely find a new version in the upcoming days.

In short, you'll need to add skipOpenTelemetrySetup: true to your init call and make sure some required components like SentryContextManager and SentryPropagator are instantiated.

Would you mind sharing how you want to use Sentry with this setup?

@github-actions github-actions bot added the Package: nextjs Issues related to the Sentry Nextjs SDK label Jul 31, 2024
@AbhiPrasad
Copy link
Member

Closing this for clean-up. Please re-open if it still applies. Thank you!

@AbhiPrasad AbhiPrasad closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK
Projects
Archived in project
Development

No branches or pull requests

3 participants