request.method, context.requestId, your custom context — is queryable as-is with APL.
Setup
- Create a dataset in the Axiom console.
- Generate an API token with ingest permission for that dataset.
- Set the environment variables:
- Wire the transport:
- Trigger a request and query the dataset in Axiom.
Environment Variables
Options
Options passed tocreateAxiomTransport() override environment variables:
Plus the shared batching options:
maxBatchSize, flushIntervalMs, timeout, retries — see the overview.
Payload
Each log becomes one event inPOST /v1/datasets/{dataset}/ingest:
['your-dataset'] | where level == "ERROR" and durationMs > 1000.
Troubleshooting
401— the token is invalid or expired; generate a new one in Axiom settings.403with a personal access token — setAXIOM_ORG_ID(personal tokens are not scoped to an organization).- Nothing arrives — logs flush in batches (2 s by default); check that the process lived long enough, or call
flush()before exit.