Skip to content

Support for Logs in Next.js Edge Runtime #16151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AbhiPrasad opened this issue Apr 28, 2025 · 0 comments · Fixed by #16166
Closed

Support for Logs in Next.js Edge Runtime #16151

AbhiPrasad opened this issue Apr 28, 2025 · 0 comments · Fixed by #16166
Assignees
Labels

Comments

@AbhiPrasad
Copy link
Member

Hey team Sentry. Promising product evolution for sure, we are eager to try to integrating our logs with our error reporting. We've been added to the pilot, upgraded to @sentry/[email protected] and @sentry/[email protected] and added import * as Sentry from '@sentry/nextjs' to our central logging lib.

Now when we start the Next.js (15.2.3) frontend, we get an error Export logger doesn't exist in target module. I've traced this down to an import of Sentry.logger in our middleware.ts, where we log each incoming request. I'm slightly puzzled, as I assumed this code is only used server-side, but it looks like it's somehow imported into the clientside bundle at least in development.

Anything I should be trying differently? Here's a minimal repro: https://github.com/stefnnn/next-turbo-middleware

Originally posted by @stefnnn in #15916 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant