Oriondocs
Get started
Docs›Guides›Send logs

Send logs

Any app can send product logs: a plain message, JSON, or OpenTelemetry. There is no required schema.

6 min readNeeds an ingest key

Get an ingest key

Create an app
In the Console, open Settings, Apps, and create one for your service.
Create an ingest key
It looks like orion_ik_..., is shown once, and can only write logs for that app.
Rotating. Create a second key, deploy it, then revoke the old one.

Send a log

Pick the way your app already speaks. A 202 response means queued, and entries are searchable within about a second.

curl -X POST "$ORION_URL/v1/ingest/logs" \
  -H "Authorization: Bearer $ORION_INGEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{"severity":"error","event":"payment.failed",
       "body":"payment failed for order 8841",
       "attributes":{"order_id":8841,"currency":"EUR"}}'
printf '%s\n' '{"body":"job started"}' '{"body":"job finished"}' |
curl -X POST "$ORION_URL/v1/ingest/logs" \
  -H "Authorization: Bearer $ORION_INGEST_KEY" \
  -H "Content-Type: application/x-ndjson" --data-binary @-
export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT="$ORION_URL/v1/ingest/otlp/v1/logs"
export OTEL_EXPORTER_OTLP_LOGS_HEADERS="Authorization=Bearer $ORION_INGEST_KEY"
export OTEL_EXPORTER_OTLP_LOGS_PROTOCOL="http/json"
export OTEL_SERVICE_NAME="checkout-api"

The entry format

Every field is optional, but an entry needs a body or an event. Unknown fields are stored as attributes.

FieldTypeMeaning
bodystring or JSONThe message. Structured bodies are searchable as text.
eventstringA short stable name such as payment.failed.
severitystring or numbertrace to fatal. Also accepts OpenTelemetry numbers.
attributesobjectAnything, any shape. Depth 8, 128 keys.
idstringYour own id. Re-sending the same id is ignored, so retries are safe.

Limits and responses

StatusMeaningWhat to do
202Accepted. Check rejected for per-entry problems.Nothing.
401Missing, wrong or revoked ingest key.Check the key.
413Request too large. 1 MiB JSON, 5 MiB NDJSON.Send smaller batches.
429Rate limit or queue full. Has Retry-After.Wait, then retry the same batch.
5xxOrion is unavailable.Retry with backoff.
Secrets. Orion redacts common secret keys such as password and token, but it does not scan plain-text messages. Do not log secrets on purpose.
Was this page helpful? Thanks, noted.