Ingest overview

Gate routes, auth, limits, acknowledgements and timestamp rules.

On this page

What the gate accepts#

ItemFact
ListenDRILLO_LISTEN, default 0.0.0.0:4318. Plain HTTP/1.1.
AuthAuthorization: Bearer <TOKEN>. Tenant comes from the token (DRILLO_GATE_TOKENS), never from the payload.
RoutesPOST /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)
StreamOptional 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.
EncodingContent-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 fieldsts, level, service, host, msg, attrs{}, log_type
BodyContent-Length or Transfer-Encoding: chunked. Expect: 100-continue is answered. Auth is checked before the body is read. Up to 64 MiB.
Ack200 only after WAL fsync. 429 plus Retry-After: 1 on WAL quota, ENOSPC or in-flight cap. 401 bad token. 400 bad JSON.

Example#

sh
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#

  • ts must 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 attrs as 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 nameDrillo fieldNotes
severityText / severityNumberlevel (severity_text in CQL), severity_number attrNumber maps 1-4 trace, 5-8 debug, 9-12 info, 13-16 warn, 17-20 error, 21-24 fatal when text is empty
traceId, spanIdtrace_id, span_id attrssearchable, trace_id is indexed
http.response.status_code, http.status_codehttp_status
url.pathhttp_path
http.request.methodattr http.request.methodno materialised column
service.name, host.nameservice, hostresource attributes
enduser.iduser / user_toktokenised, 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)