Traces

Query trace spans with optional filters.

Changed on

Each returned span has a duration_ms field (float, milliseconds) — this is the ONLY field guaranteed to be in milliseconds. Spans also carry an attributes map of raw key/value pairs exactly as reported by the instrumenting library: numeric attribute values may be seconds, milliseconds, microseconds, or nanoseconds depending on that library's convention, and nothing in this response labels the unit. Never assume an attribute's numeric value shares duration_ms's unit, and never state a duration in milliseconds unless it came from a duration_ms field.

get/otel/traces

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/otel/traces
  • Auth: HTTP bearer

Query parameters

project_idinteger required

Project ID

trace_idstring

Filter by trace ID

service_namestring

Filter by service name

statusstring

Filter by status (OK, ERROR, UNSET)

min_duration_msnumber double

Minimum span duration in ms

start_timestring

Start time (RFC 3339)

end_timestring

End time (RFC 3339)

environment_idinteger

Filter by environment ID

deployment_idinteger

Filter by deployment ID

attributesstring

Filter by span attributes as comma-separated key=value pairs, e.g. "gen_ai.system=openai,gen_ai.request.model=gpt-4"

name_patternstring

Filter by span name pattern (ILIKE)

limitinteger

Max spans to return (default: 100, max: 1000)

offsetinteger

Offset for pagination

Response

Trace spans

countinteger required

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status