Content-Length: 295300 | pFad | http://github.com/getsentry/sentry-javascript/issues/16725

DC `@sentry/nextjs` automatic `ai` instrumentation breaks `ai/rsc` · Issue #16725 · getsentry/sentry-javascript · GitHub
Skip to content

@sentry/nextjs automatic ai instrumentation breaks ai/rsc #16725

Open
@billyjanitsch

Description

@billyjanitsch

Is there an existing issue for this?

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.

cc @AbhiPrasad @mydea

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: http://github.com/getsentry/sentry-javascript/issues/16725

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy