From af75f90ee4ede8d6746cfbed4eec0af59f97141e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luismi=20Rami=CC=81rez?= Date: Fri, 18 Oct 2024 12:34:11 +0200 Subject: [PATCH] docs->make AppSignal transport example .cjs --- docs/transports.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/transports.md b/docs/transports.md index 33234be2c..9f92eddb5 100644 --- a/docs/transports.md +++ b/docs/transports.md @@ -471,17 +471,18 @@ PRs to this document are welcome for any new transports! ### @appsignal/nodejs -[@appsignal/nodejs](https://www.npmjs.com/package/@appsignal/nodejs) [`AppsignalPinoTransport`](https://github.com/appsignal/appsignal-nodejs/blob/0fffae87ebe269bb86b6adafba23388ecb802979/src/pino_transport.ts) is the official [AppSignal](https://appsignal.com/) transport for Pino. +[@appsignal/nodejs](https://www.npmjs.com/package/@appsignal/nodejs) [`AppsignalPinoTransport`](https://github.com/appsignal/appsignal-nodejs/blob/337eed9b72194f9500a685410fbfc9197c4db911/src/pino_transport.ts) is the official [AppSignal](https://appsignal.com/) transport for Pino. ```javascript -import pino from 'pino'; -import { Appsignal, AppsignalPinoTransport } from '@appsignal/nodejs'; +const pino = require('pino'); -const logger = pino({ - AppsignalPinoTransport({ - client: Appsignal.client, - group: "optional-group-name", - }) +pino({ + transport: { + target: "@appsignal/nodejs/pino", + options: { + group: "optional-grou-name", + } + } }); ```