Skip to content

Next.js SDK not injected in dev mode #6321

Description

@larsqa

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/nextjs

SDK Version

7.21.0

Framework Version

Next.js v12.3.0

Link to Sentry event

No response

Steps to Reproduce

In a sentry.server.config.js, use the beforeSend:

Sentry.init({
...
beforeSend(event){console.log("SENTRY EVENT");returnevent;},});

Expected Result

The console log of "SENTRY EVENT" doesn't show up in the terminal.
Using the same method in a sentry.client.config.js does, however, trigger the console log in the browser's console.

Actual Result

I'm uncertain if this is intended or neglected. It seems that the client and server use different config SDK's.
I was only able to find the type definition of beforeSend in the client config, not server config.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions