API reference · v0.1.0
Traces HTTP API
Tempo-compatible trace query and OTLP/Zipkin HTTP ingestion API. OTLP and Jaeger gRPC services are documented separately. Generated from the OpenAPI 3.1 document shipped with the server.
Base URLs
Writers serve every
/write route and readers serve every /read route. The operator creates a Service for each, named after the Traces resource. Any writer accepts any write and forwards it to the owning shard, so plain round-robin load balancing is enough. OTLP/gRPC is served on 4317 and Jaeger gRPC on 14250 on every writer, outside this HTTP API.Authentication
Requests use HTTP basic auth. Each NamespaceAuthentication grants one username
read or write on one namespace, with the password held in a Secret. Probes and self-metrics are unauthenticated.Namespaces
Data is partitioned into tenant namespaces, and every data route carries one as
/read/ns/{namespace} or /write/ns/{namespace}. A Tempo data source pointed at http://traces-reader.telemetry:3200/read/ns/default works unchanged.Errors and backpressure
Errors use the Tempo error envelope with a 4xx or 5xx status. When object storage falls behind, writers reject new batches with
429 and a Retry-After header; configure your agent to retry them.Base URLs
- writer
- http://traces-writer.telemetry:3200
- reader
- http://traces-reader.telemetry:3200
Endpoints15
- GET
/read/ns/…/api/traces/{trace_id} - GET
/read/ns/…/api/v2/traces/{trace_id} - GET
/read/ns/…/api/metrics/query_range - GET
/read/ns/…/api/search - GET
/read/ns/…/api/search/tag/{name}/values - GET
/read/ns/…/api/search/tags - GET
/read/ns/…/api/v1/tag/{name}/values - GET
/read/ns/…/api/v1/tags - GET
/read/ns/…/api/v2/search/tag/{name}/values - GET
/read/ns/…/api/v2/search/tags - POST
/write/ns/…/api/v2/spans - POST
/write/ns/…/v1/traces - GET
/-/healthy - GET
/-/ready - GET
/read/ns/…/api/echo
Error · 400
{
"error": "invalid TraceQL query: unexpected token at 1:12"
}Resource
traces
Trace lookup by ID. Readers merge partial traces from every shard the ID could route to.Get trace (v1)
GET
Fetches a full trace by its 32-character hex ID. Returns OTLP JSON by default; send a protobuf /read/ns/{namespace}/api/traces/{trace_id}Accept header for protobuf.Path parameters
- Tenant namespace. A
namespacestringrequiredNamespaceAuthenticationfor this database must grant the caller access to it. - 32-character hexadecimal trace ID
trace_idstringrequired
Responses
200Tempo v1 trace responseapplication/jsonapplication/x-protobuf›TraceResponse
batchesobjectrequired
404Trace not found
Request
curl http://traces-reader.telemetry:3200/read/ns/default/api/traces/4bf92f3577b34da6a3ce929d0e0e4736 \
-u reader:$PASSWORDResponse · 200
{
"batches": [
{
"resource": {
"attributes": [
{
"key": "service.name",
"value": {
"stringValue": "checkout"
}
}
]
},
"scopeSpans": []
}
]
}Get trace (v2)
GET
Tempo v2 trace lookup. Same lookup as v1, wrapped in the v2 response envelope./read/ns/{namespace}/api/v2/traces/{trace_id}Path parameters
- Tenant namespace. A
namespacestringrequiredNamespaceAuthenticationfor this database must grant the caller access to it. - 32-character hexadecimal trace ID
trace_idstringrequired
Responses
200Tempo v2 trace responseapplication/jsonapplication/x-protobuf›TraceResponse
batchesobjectrequired
404Trace not found
Request
curl http://traces-reader.telemetry:3200/read/ns/default/api/v2/traces/4bf92f3577b34da6a3ce929d0e0e4736 \
-u reader:$PASSWORDResponse · 200
{
"trace": {
"batches": [
{
"resource": {
"attributes": [
{
"key": "service.name",
"value": {
"stringValue": "checkout"
}
}
]
},
"scopeSpans": []
}
]
}
}Resource
search
TraceQL search and tag discovery.TraceQL metrics
GET
Routed for Grafana compatibility. TraceQL metrics are not implemented yet, so this returns /read/ns/{namespace}/api/metrics/query_range501.Path parameters
- Tenant namespace. A
namespacestringrequiredNamespaceAuthenticationfor this database must grant the caller access to it.
Responses
501TraceQL metrics are not implemented
Request
curl http://traces-reader.telemetry:3200/read/ns/default/api/metrics/query_range \
-u reader:$PASSWORDSearch traces
GET
Runs a TraceQL query (/read/ns/{namespace}/api/searchq) or a legacy tags selector and returns matching trace summaries.Path parameters
- Tenant namespace. A
namespacestringrequiredNamespaceAuthenticationfor this database must grant the caller access to it.
Query parameters
- TraceQL expression
qstring - Legacy key=value selector
tagsstring - Unix seconds
startinteger · int64Minimum 0 - Unix seconds
endinteger · int64Minimum 0 - Maximum number of results to return.
limitintegerMinimum 0
Responses
200Matching trace summariesapplication/json›SearchResponse
tracesarray of objectrequired
400Invalid TraceQL queryapplication/json›ErrorEnvelope
errorstringrequired
Request
curl -G http://traces-reader.telemetry:3200/read/ns/default/api/search \
-u reader:$PASSWORD \
--data-urlencode 'q={ resource.service.name = "checkout" && duration > 500ms }' \
--data-urlencode 'start=1791460800' \
--data-urlencode 'end=1791464400' \
--data-urlencode 'limit=20'Response · 200
{
"traces": [
{
"traceID": "4bf92f3577b34da6a3ce929d0e0e4736",
"rootServiceName": "checkout",
"rootTraceName": "POST /pay",
"startTimeUnixNano": "1791464400000000000",
"durationMs": 412
}
],
"metrics": {
"inspectedTraces": 1840
}
}Tag values (legacy)
GET
Legacy tag-value discovery./read/ns/{namespace}/api/search/tag/{name}/valuesPath parameters
- Tenant namespace. A
namespacestringrequiredNamespaceAuthenticationfor this database must grant the caller access to it. - Attribute name, such as
namestringrequiredresource.service.name.
Query parameters
- TraceQL query.
qstring - Start of the search window in Unix seconds.
startinteger · int64Minimum 0 - End of the search window in Unix seconds.
endinteger · int64Minimum 0
Responses
200Tempo tag values
Request
curl -G http://traces-reader.telemetry:3200/read/ns/default/api/search/tag/resource.service.name/values \
-u reader:$PASSWORD \
--data-urlencode 'q={ resource.service.name = "checkout" && duration > 500ms }' \
--data-urlencode 'start=1791460800' \
--data-urlencode 'end=1791464400'List tags (legacy)
GET
Legacy tag-name discovery./read/ns/{namespace}/api/search/tagsPath parameters
- Tenant namespace. A
namespacestringrequiredNamespaceAuthenticationfor this database must grant the caller access to it.
Responses
200Tempo tag names
Request
curl http://traces-reader.telemetry:3200/read/ns/default/api/search/tags \
-u reader:$PASSWORDTag values (v1)
GET
Tempo v1 tag-value discovery./read/ns/{namespace}/api/v1/tag/{name}/valuesPath parameters
- Tenant namespace. A
namespacestringrequiredNamespaceAuthenticationfor this database must grant the caller access to it. - Attribute name, such as
namestringrequiredresource.service.name.
Responses
200Tempo v1 tag values
Request
curl http://traces-reader.telemetry:3200/read/ns/default/api/v1/tag/resource.service.name/values \
-u reader:$PASSWORDList tags (v1)
GET
Tempo v1 tag-name discovery./read/ns/{namespace}/api/v1/tagsPath parameters
- Tenant namespace. A
namespacestringrequiredNamespaceAuthenticationfor this database must grant the caller access to it.
Responses
200Tempo v1 tag names
Request
curl http://traces-reader.telemetry:3200/read/ns/default/api/v1/tags \
-u reader:$PASSWORDTag values (v2)
GET
Typed tag values for one attribute, such as /read/ns/{namespace}/api/v2/search/tag/{name}/valuesresource.service.name.Path parameters
- Tenant namespace. A
namespacestringrequiredNamespaceAuthenticationfor this database must grant the caller access to it. - Attribute name, such as
namestringrequiredresource.service.name.
Query parameters
- Attribute scope:
scopestringresource,span, orintrinsic. - TraceQL query.
qstring - Start of the search window in Unix seconds.
startinteger · int64Minimum 0 - End of the search window in Unix seconds.
endinteger · int64Minimum 0
Responses
200Tempo v2 tag values
Request
curl -G http://traces-reader.telemetry:3200/read/ns/default/api/v2/search/tag/resource.service.name/values \
-u reader:$PASSWORD \
--data-urlencode 'q={ resource.service.name = "checkout" && duration > 500ms }' \
--data-urlencode 'start=1791460800' \
--data-urlencode 'end=1791464400'Response · 200
{
"tagValues": [
{
"type": "string",
"value": "checkout"
},
{
"type": "string",
"value": "ledger"
}
]
}List tags (v2)
GET
Scoped tag-name discovery. Filter by /read/ns/{namespace}/api/v2/search/tagsscope (resource, span, intrinsic) and an optional TraceQL q.Path parameters
- Tenant namespace. A
namespacestringrequiredNamespaceAuthenticationfor this database must grant the caller access to it.
Query parameters
- Attribute scope:
scopestringresource,span, orintrinsic. - TraceQL query.
qstring - Start of the search window in Unix seconds.
startinteger · int64Minimum 0 - End of the search window in Unix seconds.
endinteger · int64Minimum 0
Responses
200Tempo v2 tag names
Request
curl -G http://traces-reader.telemetry:3200/read/ns/default/api/v2/search/tags \
-u reader:$PASSWORD \
--data-urlencode 'q={ resource.service.name = "checkout" && duration > 500ms }' \
--data-urlencode 'start=1791460800' \
--data-urlencode 'end=1791464400'Response · 200
{
"scopes": [
{
"name": "resource",
"tags": [
"service.name",
"k8s.namespace.name"
]
},
{
"name": "span",
"tags": [
"http.method",
"http.status_code"
]
}
]
}Resource
ingest
OTLP/HTTP and Zipkin ingestion. OTLP/gRPC and Jaeger gRPC are served on separate ports.Zipkin spans
POST
Zipkin v2 JSON span ingestion. Legacy Zipkin reporters rarely retry rejected batches, so put an OpenTelemetry Collector in front when loss is unacceptable./write/ns/{namespace}/api/v2/spansPath parameters
- Tenant namespace. A
namespacestringrequiredNamespaceAuthenticationfor this database must grant the caller access to it.
Request body
application/jsonannotationsarray of ZipkinAnnotation | null›Show child attributesHide child attributes
timestampinteger · int64requiredMinimum 0valuestringrequired
durationinteger · int64 | nullMinimum 0idstringrequiredlocalEndpointZipkinEndpoint | null›Show child attributesHide child attributes
ipv4string | nullipv6string | nullportinteger · int32 | nullMinimum 0serviceNamestring | null
namestring | nullparentIdstring | nullremoteEndpointZipkinEndpoint | null›Show child attributesHide child attributes
ipv4string | nullipv6string | nullportinteger · int32 | nullMinimum 0serviceNamestring | null
tagsmap of string | nulltimestampinteger · int64 | nullMinimum 0traceIdstringrequired
Responses
202Zipkin spans accepted400Invalid Zipkin requestapplication/json›ErrorEnvelope
errorstringrequired
Request
curl -X POST "http://traces-writer.telemetry:3200/write/ns/default/api/v2/spans" \
-u writer:$PASSWORD \
-H 'Content-Type: application/json' \
--data-binary @- <<'EOF'
[
{
"traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
"id": "00f067aa0ba902b7",
"name": "post /pay",
"timestamp": 1791464400000000,
"duration": 412000,
"localEndpoint": {
"serviceName": "checkout"
},
"tags": {
"http.method": "POST"
}
}
]
EOFOTLP traces
POST
OTLP/HTTP /write/ns/{namespace}/v1/tracesExportTraceServiceRequest, protobuf or JSON. OTLP/gRPC (4317) and Jaeger gRPC (14250) are also served on the pod.Path parameters
- Configured tenant namespace
namespacestringrequired
Request body
application/jsonapplication/x-protobufResponses
200OTLP traces accepted400Invalid OTLP requestapplication/json›ErrorEnvelope
errorstringrequired
413Request exceeds configured limit
Request
curl -X POST "http://traces-writer.telemetry:3200/write/ns/default/v1/traces" \
-u writer:$PASSWORD \
-H 'Content-Type: application/json' \
--data-binary @- <<'EOF'
{
"resourceSpans": [
{
"resource": {
"attributes": [
{
"key": "service.name",
"value": {
"stringValue": "checkout"
}
}
]
},
"scopeSpans": [
{
"spans": [
{
"traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
"spanId": "00f067aa0ba902b7",
"name": "POST /pay",
"kind": 2,
"startTimeUnixNano": "1791464400000000000",
"endTimeUnixNano": "1791464400412000000"
}
]
}
]
}
]
}
EOFResource
operations
Probes and data source checks.Liveness
GET
Returns /-/healthy200 while the process is running. Use it as the Kubernetes liveness probe; it is unprefixed and not namespace-scoped.Responses
200Process is healthy
Request
curl http://traces-reader.telemetry:3200/-/healthyReadiness
GET
Returns /-/ready200 once every storage shard assigned to this pod is open, and 503 while shards are still being acquired or handed off. Use it as the readiness probe.Responses
200Server is ready503Assigned shards are not ready
Request
curl http://traces-reader.telemetry:3200/-/readyEcho
GET
Tempo-compatible echo used by Grafana to validate the data source./read/ns/{namespace}/api/echoPath parameters
- Tenant namespace. A
namespacestringrequiredNamespaceAuthenticationfor this database must grant the caller access to it.
Responses
200Tempo-compatible echo
Request
curl http://traces-reader.telemetry:3200/read/ns/default/api/echo \
-u reader:$PASSWORD