Skip to content

Commit

Permalink
docs->make AppSignal transport example .cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
luismiramirez committed Nov 22, 2024
1 parent f11ec0b commit af75f90
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions docs/transports.md
Original file line number Diff line number Diff line change
Expand Up @@ -471,17 +471,18 @@ PRs to this document are welcome for any new transports!
<a id="@appsignal/nodejs-pino"></a>
### @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",
}
}
});
```
Expand Down

0 comments on commit af75f90

Please sign in to comment.