Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs->add appsignal pino transport #2065

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions docs/transports.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ In case you want to both use a custom transport, and output the log entries with
},
{
target: 'my-custom-transport',
options: { someParameter: true }
options: { someParameter: true }
}
]

Expand Down Expand Up @@ -423,6 +423,7 @@ PRs to this document are welcome for any new transports!

### Pino v7+ Compatible

+ [@appsignal/nodejs pino](#@appsignal/nodejs-pino)
+ [@axiomhq/pino](#@axiomhq/pino)
+ [@logtail/pino](#@logtail/pino)
+ [@macfja/pino-fingers-crossed](#macfja-pino-fingers-crossed)
Expand Down Expand Up @@ -467,6 +468,22 @@ PRs to this document are welcome for any new transports!
+ [pino-syslog](#pino-syslog)
+ [pino-websocket](#pino-websocket)

<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.

```javascript
import pino from 'pino';
import { Appsignal, AppsignalPinoTransport } from '@appsignal/nodejs';
luismiramirez marked this conversation as resolved.
Show resolved Hide resolved

const logger = pino({
AppsignalPinoTransport({
client: Appsignal.client,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this would work with pino-transport

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you provide more info about how it wouldn't work with pino-transport please? I'm trying to find some info about it, but I haven't found anything.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mcollina! Now it's compatible with pino-transport. I've updated the PR.

group: "optional-group-name",
})
});
```

<a id="@axiomhq/pino"></a>
### @axiomhq/pino
Expand Down Expand Up @@ -575,9 +592,9 @@ const pino = require('pino')
const transport = pino.transport({
target: 'pino-axiom',
options: {
orgId: 'YOUR-ORG-ID',
token: 'YOUR-TOKEN',
dataset: 'YOUR-DATASET',
orgId: 'YOUR-ORG-ID',
token: 'YOUR-TOKEN',
dataset: 'YOUR-DATASET',
},
})
pino(transport)
Expand Down Expand Up @@ -697,7 +714,7 @@ https://github.com/deviantony/docker-elk to setup an ELK stack.
<a id="pino-discord-webhook"></a>
### pino-discord-webhook

[pino-discord-webhook](https://github.com/fabulousgk/pino-discord-webhook) is a Pino v7+ compatible transport to forward log events to a [Discord](http://discord.com) webhook from a dedicated worker.
[pino-discord-webhook](https://github.com/fabulousgk/pino-discord-webhook) is a Pino v7+ compatible transport to forward log events to a [Discord](http://discord.com) webhook from a dedicated worker.

```js
import pino from 'pino'
Expand Down Expand Up @@ -1117,7 +1134,7 @@ Example output for the "hello world" log:
<a id="pino-telegram-webhook"></a>
### pino-telegram-webhook

[pino-telegram-webhook](https://github.com/Jhon-Mosk/pino-telegram-webhook) is a Pino v7+ transport for sending messages to [Telegram](https://telegram.org/).
[pino-telegram-webhook](https://github.com/Jhon-Mosk/pino-telegram-webhook) is a Pino v7+ transport for sending messages to [Telegram](https://telegram.org/).

```js
const pino = require('pino');
Expand Down