Axiom transport for Pino logger
This page explains how to send data from a Node.js app to Axiom through Pino.
Prerequisites
- Create an Axiom account.
- Create a dataset in Axiom where you send your data.
- Create an API token in Axiom with permissions to ingest data to the dataset you have created.
Install SDK
To install the SDK, run the following:
shell
Create Pino logger
The example below creates a Pino logger with Axiom configured. Set the edge option to the edge domain that matches the region your dataset lives in — see Configure region for the full list.
typescript
typescript
After setting up the Axiom transport for Pino, use the logger as usual:
javascript
Configure region
Set the edge option on the transport to the edge domain for your Axiom deployment.
| Edge deployment | Base domain for ingest and query |
|---|---|
| US East 1 (AWS) | us-east-1.aws.edge.axiom.co |
| EU Central 1 (AWS) | eu-central-1.aws.edge.axiom.co |
Transport options
| Option | Required | Description |
|---|---|---|
dataset | yes | The Axiom dataset to ingest logs into. |
token | yes | An Axiom API or personal token with ingest permission for the dataset. |
edge | no | Edge domain for ingest, without scheme. Example: eu-central-1.aws.edge.axiom.co. Use this to target a region. |
edgeUrl | no | Full edge URL (with scheme). Takes precedence over edge if both are set. Useful for self-hosted or proxy setups. |
url | no | Base URL for non-ingest API operations. Only needed if you call other Axiom APIs from the same client. |
Examples
For more examples, see the examples in GitHub.