Logs
Send structured logs over HTTP, parse them with pipelines, search and watch them live.
Send logs
Logs are sent over HTTPS as JSON, one entry or up to 1,000 entries per request. Create a key with only write logs under Settings › API keys (preset Log ingestion).
curl -X POST https://api.vitalrix.com/api/v1/logs \
-H "x-api-key: $VITALRIX_API_KEY" \
-H "content-type: application/json" \
-d '{"logs":[{"level":"error","service":"my-shop","environment":"production","message":"card declined","traceId":"5b8efff798038103d269b633813fc60c","metadata":{"orderId":"o_123"}}]}'
# {"success":true,"data":{"accepted":1}}The VitalRix packages for Node.js, Python, Go, Ruby and PHP send your logs for you, linked to the request's trace. Any OpenTelemetry SDK can also send OTLP logs (protobuf or JSON) to https://api.vitalrix.com/api/v1/logs/otlp/v1/logs.
Fields
| Field | Rules |
|---|---|
message | Required. Up to 32 KB. |
level | debug, info, warn, error or fatal. Common aliases such as warning, critical and pino's numbers are understood. Default info. |
service | The service name. Use your application’s slug to link logs to it. |
environment | Default production. |
timestamp | ISO 8601 or milliseconds since epoch. Default: when received. Up to 366 days old, at most 24 hours ahead. |
traceId | The OpenTelemetry trace id (32 hex characters) to link the line to its trace. |
requestId, spanId | Free text, up to 128 characters. |
metadata | Any JSON object up to 16 KB. Searchable by key. |
Search
The Logs page searches the message text and filters by level, service, environment, trace id, request id and metadata values (orderId=o_123). Every filter is part of the page address, so you can bookmark a search or share it with a colleague.
- Click a line to see its metadata, copy it, open its trace, or filter by its trace or request id.
- Load older pages as far back as your retention goes.
- An incident links here with the right service and time window already filled in.
Live tail
Switch on Live tail to watch new lines arrive as they are sent, with your filters applied. Pause freezes the view while new lines are counted, so you can read without losing your place.
Reading logs from an AI agent
An AI agent connected through MCP can read your logs: summarize_logs gives lines per service, level and environment and the most common message patterns for a window up to 30 days, and search_logs pages through every matching line (filters, a date range and a cursor). Secrets in log lines are masked before the agent sees them.
Limits and retention
- Up to 1,000 entries and 5 MB per request.
- Up to 100,000 entries per minute per organization. Above that, requests get 429 with the number of seconds to wait.
- How many lines per day and how long they are kept depend on your plan. See Plans and limits.
Something unclear or missing? Open VitalRix and use the in-app setup guides, or read Troubleshooting.