Ingest overview
Gate routes, auth, limits, acknowledgements and timestamp rules.
On this page
What the gate accepts#
| Item | Fact |
|---|---|
| Listen | DRILLO_LISTEN, default 0.0.0.0:4318. Plain HTTP/1.1. |
| Auth | Authorization: Bearer <TOKEN>. Tenant comes from the token (DRILLO_GATE_TOKENS), never from the payload. |
| Routes | POST /v1/logs (NDJSON), POST /v1/otlp/logs (OTLP/HTTP JSON or protobuf), POST /loki/api/v1/push (Loki push, JSON or protobuf, 204 on success), POST /v1/markers, GET /ready (unauthenticated probe) |
| Stream | Optional header X-Drillo-Stream. Default default, characters [A-Za-z0-9._-]{1,64}, else 400. At most DRILLO_MAX_STREAMS_PER_TOKEN (default 64) names per token. A new name beyond that gets 429. |
| Encoding | Content-Encoding: gzip on all routes, snappy for Loki protobuf. Decoded size is capped by DRILLO_GATE_MAX_DECODED (default 64 MiB). zstd is not accepted. |
| NDJSON fields | ts, level, service, host, msg, attrs{}, log_type |
| Body | Content-Length or Transfer-Encoding: chunked. Expect: 100-continue is answered. Auth is checked before the body is read. Up to 64 MiB. |
| Ack | 200 only after WAL fsync. 429 plus Retry-After: 1 on WAL quota, ENOSPC or in-flight cap. 401 bad token. 400 bad JSON. |
Example#
curl -sS -X POST http://gate.internal:4318/v1/logs \
-H "Authorization: Bearer <TOKEN>" \
-H "X-Drillo-Stream: app1-web" \
--data-binary '{"ts":1767225600000,"level":"error","service":"pay-api","host":"app1","msg":"db timeout after 30s"}'Timestamp and level pitfalls#
tsmust be a JSON number in epoch milliseconds (a value above 1e15 is read as nanoseconds) or a numeric string.- RFC3339 strings are not parsed. The event silently gets the receive time.
- Epoch seconds are read as milliseconds and land in 1970.
- Record keys other than the seven NDJSON fields are ignored. Put extra values under
attrsas flat string values.
Delivery#
The completeness proof starts at the gate's 200. See Concepts. Keep shipper retry and buffering enabled.
OpenTelemetry (OTLP) field aliases#
OTLP logs keep their original attributes. The gate also writes the Drillo keys, and CQL accepts either name. Nothing is renamed in storage except enduser.id, which is moved to user so it is always tokenised (HMAC) before storage. user.email and other values go through the normal masking pass.
| OTel / OTLP name | Drillo field | Notes |
|---|---|---|
severityText / severityNumber | level (severity_text in CQL), severity_number attr | Number maps 1-4 trace, 5-8 debug, 9-12 info, 13-16 warn, 17-20 error, 21-24 fatal when text is empty |
traceId, spanId | trace_id, span_id attrs | searchable, trace_id is indexed |
http.response.status_code, http.status_code | http_status | |
url.path | http_path | |
http.request.method | attr http.request.method | no materialised column |
service.name, host.name | service, host | resource attributes |
enduser.id | user / user_tok | tokenised, original dropped |
Level normalisation: WARN, warning, W become warn; err, critical, E become error; panic, F become fatal; unknown values become info with the original in level_raw.
Report an inaccuracy (opens a support ticket in the portal; nothing is sent from this page)