#Pino integration Error vs Log configuration

2 messages · Page 1 of 1 (latest)

tacit tulip
#

I want to configure to capture errors logged by pino as sentry errors, not logs.

Do I still need to enableLogs: true?

And does that require the logs service, ie not available on free tier?

My assumption that as long as I am just doing Sentry.pinoIntegration({ error: { levels: ['warn', 'error', 'fatal'] } }), and not Sentry.pinoIntegration({ log: { levels: ['warn', 'error', 'fatal'] } }), then they count as events and not logs.

late crescent
#

the SDK options are not tied to a plan, you have access to logs and errors on all current plans, including the free plan.
setting Sentry.pinoIntegration({ error: { levels: ['warn', 'error', 'fatal'] } }) will make the SDK send pino logs as error events and you dont need the enableLogs option