Skip to content

Conversation

chargome
Copy link
Member

@chargome chargome commented Jul 30, 2025

closes https://linear.app/getsentry/issue/JS-783/nextjs-no-data-being-sent-from-server-side-functions
closes #17193

This will not fix this issue for prod deployments with turbopack as we do not have any build time instrumentation for route handlers there yet. In this case the current suggestion is to use:

import { after} from 'next/server';
import * as Sentry from '@sentry/nextjs';

export function GET() {
    after(() => {
        Sentry.flush();
    });
    // rest of your handler
}

@chargome chargome self-assigned this Jul 30, 2025
@linear
Copy link

linear bot commented Jul 30, 2025

@chargome chargome requested review from RulaKhaled and s1gr1d July 30, 2025 10:23
@chargome chargome enabled auto-merge (squash) July 30, 2025 10:27
@chargome chargome merged commit b9849a2 into develop Jul 30, 2025
61 checks passed
@chargome chargome deleted the cg-nextjs-after branch July 30, 2025 10:39
chargome added a commit that referenced this pull request Jul 31, 2025
chargome added a commit that referenced this pull request Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NextJS] No data being sent from server-side functions

2 participants