Automated summary
Gives practical guidance for Axiom, the serverless log management and analytics platform: event ingestion, APL queries, dashboards, and alerts.
Strengths
- Copy-ready ingestion examples using the @axiomhq/js SDK and the Pino transport
- A cookbook of real APL queries (error rate, P95 latency, top errors, revenue by region, active users)
- A dedicated Vercel/Next.js setup using instrumentation.ts and next-axiom
Limitations
- The file is truncated: the Next.js API route example cuts off mid-code
- Dashboards and alerts are promised in the description but no example covers them
- Ingestion is only shown in TypeScript/JavaScript, with no equivalent for other languages or sources
Use it when wiring Axiom logging into a Node/Next.js app or writing APL queries to analyze logs.
Skip it if you need a different observability stack or ingestion guidance for non-JavaScript sources.
Security analysis
SafeThe skill is pure documentation: it shows TypeScript/APL/bash snippets for ingesting logs and querying Axiom, all using standard official SDKs (@axiomhq/js, pino, next-axiom, axiom CLI). No destructive commands, no credential exfiltration, no obfuscated payloads, and no instruction to disable safety controls. Tokens are read from process.env as expected practice. The only executable content is routine package-manager installs (brew/npm/pip), which carry no meaningful risk.
No concerns found
How this analysis is madeExamples
Add Axiom logging to my Next.js API routes with next-axiom, and make sure failed payment events are logged as structured errors with the orderId and stripe_code.Write an APL query against my api-logs dataset that returns P95 and average duration_ms per endpoint over the last 6 hours, sorted by P95 descending.Configure Pino to ship structured logs to the Axiom dataset api-logs using the AXIOM_TOKEN environment variable, and show how to flush before process exit.name: axiom description: Expert guidance for Axiom, the serverless log management and analytics platform that stores and queries unlimited data at fixed cost. Helps developers ingest logs, traces, and events from any source, query them with APL (Axiom Processing Language), build dashboards, and set up alerts — all without managing infrastructure or worrying about per-GB pricing. license: Apache-2.0 compatibility: No special requirements metadata: author: terminal-skills version: 1.0.0 category: devops tags:
- logging
- analytics
- serverless
- observability
- s3
Axiom — Serverless Log Analytics
Overview
Axiom, the serverless log management and analytics platform that stores and queries unlimited data at fixed cost. Helps developers ingest logs, traces, and events from any source, query them with APL (Axiom Processing Language), build dashboards, and set up alerts — all without managing infrastructure or worrying about per-GB pricing.
Instructions
Ingestion
// Send logs via HTTP API
import Axiom from "@axiomhq/js";
const axiom = new Axiom({ token: process.env.AXIOM_TOKEN! });
// Ingest events (batched automatically)
await axiom.ingest("api-logs", [
{
level: "info",
message: "Order processed",
orderId: "ord_abc123",
userId: "usr_456",
amount: 99.99,
duration_ms: 245,
region: "us-east-1",
_time: new Date().toISOString(), // Optional: Axiom auto-sets if missing
},
{
level: "error",
message: "Payment failed",
orderId: "ord_def789",
error: "Card declined",
stripe_code: "card_declined",
duration_ms: 1200,
},
]);
// Flush before process exit
await axiom.flush();
// Structured logging with Pino → Axiom transport
import pino from "pino";
const logger = pino({
transport: {
target: "@axiomhq/pino",
options: {
dataset: "api-logs",
token: process.env.AXIOM_TOKEN,
},
},
});
logger.info({ orderId: "ord_123", userId: "usr_456", amount: 99.99 }, "Order created");
logger.error({ orderId: "ord_123", error: "timeout" }, "Payment processing timeout");
APL Queries (Axiom Processing Language)
// APL is based on Kusto Query Language (KQL) — same as Azure Data Explorer
// Error rate over time (5-minute buckets)
['api-logs']
| where level == "error"
| summarize errors = count() by bin(_time, 5m)
| order by _time asc
// P95 latency per endpoint
['api-logs']
| where isnotnull(duration_ms)
| summarize p95 = percentile(duration_ms, 95), avg_ms = avg(duration_ms), count = count()
by endpoint
| order by p95 desc
// Top errors in the last hour
['api-logs']
| where _time > ago(1h) and level == "error"
| summarize count = count() by message, error
| order by count desc
| take 10
// Revenue by region (last 24h)
['api-logs']
| where _time > ago(24h) and message == "Order processed"
| summarize total_revenue = sum(amount), orders = count() by region
| order by total_revenue desc
// Slow requests (> 1s) with user context
['api-logs']
| where duration_ms > 1000
| project _time, endpoint, duration_ms, userId, orderId
| order by duration_ms desc
| take 20
// Unique active users per hour
['api-logs']
| where isnotnull(userId)
| summarize active_users = dcount(userId) by bin(_time, 1h)
Vercel / Next.js Integration
// next.config.js — Send Vercel logs to Axiom automatically
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
instrumentationHook: true,
},
};
module.exports = nextConfig;
// instrumentation.ts — Axiom + Vercel integration
export async function register() {
if (process.env.NEXT_RUNTIME === "nodejs") {
const { AxiomWebVitals } = await import("@axiomhq/web-vitals");
// Auto-captures Web Vitals, server-side logs, and API route traces
}
}
// app/api/route.ts — Structured logging in API routes
import { withAxiom, AxiomRequest } from "next-axiom";
export const POST = withAxiom(async (req: AxiomRequest) => {
req.log.info("Processing webhook", { source: "stripe" });
try {
const body = await req.json();
await processWebhook(body);
req.log.info("Webhook processed", { eventType: body.type });
return Response.json({ ok: true });
} catch (error) {
req.log.error("Webhook failed", { error: error.message });
return Response.json({ error: "Failed" }, { status: 500 });
}
});
CLI Queries
# Install CLI
brew install axiomhq/tap/axiom
# Authenticate
axiom auth login
# Query from terminal
axiom query "['api-logs'] | where level == 'error' | take 10" -f json
# Stream logs in real-time (like tail -f)
axiom stream api-logs
# Ingest from file
cat access.log | axiom ingest nginx-logs
# Ingest from pipe
docker logs my-container 2>&1 | axiom ingest docker-logs
Monitors and Alerts
# Axiom Monitors — alert on query results
# Configure in UI or via Terraform provider
# Example: Error spike alert
# Query: ['api-logs'] | where level == 'error' | summarize count() by bin(_time, 5m)
# Condition: count > 100 in any 5-minute window
# Notify: Slack #alerts channel
# Example: Zero orders alert (business metric)
# Query: ['api-logs'] | where message == 'Order processed' | summarize count() by bin(_time, 15m)
# Condition: count == 0 for 15 minutes
# Notify: PagerDuty
Installation
# CLI
brew install axiomhq/tap/axiom
# Node.js SDK
npm install @axiomhq/js
# Pino transport
npm install @axiomhq/pino
# Next.js integration
npm install next-axiom
# Python
pip install axiom-py
Examples
Example 1: Setting up Axiom for a microservices project
User request:
I have a Node.js API and a React frontend running in Docker. Set up Axiom for monitoring/deployment.
The agent creates the necessary configuration files based on patterns like # Install CLI, sets up the integration with the existing Docker setup, configures appropriate defaults for a Node.js + React stack, and provides verification commands to confirm everything is working.
Example 2: Troubleshooting apl queries issues
User request:
Axiom is showing errors in our apl queries. Here are the logs: [error output]
The agent analyzes the error output, identifies the root cause by cross-referencing with common Axiom issues, applies the fix (updating configuration, adjusting resource limits, or correcting syntax), and verifies the resolution with appropriate health checks.
Guidelines
- Datasets as logical groups — Create separate datasets for different log types (api-logs, frontend-events, infra-metrics); each has its own retention and access controls
- Structured over unstructured — Send JSON objects, not plain text; structured fields enable filtering, aggregation, and dashboards
- APL for power queries — Learn APL basics (where, summarize, project, join); it's far more powerful than regex-based log search
- Vercel integration — If on Vercel, use
next-axiomfor zero-config logging; Web Vitals, API traces, and server logs flow automatically - Stream for debugging — Use
axiom streamin terminal for real-time log tailing; faster than switching to a browser - Fixed pricing model — Axiom charges per time (not per GB); ingest as much as you want without worrying about cost spikes
- Annotations for deploys — Mark deployments as annotations in Axiom; correlate performance changes with releases
- Monitors on business metrics — Don't just monitor errors; monitor business KPIs (orders, signups, revenue) and alert when they drop
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/axiom-serverless-log-analytics-mrzxuqmi/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/axiom-serverless-log-analytics-mrzxuqmi' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/axiom-serverless-log-analytics-mrzxuqmi/download' --output '.skill-downloads/axiom-serverless-log-analytics-mrzxuqmi/SKILL.md.part' && mv '.skill-downloads/axiom-serverless-log-analytics-mrzxuqmi/SKILL.md.part' '.skill-downloads/axiom-serverless-log-analytics-mrzxuqmi/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Environment declared by the author: No special requirements
Original excerpt: Installation
# CLI
brew install axiomhq/tap/axiom
# Node.js SDK
npm install @axiomhq/js
# Pino transport
npm install @axiomhq/pino
# Next.js integration
npm install next-axiom
# Python
pip install axiom-py
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/axiom-serverless-log-analytics-mrzxuqmi/SKILL.md' && test -s '.skill-downloads/axiom-serverless-log-analytics-mrzxuqmi/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/axiom' && cp -R '.skill-downloads/axiom-serverless-log-analytics-mrzxuqmi' '.claude/skills/axiom'Cursor
test -f '.skill-downloads/axiom-serverless-log-analytics-mrzxuqmi/SKILL.md' && test -s '.skill-downloads/axiom-serverless-log-analytics-mrzxuqmi/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/axiom' && cp -R '.skill-downloads/axiom-serverless-log-analytics-mrzxuqmi' '.cursor/skills/axiom'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/axiom-serverless-log-analytics-mrzxuqmi'openskills read 'axiom-serverless-log-analytics-mrzxuqmi'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/axiom-serverless-log-analytics-mrzxuqmi/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Configure a Chat Channel with SecretRefs
DevOps
Set up chat channels using non-interactive commands, with secrets only as SecretRefs. Covers gather, mutate, repair, and prove steps for reliable delivery.
Investigate ClickHouse CI Failures
DevOps
Investigate a ClickHouse CI failure end-to-end from a PR or S3 report URL. Fetches failed tests, classifies flaky vs real regression, and checks for existing issues/fixes.
Ansible PR Review
DevOps
Reviews an Ansible PR following the project's standardized process, including changelog checks, test coverage validation, and feedback tracking.