Connect Axiom with Unkey
Stream Unkey audit logs, key verifications, gateway HTTP requests, runtime logs, and rate-limit decisions to Axiom.
Unkey provides infrastructure for building and operating APIs. Connect Unkey with Axiom to send audit logs, key verifications, gateway HTTP requests, runtime logs, and rate-limit decisions to an Axiom dataset.
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.
Supported event streams
Each log drain sends one event stream. To send all five streams, create five drains. You can send them to the same Axiom dataset and use the stream field to distinguish them, or use a separate dataset for each stream.
| Stream | stream value | Events |
|---|---|---|
| Audit logs | audit_logs | Workspace actions, such as creating projects or changing configuration |
| Key verifications | key_verifications | API key verification results, including successful and rejected verifications |
| Gateway HTTP requests | gateway_requests | Recorded HTTP requests served through Unkey's gateway |
| Runtime logs | runtime_logs | Collected application output, including structured logs and multiline messages |
| Rate limits | ratelimits | Recorded API rate-limit decisions, including passed and blocked checks |
Set up an Axiom log drain
Create a log drain in your Unkey workspace.
- In the Unkey dashboard, select your workspace, and then go to Settings > Log Drains.
- Click Create Log Drain.
- Select Axiom as the destination.
- Enter a descriptive name for the log drain.
- In Stream, select Audit logs, Key verifications, Gateway HTTP requests, Runtime logs, or Rate limits.
- Optional: Configure stream filters to limit which events Unkey sends.
- Enter the name of your Axiom dataset and your Axiom API token.
- Click Create Log Drain.
- Repeat these steps for each additional stream you want to send.
Drains start at creation time. Historical backfill isn't supported. Unkey sends events asynchronously in batches, so events can take several minutes to appear in Axiom.
Explore your Unkey events
After you create a drain, open the Stream tab in Axiom to verify that events arrive in your dataset. Filter by stream to inspect an event type.
Each event includes _time, when it occurred, and stream, its event type.
Audit logs
The audit_logs stream records who performed a workspace action and which resources it affected.
See Unkey audit log event types for the complete list of actions.
Key verifications
The key_verifications stream records API key verification outcomes.
See Unkey key verification payloads for field details.
Gateway HTTP requests
The gateway_requests stream records gateway request metadata, response status, latency, and captured request details.
Captured details follow your Unkey logging policy. See Unkey gateway request payloads for field details and capture limits.
Runtime logs
The runtime_logs stream forwards collected application output, including multiline messages and nested structured attributes.
See Unkey runtime log payloads for field details and handling of application output.
Rate limits
The ratelimits stream exports recorded decisions from ratelimit.limit and ratelimit.multiLimit. These are rate-limit checks, not audit events for configuration changes.
See Unkey rate-limit payloads for field details and which decisions are recorded.
Delivery and troubleshooting
For delivery status, retention, retries, and troubleshooting, see the Unkey log drain documentation.