API reference
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).
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.
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 2 GB, Team 8 GB, Scale 12 GB; retention 3, 7, 14, 14 days.
- 300 requests a minute per key, shared with events and spans.
- 409 when the data comes from a different platform than the project's, for example {"error": "This project is for iOS. Create a separate Android project in Blipit and use its key.", "reason": "platform_mismatch", "project_platform": "ios", "sent_platform": "android"}. Events, sessions, logs, OTLP traces and metrics, bug reports, replays and web vitals all answer this way. Refused data is not stored and does not count against the quota. The Blipit SDKs log this error once and stop sending for the rest of the run. To fix it, create a project for that platform and use its key.
Stuck? Email support@blipit.io. Keys and the project id for each project are under API keys in app.blipit.io.