A startup CTO told me: 'Our Datadog bill hit $3,000/month. We were a team of 5. We switched to Axiom — same insights, $0/month on the free tier.'
What Axiom Offers for Free
Axiom free tier:
- 500 GB ingest/month — more than most paid tools
- 30 day retention
- Unlimited users
- Log management, tracing, and analytics
- APL (Axiom Processing Language) — powerful query language
- Dashboards and alerts
- OpenTelemetry native support
- Integrations: Vercel, Netlify, Cloudflare, GitHub
Quick Start
# Install CLI
brew install axiomhq/tap/axiom
# Login
axiom auth login
# Stream logs
echo '{"level":"info","message":"Hello Axiom"}' | axiom ingest my-dataset
# Query
axiom query 'my-dataset | where level == "error" | count'
Ingest Logs (REST API)
# Ingest JSON events
curl -X POST 'https://api.axiom.co/v1/datasets/my-logs/ingest' \
-H 'Authorization: Bearer xaat_YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '[
{"level": "info", "message": "User logged in", "userId": "123", "_time": "2026-03-29T10:00:00Z"},
{"level": "error", "message": "Payment failed", "userId": "456", "error": "insufficient_funds"}
]'
Node.js SDK
const { Axiom } = require('@axiomhq/js');
const axiom = new Axiom({ token: process.env.AXIOM_TOKEN });
// Ingest events
axiom.ingest('web-logs', [
{ level: 'info', path: '/api/users', method: 'GET', duration: 45, status: 200 },
{ level: 'warn', path: '/api/orders', method: 'POST', duration: 2300, status: 500, error: 'timeout' }
]);
await axiom.flush();
// Query
const result = await axiom.query(`
['web-logs']
| where level == 'error'
| summarize count() by bin(_time, 1h), path
| order by _time desc
`);
console.log(result.tables[0].events);
Express Middleware
const { Axiom } = require('@axiomhq/js');
const axiom = new Axiom({ token: process.env.AXIOM_TOKEN });
app.use((req, res, next) => {
const start = Date.now();
res.on('finish', () => {
axiom.ingest('api-logs', [{
method: req.method,
path: req.path,
status: res.statusCode,
duration: Date.now() - start,
userAgent: req.get('user-agent'),
ip: req.ip,
_time: new Date().toISOString()
}]);
});
next();
});
APL Queries (Powerful Analytics)
// Error rate by endpoint
['api-logs']
| where _time > ago(24h)
| summarize total = count(), errors = countif(status >= 500) by path
| extend error_rate = round(100.0 * errors / total, 2)
| order by error_rate desc
// P95 latency by hour
['api-logs']
| where _time > ago(7d)
| summarize p95 = percentile(duration, 95) by bin(_time, 1h)
// Top users by request volume
['api-logs']
| where _time > ago(1d)
| summarize requests = count() by userId
| top 10 by requests
Vercel Integration (Zero Config)
# Install Vercel integration from Axiom dashboard
# All Vercel logs automatically flow to Axiom
# Query them:
# ['vercel'] | where level == 'error' | take 10
Why Axiom Over Datadog/New Relic
| Axiom | Datadog |
|---|---|
| 500 GB free | 1 day retention free |
| Simple pricing | Complex per-host/per-metric |
| APL query language | DQL |
| OpenTelemetry native | Custom agent |
| No surprise bills | Bill shock common |
Need to monitor your scraping infrastructure? Check out my web scraping actors on Apify — managed scrapers with built-in logging.
Need custom observability? Email me at spinov001@gmail.com.
Top comments (0)