v1

latestOpenAPI 3.0.02026-07-141,4077,1665.2 MB
APM Trace

Get a trace by ID

Retrieve a full APM trace by its trace ID, including every span in the trace. Traces are returned from live storage when available and fall back to longer-term storage. This endpoint is rate limited to 60 requests per minute per organization.

get/api/v2/trace/{trace_id}

Path parameters

trace_idstring required

The trace ID. Accepts either a 32-character hexadecimal string (128-bit trace ID) or a decimal string of up to 39 digits.

Query parameters

include_fieldsstring[]

List of span fields to include in the response. When omitted, every available field is returned. Values may be passed as repeated query parameters or as a single comma-separated value.

Response

OK

Example response

{
  "data": {
    "attributes": {
      "spans": [
        {
          "duration": 500000000,
          "endTime": 1716800000500000000,
          "meta": {
            "env": "production",
            "http.method": "GET"
          },
          "metrics": {
            "http.status_code": 200
          },
          "name": "web.request",
          "resource": "GET /products",
          "resourceHash": "6a4e9b7f",
          "self_time": 250000000,
          "service": "web-store",
          "spanID": 9876543210987655000,
          "startTime": 1716800000000000000,
          "traceID": 12345678901234567000,
          "traceIDFull": "0000000000000000abc1230000000000",
          "type": "web"
        }
      ]
    },
    "id": "0000000000000000abc1230000000000",
    "type": "trace"
  }
}