Skip to content

Feature Request: Support For Automatically Generating Breadcrumbs With Pino #4192

@souredoutlook

Description

@souredoutlook

Customer asking - wrote in with the following snippet for @sentry/node:

import { Router } from 'express'
import pino from 'pino'

const logger = pino({level: 'info'});

const object = {
  id: '123',
  name: 'My Object'
}

export const objectRouter = new Router({ mergeParams: true})

objectRouter.get('/', (req, res) => {
  const { id } = req.params

  console.log(`Fetching object:${id}`) // <-- this shows up as breadcrumb
  logger.info(`Fetching object:${id}`) // <-- this doesn't

Breadcrumbs from logging currently only support the 'console' module.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions