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?
Self-hosted/on-premise
Which SDK are you using?
@sentry/nextjs
SDK Version
9.31.0
Framework Version
Next.js 15.3.3
Link to Sentry event
No response
Reproduction Example/SDK Setup
See https://github.com/billyjanitsch/sentry-nextjs-ai-bug for a minimal reproduction.
Steps to Reproduce
See repro readme.
Expected Result
In a server actions file, I expect to be able to import and use server exports from ai/rsc
:
"use server";
import { createStreamableValue } from "ai/rsc";
assert(typeof createStreamableValue === 'function')
This works fine in vanilla Next.js.
Actual Result
When Sentry's Next.js config is enabled, the above code breaks. ai/rsc
resolves to the client implementation instead of the server one, where createStreamableValue
is undefined.
This happens from 9.30.0
onwards, presumably because this version enabled automatic instrumentation of the ai
library.
Metadata
Metadata
Assignees
Type
Projects
Status