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
10.55.0
Framework Version
15.5.18
Link to Sentry event
No response
Reproduction Example/SDK Setup
We are using a Next.js Pages Router app with SSR via getServerSideProps on many routes.
Versions:
next: 15.5.18
@sentry/nextjs: 10.55.0
Sentry setup:
withSentryConfig(...) is enabled in next.config.js
webpack.autoInstrumentServerFunctions: true is explicitly enabled
instrumentation.ts exists and imports sentry.server.config / sentry.edge.config
Sentry.init(...) is active on the server with tracesSampleRate > 0
- Server-side data is definitely reaching Sentry already (
http.server, middleware, and related spans are visible)
Important verification from our side:
- We inspected the compiled production output and confirmed that page handlers are wrapped with
wrapGetServerSidePropsWithSentry(...)
- So the build-time wrapping appears to be active
- However, we still see no
function.nextjs spans in Sentry
Steps to Reproduce
- Create or use a Next.js 15 Pages Router app.
- Install
@sentry/nextjs@10.x.
- Configure Sentry with:
withSentryConfig(...)
instrumentation.ts
- server tracing enabled
webpack.autoInstrumentServerFunctions: true
- Add one or more Pages Router routes using
getServerSideProps.
- Build/run the app and hit SSR pages.
- Inspect incoming spans/traces in Sentry and check the Slow SSR widget.
Expected Result
One of the following should happen consistently:
getServerSideProps instrumentation emits SSR spans recognizable by the Slow SSR widget, including function.nextjs if that is still the expected span op
or
- the documentation/widget behavior should clearly reflect the new span model if
function.nextjs is no longer expected in @sentry/nextjs v10
In short: a correctly instrumented Pages Router SSR app should populate the Slow SSR widget or have documented replacement behavior.
Actual Result
- Traces and server-side spans are sent successfully
http.server and other server spans are visible
function.nextjs spans never appear
- The Slow SSR widget remains empty
Additionally, after inspecting the installed SDK behavior, it appears that wrapGetServerSidePropsWithSentry(...) delegates to withTracedServerSideDataFetcher(...), and that helper seems to set metadata / transaction naming / trace propagation, but does not appear to create a dedicated SSR child span with op: "function.nextjs"
That matches what we see in Sentry:
- wrapping exists
- tracing exists
- but the widget-relevant SSR spans do not exist
Additional Context
This may be one of two things:
- A bug/regression in
@sentry/nextjs Pages Router SSR instrumentation for v10 / Next.js 15
or
- A mismatch between current SDK span behavior and the Slow SSR widget, which may still depend on an older span shape/op such as
function.nextjs
If function.nextjs is no longer intended in this SDK/version, could you clarify:
- what span(s) should replace it
- whether the Slow SSR widget supports that new model
- whether the docs should be updated for Pages Router SSR on modern Next.js / Sentry versions
Priority
No response
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
10.55.0
Framework Version
15.5.18
Link to Sentry event
No response
Reproduction Example/SDK Setup
We are using a Next.js Pages Router app with SSR via
getServerSidePropson many routes.Versions:
next:15.5.18@sentry/nextjs:10.55.0Sentry setup:
withSentryConfig(...)is enabled innext.config.jswebpack.autoInstrumentServerFunctions: trueis explicitly enabledinstrumentation.tsexists and importssentry.server.config/sentry.edge.configSentry.init(...)is active on the server withtracesSampleRate > 0http.server, middleware, and related spans are visible)Important verification from our side:
wrapGetServerSidePropsWithSentry(...)function.nextjsspans in SentrySteps to Reproduce
@sentry/nextjs@10.x.withSentryConfig(...)instrumentation.tswebpack.autoInstrumentServerFunctions: truegetServerSideProps.Expected Result
One of the following should happen consistently:
getServerSidePropsinstrumentation emits SSR spans recognizable by the Slow SSR widget, includingfunction.nextjsif that is still the expected span opor
function.nextjsis no longer expected in@sentry/nextjsv10In short: a correctly instrumented Pages Router SSR app should populate the Slow SSR widget or have documented replacement behavior.
Actual Result
http.serverand other server spans are visiblefunction.nextjsspans never appearAdditionally, after inspecting the installed SDK behavior, it appears that
wrapGetServerSidePropsWithSentry(...)delegates towithTracedServerSideDataFetcher(...), and that helper seems to set metadata / transaction naming / trace propagation, but does not appear to create a dedicated SSR child span withop: "function.nextjs"That matches what we see in Sentry:
Additional Context
This may be one of two things:
@sentry/nextjsPages Router SSR instrumentation for v10 / Next.js 15or
function.nextjsIf
function.nextjsis no longer intended in this SDK/version, could you clarify:Priority
No response