---
title: "Get a critical path of a trace."
method: GET
path: "/v1/tracing/traces/{traceId}/criticalPath"
tags: ["traces"]
---

# Get a critical path of a trace.

`GET /v1/tracing/traces/{traceId}/criticalPath`

Get a list of span segments composing the critical path of the trace. A span segment represents the processing time that was consumed within the span itself and does not incorporate the processing time of its children. The critical path is the sequence of span segments that contribute to the total trace duration. An increase of the processing time of any segment from the critical path would result in an increase of the total trace processing time.

## Path parameters

- `traceId` string, required

## Query parameters

- `limit` integer
- `token` string

## Response `200`

List of span segments composing the critical path.

- CriticalPathResponse
  - `segments` SpanPathSegment[], required — List of span segments from the critical path.
    - `spanId` string, required — Span identifier.
    - `service` string — The name of the service this span is part of.
    - `serviceColor` string — Color hex code assigned to the service.
    - `startOffset` integer, required — Number of nanoseconds from the span startedAt the segment started.
    - `duration` integer, required — Number of nanoseconds the span segment lasted.
    - `fraction` number, double — The fraction (value between 0.0 and 1.0) from the trace duration time this segment took.
  - `next` string — Next continuation token.

## Other responses

- `default` — Operation failed with an error.

---

[API](https://skmtc.net/sumologic/apis/sumo-logic-api.md) · [All operations](https://skmtc.net/sumologic/apis/sumo-logic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sumologic/sumo-logic-api/revisions/e4e4c7554890/schema)
