Skip to main content
Every error of the query API is JSON with one field: {"error": "message"}. OTLP errors have their own shape: see Ingest traces (OTLP).

Status codes

What to do for each code, and the gRPC codes: Errors and memory.

Limits of a request

All limits of the store and the server: Limits.

Why does a message never quote my request?

The text of a client can be private (a prompt, an email). An answer also goes to logs and proxies. So an error never quotes the request: no value, no name, no key of an attribute, no text of a filter, no header. A 400 gives a fixed reason, the line and column (or the number of the score or span), and what the server expected. For the part it cut out, it gives the first 16 hex characters of its SHA-256 and its length. The hash can confirm a guess of the text. It cannot give the text back.
  • A refused OTLP span is named by its number in the request (span 0: traceId must be 16 bytes ...), not by its name.
  • The rule fails closed. The server shows a message of the engine only in a shape it knows (src/redact.rs), with the value cut out: invalid query: text has no searchable words (detail sha256=…). A message it does not know becomes refused (a reason that is not shown), with its hash.
  • A number of the request is a value too. Before this rule, {"attributes": 987654321012345} came back in the message.
  • The gRPC port refuses an unknown grpc-encoding itself (UNIMPLEMENTED), and does not quote it.
  • The same rule holds for the problems of an import (its report and its stderr), also with --mask.
  • The library (Rust, Node, Python) gives the full message: there the caller has the data.

How deep can a filter be?

A filter has at most 32 levels. A span has at most 64 levels. The server refuses a deeper one.
  • In a filter (of a query or of a delete), each and, or and not, and each span condition of a trace filter (root, anySpan), is one level deeper than the filter it is in. A list or an object in a value of attributes counts on from there.
  • In attributes and events of a span, a list or an object is one level. What is in it is one level deeper.
  • A too-deep filter gets 400 with the reason. This holds for /v1/search, /v1/count, /v1/traces/find, /v1/aggregate, /v1/scores/aggregate, /v1/export and /v1/traces/delete.
  • JSON text deeper than 128 levels gets 400, with the reason of the JSON reader.

Why was my request refused as cross-site?

A page of another site cannot send a request to the server (403, CROSS_SITE). Every request but GET, HEAD and OPTIONS must pass this check:
  • When it has a Sec-Fetch-Site header, the value must be same-origin or none.
  • Else, when it has an Origin header, it must hold the request’s own host (Host).
Browsers send these headers, and a page cannot change them. curl, the OpenTelemetry SDKs and other programs send neither, so they pass.
  • Without keys, a page of any site that a person on this machine opens could send a POST to 127.0.0.1:4318/v1/traces/delete. Before this rule, that request got 200. With keys, a browser does not send the key by itself, but the rule holds the same.
  • The rule is the one of Go’s http.CrossOriginProtection.
  • The gRPC port has the same rule (the host is :authority there). It reads a request only with the content type application/grpc (also +proto), else HTTP 415. A page can send text/plain with any bytes and no preflight: before this rule, such a request wrote a span through the gRPC port.
  • A proxy that changes Host breaks the rule only for browsers that send no Sec-Fetch-Site (from before 2023).

HTTP API

Every route and the right it needs.

Errors and memory

What to do for each error, and what memory the server needs.