---
title: "Get debug session trace"
url: "https://nov18-dev.movespot.fyi/apis/konnect-dolly-apis-dev-1/versions/4ba55f2d-e3a2-486c-a018-16faa4e1afe4/operations/getDebugSessionTraceById"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-dolly-apis-dev-1/versions/4ba55f2d-e3a2-486c-a018-16faa4e1afe4.md

# Get debug session trace

`GET` `/control-planes/{controlPlaneId}/o11y/debug-sessions/{debugSessionId}/traces/{traceId}`

Operation ID: `getDebugSessionTraceById`

Returns a Trace in a debug session by ID

## Path parameters

- `controlPlaneId` (string, uuid, required) - The UUID of your control plane. This variable is available in the Konnect manager.
- `debugSessionId` (string, uuid, required) - Debug Session identifier
- `traceId` (string, required) - Unique identifier of the trace.

## Responses

- `200` - Trace response
- `401` - Unauthorized
- `403` - Forbidden
- `404` - Not Found

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Konnect Dolly APIs
  version: 1.0.0
servers:
  - url: https://us.api.konghq.com/v1
    description: United-States Production region
  - url: https://eu.api.konghq.com/v1
    description: Europe Production region
  - url: https://au.api.konghq.com/v1
    description: Australia Production region
  - url: https://me.api.konghq.com/v1
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v1
    description: India Production region
  - url: https://sg.api.konghq.com/v1
    description: Singapore Production region
paths:
  /control-planes/{controlPlaneId}/o11y/debug-sessions/{debugSessionId}/traces/{traceId}:
    parameters:
      - $ref: "#/components/parameters/controlPlaneId"
      - $ref: "#/components/parameters/debugSessionId"
      - $ref: "#/components/parameters/traceId"
    get:
      operationId: getDebugSessionTraceById
      summary: Get debug session trace
      description: Returns a Trace in a debug session by ID
      responses:
        "200":
          description: Trace response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Trace"
              examples:
                DebugSessionTraceByIDExample:
                  $ref: "#/components/examples/DebugSessionTraceByIDExample"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Tracing Sessions
security:
  - konnectAccessToken: []
  - personalAccessToken: []
components:
  parameters:
    controlPlaneId:
      name: controlPlaneId
      in: path
      required: true
      schema:
        type: string
        format: uuid
        example: 9524ec7d-36d9-465d-a8c5-83a3c9390458
      description: The UUID of your control plane. This variable is available in the
        Konnect manager.
    debugSessionId:
      schema:
        type: string
        format: uuid
        example: d32d905a-ed33-46a3-a093-d8f536af9a8a
      name: debugSessionId
      in: path
      required: true
      description: Debug Session identifier
    traceId:
      schema:
        type: string
        example: 0b419ff749c4dabf5f45b0cfee053bc1
      name: traceId
      in: path
      required: true
      description: Unique identifier of the trace.
  schemas:
    Trace:
      type: object
      properties:
        resource_spans:
          type: array
          items:
            $ref: "#/components/schemas/ResourceSpan"
    ResourceSpan:
      type: object
      properties:
        resource:
          $ref: "#/components/schemas/Resource"
        scope_spans:
          type: array
          items:
            $ref: "#/components/schemas/ScopeSpans"
    UnauthorizedError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 401
            title:
              example: Unauthorized
            type:
              example: https://httpstatuses.com/401
            instance:
              example: kong:trace:1234567890
            detail:
              example: Invalid credentials
    ForbiddenError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 403
            title:
              example: Forbidden
            type:
              example: https://httpstatuses.com/403
            instance:
              example: kong:trace:1234567890
            detail:
              example: Forbidden
    NotFoundError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 404
            title:
              example: Not Found
            type:
              example: https://httpstatuses.com/404
            instance:
              example: kong:trace:1234567890
            detail:
              example: Not found
    Resource:
      type: object
      properties:
        attributes:
          $ref: "#/components/schemas/Attributes"
    ScopeSpans:
      type: object
      properties:
        scope:
          $ref: "#/components/schemas/ScopeItem"
        spans:
          type: array
          items:
            $ref: "#/components/schemas/Span"
    BaseError:
      description: standard error
      type: object
      properties:
        status:
          description: >
            The HTTP status code of the error. Useful when passing the response

            body to child properties in a frontend UI. Must be returned as an
            integer.
          type: integer
          readOnly: true
        title:
          description: |
            A short, human-readable summary of the problem. It should not
            change between occurences of a problem, except for localization.
            Should be provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
        type:
          description: The error type.
          type: string
          readOnly: true
        instance:
          description: |
            Used to return the correlation ID back to the user, in the format
            kong:trace:<correlation_id>. This helps us find the relevant logs
            when a customer reports an issue.
          type: string
          readOnly: true
        detail:
          description: >
            A human readable explanation specific to this occurence of the
            problem.

            This field may contain request/entity data to help the user
            understand

            what went wrong. Enclose variable values in square brackets. Should
            be

            provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
      required:
        - status
        - title
        - instance
        - detail
      title: Error
    Attributes:
      type: object
    ScopeItem:
      type: object
      properties:
        name:
          type: string
        version:
          type: string
        attributes:
          $ref: "#/components/schemas/Attributes"
      required:
        - name
        - version
    Span:
      type: object
      properties:
        trace_id:
          type: string
        span_id:
          type: string
        parent_span_id:
          type: string
          nullable: true
        name:
          type: string
        kind:
          type: string
        start_time_unix_nano:
          type: string
        end_time_unix_nano:
          type: string
        attributes:
          $ref: "#/components/schemas/Attributes"
        events:
          type: array
          items:
            type: object
            properties:
              timeUnixNano:
                type: string
              name:
                type: string
              attributes:
                $ref: "#/components/schemas/Attributes"
            required:
              - timeUnixNano
              - name
        links:
          type: array
          items:
            $ref: "#/components/schemas/SpanLink"
        status:
          type: object
          additionalProperties: true
      required:
        - trace_id
        - span_id
        - start_time_unix_nano
        - end_time_unix_nano
    SpanLink:
      type: object
      properties:
        trace_id:
          type: string
        span_id:
          type: string
        trace_state:
          type: string
        attributes:
          $ref: "#/components/schemas/Attributes"
  examples:
    DebugSessionTraceByIDExample:
      value:
        resource_spans:
          - resource:
              attributes:
                service.instance.id: 1bcb601e-0e49-4c36-93ef-0a627b7415a0
                service.version: 3.10.0.1
                session.id: 019685c2-dafc-7633-8538-8be9b6c465cd
                service.name: kong
            scope_spans:
              - scope:
                  name: kong-internal
                  version: 0.1.0
                  attributes:
                    instrumentation.version: 1.0.0
                spans:
                  - trace_id: 487b5c0c365cf68d4e13fead68cfce93
                    span_id: 131cf8c7f90656b6
                    name: kong
                    kind: SPAN_KIND_SERVER
                    start_time_unix_nano: "1746000870167000064"
                    end_time_unix_nano: "1746000870411013632"
                    attributes:
                      http.request.method: GET
                      url.scheme: http
                      network.protocol.version: "1.1"
                      network.protocol.name: http
                      http.response.status_code: 200
                      url.full: http://localhost:8000/mock/anything
                      http.route: /mock
                      user_agent.original: curl/8.11.1
                    status:
                      code: STATUS_CODE_OK
                  - trace_id: 487b5c0c365cf68d4e13fead68cfce93
                    span_id: 29b14f902993f6ea
                    parent_span_id: 131cf8c7f90656b6
                    name: kong.read_client_http_body
                    kind: SPAN_KIND_INTERNAL
                    start_time_unix_nano: "1746000870169033216"
                    end_time_unix_nano: "1746000870169217280"
                    attributes:
                      proxy.kong.http.content_length: 0
                      kong.phase: access
                    events:
                      - timeUnixNano: "1746000870169100000"
                        name: request.body.read
                        attributes:
                          bytes_read: 0
                          content_type: application/json
                    links:
                      - trace_id: 99dae214e66279fd559293af5e85f1d0
                        span_id: af55acb4c1ad30d7
                        trace_state: vendor1=value1,vendor2=value2
                        attributes:
                          link.description: log phase of request
                    status:
                      code: STATUS_CODE_OK
    UnauthorizedExample:
      value:
        status: 401
        title: Unauthorized
        instance: kong:trace:8347343766220159418
        detail: Unauthorized
    ForbiddenExample:
      value:
        status: 403
        title: Forbidden
        instance: kong:trace:2723154947768991354
        detail: You do not have permission to perform this action
    NotFoundExample:
      value:
        status: 404
        title: Not Found
        instance: kong:trace:6816496025408232265
        detail: Not Found
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/UnauthorizedError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/UnauthorizedExample"
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ForbiddenError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/ForbiddenExample"
    NotFound:
      description: Not Found
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/NotFoundError"
          examples:
            NotFoundExample:
              $ref: "#/components/examples/NotFoundExample"
  securitySchemes:
    konnectAccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        The Konnect access token is meant to be used by the Konnect dashboard
        and the decK CLI authenticate with.
    personalAccessToken:
      type: http
      scheme: bearer
      bearerFormat: Token
      description: >
        The personal access token is meant to be used as an alternative to
        basic-auth when accessing Konnect via APIs.

        You can generate a Personal Access Token (PAT) from the [personal access
        token page](https://cloud.konghq.com/global/account/tokens/) in the
        Konnect dashboard.

        The PAT token must be passed in the header of a request, for example:

        `curl -X GET 'https://global.api.konghq.com/v2/users/' --header
        'Authorization: Bearer kpat_xgfT...'`
```
