Logs

Endpoint POST /api/v1/logs and POST /v1/logs

Two endpoints write to the same table: Blipit's own JSON format and the OpenTelemetry logs endpoint. Both accept either key and are limited per request, per minute and per month.

1Blipit format

X-Blipit-Key or Authorization: Bearer, public or secret. Body: a JSON array, a single object, or NDJSON; up to 1,000 lines and 1 MB after gzip, deflate or brotli is undone. Per line: message (required, cut at 8 KB; msg is accepted too), level (trace, debug, info, warn, error, fatal; missing is info), timestamp (ISO or epoch, clamped to one day back and five minutes ahead), service, environment, trace_id, attributes (flat object, up to 50 string, number or boolean values).

sh
curl https://in.blipit.io/api/v1/logs \
  -H "Content-Type: application/json" -H "X-Blipit-Key: <secret key>" \
  -d '[{"level":"error","message":"payment declined","service":"api","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","attributes":{"order_id":42,"gateway":"stripe"}}]'

2Responses

202 {accepted: true, stored, rejected, errors}: bad lines are skipped and named. 202 {accepted: false, reason: 'log quota reached'} once the month's allowance is used. 400 when the body is not JSON or no line is valid. 413 when the body or line count is over the limit. 401 unknown key.

3OTLP

POST /v1/logs with the same headers and OTLP/HTTP JSON (protobuf gets 415). Resource attributes service.name and deployment.environment become service and environment; severity numbers map to the six levels. Answers 200 {} or {partialSuccess: {rejectedLogRecords, errorMessage}}, also when the quota is reached.

ini
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://in.blipit.io/v1/logs
OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=http/json
OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-blipit-key=<secret key>

Good to know

  • Allowance per month by stored bytes: Free 1 GB, Solo 5 GB, Team 20 GB, Scale 100 GB; retention 3, 14, 30, 30 days.
  • 300 requests a minute per key, shared with events and spans.

Stuck? Email support@blipit.io. Keys and the exact DSN for each project are under API keys in app.blipit.io.