Backend: Error Monitoring
Go
Java
JS
Python
Ruby
Backend: Logging
Go
JS
Python
Ruby
Java
Hosting Providers
Backend: Tracing
Go
Node.js
Native OpenTelemetry
Fullstack Frameworks
Overview
Self Host & Local Dev
Menu
Logging in Pino.js
Learn how to set up highlight.io log ingestion for Pino.JS.
1
Set up your frontend highlight.io integration.
First, make sure you've followed the frontend getting started guide.
2
Install the relevant Highlight SDK(s).
Install @highlight-run/pino with your package manager.
# with npm
npm install --save @highlight-run/pino
# with yarn
yarn add @highlight-run/pino
# with pnpm
pnpm add @highlight-run/pino
3
Setup the Pino HTTP transport.
The Pino HTTP transport will send JSON logs to highlight.io. Make sure to set the project
and service
query string parameters.
import pino from 'pino'
const logger = pino({
level: 'info',
transport: {
targets: [
{
target: '@highlight-run/pino',
options: {
projectID: '<YOUR_PROJECT_ID>',
},
level: 'info',
},
],
},
})
logger.info({ key: 'my-value' }, 'hello, highlight.io!')
4
Verify your backend logs are being recorded.
Visit the highlight logs portal and check that backend logs are coming in.