-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
10.19.0
Framework Version
Next 15.5.4
Link to Sentry event
No response
Reproduction Example/SDK Setup
// This file configures the initialization of Sentry on the server.
// The config you add here will be used whenever the server handles a request.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import * as Sentry from '@sentry/nextjs';
Sentry.init({
dsn: opt.dsn,
// Tag data with the appropriate environment
environment: process.env.NEXT_PUBLIC_APP_ENV || process.env.NODE_ENV,
enabled: process.env.NODE_ENV === 'production',
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
tracesSampleRate: 1,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
// Enable logs capture
enableLogs: true,
// Integrate with Pino logger
integrations: [Sentry.pinoIntegration()],
});
Here's how I setup my pino logger:
import { pino } from 'pino';
export const logger = pino({
level: process.env.LOG_LEVEL || 'info',
});
Steps to Reproduce
My impression of the docs is that setting up my sentry config like shown is all that's needed to get logs to automatically flow.
This is not happening as far as I can tell, from any environment.
If I use Sentry.logger.error I do see logs showing up in the sentry dashboard, so the logging functionality in general seems to be working. As far as I can tell it's the pino integration piece that's not working.
Expected Result
My expectation is that all logs from my pino logger will automatically get sent to sentry.
Actual Result
I don't see anything in the sentry dashboard Logs page unless i manually call Sentry.logger.error (or some other variant).
Additional Context
Tip: React with π to help prioritize this issue. Please use comments to provide useful context, avoiding +1
or me too
, to help us triage it.
Metadata
Metadata
Assignees
Projects
Status