- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.7k
 
Closed
Labels
Package: nextjsIssues related to the Sentry Nextjs SDKIssues related to the Sentry Nextjs SDK
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
 - I have reviewed the documentation https://docs.sentry.io/
 - I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
 
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
7.77.0
Framework Version
18.2.0
Link to Sentry event
No response
SDK Setup
We use the default Sentry.init set up for the client, server and edge.
// sentry.client.config.ts, sentry.edge.config.ts, sentry.server.config.ts
import * as Sentry from '@sentry/nextjs'
Sentry.init({
  dsn: '__DSN__',
  tracesSampleRate: 1
})Steps to Reproduce
This is a working CodeSandbox matching our techstack and set up.
https://codesandbox.io/p/github/Jezfx/sentry-next-middleware-issue/main
To recreate
Create this middleware file
// apps/demo/middleware.ts
import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'
export function middleware(request: NextRequest) {
  const url = request.nextUrl.clone()
  const res = NextResponse.rewrite(url)
  return res
}This codesandbox has the above changes.
Error
This is what we're seeing in the terminal
Expected Result
For us to use middleware as before upgrading@sentry/nextjs to 7.77.0.
Actual Result
This happened after we upgraded @sentry/nextjs to 7.77.0.
Since upgrading we get this error in the in terminal and also no production site data in our sentry.io dashboard anymore 🙁
Error:
Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'
This is causing issues in our live production site, any help is hugely appreciated 🙏
Metadata
Metadata
Assignees
Labels
Package: nextjsIssues related to the Sentry Nextjs SDKIssues related to the Sentry Nextjs SDK
Projects
Status
No status
