> ## Documentation Index
> Fetch the complete documentation index at: https://ancplua.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get apiv1sessions traces

> Get session traces



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/v1/sessions/{sessionId}/traces
openapi: 3.0.0
info:
  title: QYL Observability API
  version: '2026-01-26'
servers:
  - url: https://api.staging.qyl.dev
    description: QYL Staging API
    variables: {}
  - url: https://api.qyl.dev
    description: QYL Production API
    variables: {}
security: []
tags:
  - name: Streaming
  - name: Traces
  - name: Logs
  - name: Metrics
  - name: Sessions
  - name: Errors
  - name: Deployments
  - name: Services
  - name: Health
  - name: Workspaces
  - name: Onboarding
  - name: Configurator
  - name: Issues
  - name: Workflows
  - name: Search
  - name: Alerts
paths:
  /api/v1/sessions/{sessionId}/traces:
    get:
      tags:
        - Sessions
      description: Get session traces
      operationId: SessionsApi_getTraces
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Page size
          schema:
            type: integer
            format: int32
            default: 100
          explode: false
        - name: cursor
          in: query
          required: false
          description: Cursor
          schema:
            type: string
          explode: false
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                  - has_more
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Qyl.OTel.Traces.Trace'
                    description: List of items in this page
                  next_cursor:
                    type: string
                    description: Cursor for the next page (null if no more pages)
                  prev_cursor:
                    type: string
                    description: Cursor for the previous page (null if first page)
                  has_more:
                    type: boolean
                    description: Whether there are more items available
                description: Cursor-based paginated response wrapper
        '404':
          description: Resource not found (404)
          headers:
            X-Trace-Id:
              required: false
              description: Trace ID for correlation
              schema:
                type: string
            X-Request-Id:
              required: false
              description: Request ID for support
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Qyl.Common.Errors.NotFoundError'
        '500':
          description: Internal server error (500)
          headers:
            X-Trace-Id:
              required: false
              description: Trace ID for correlation
              schema:
                type: string
            X-Request-Id:
              required: false
              description: Request ID for support
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Qyl.Common.Errors.InternalServerError'
components:
  schemas:
    Qyl.OTel.Traces.Trace:
      type: object
      required:
        - trace_id
        - spans
        - span_count
        - duration_ns
        - start_time
        - end_time
        - services
        - has_error
      properties:
        trace_id:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.TraceId'
          description: Trace identifier
        spans:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.OTel.Traces.Span'
          description: All spans in this trace
        root_span:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Traces.Span'
          description: Root span of the trace
        span_count:
          type: integer
          format: int32
          description: Total span count
        duration_ns:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.DurationNs'
          description: Trace duration in nanoseconds
        start_time:
          type: string
          format: date-time
          description: Trace start time
        end_time:
          type: string
          format: date-time
          description: Trace end time
        services:
          type: array
          items:
            type: string
          description: Services involved in this trace
        has_error:
          type: boolean
          description: Whether trace contains errors
      description: Complete trace containing all related spans
    Qyl.Common.Errors.NotFoundError:
      type: object
      required:
        - title
      properties:
        title:
          type: string
          enum:
            - Not Found
        resource_type:
          type: string
          description: The type of resource that was not found
        resource_id:
          type: string
          description: The identifier that was not found
      allOf:
        - $ref: '#/components/schemas/Qyl.Common.Errors.ProblemDetails'
      description: Resource not found (404)
    Qyl.Common.Errors.InternalServerError:
      type: object
      required:
        - title
      properties:
        title:
          type: string
          enum:
            - Internal Server Error
        error_code:
          type: string
          description: Error code for support reference
      allOf:
        - $ref: '#/components/schemas/Qyl.Common.Errors.ProblemDetails'
      description: Internal server error (500)
    Qyl.Common.TraceId:
      type: string
      minLength: 32
      maxLength: 32
      pattern: ^[a-f0-9]{32}$
      description: Unique trace identifier (32 lowercase hex characters)
      example: 0af7651916cd43dd8448eb211c80319c
      x-csharp-type: TraceId
      x-csharp-struct: true
      x-duckdb-type: VARCHAR(32)
    Qyl.OTel.Traces.Span:
      type: object
      required:
        - span_id
        - trace_id
        - name
        - kind
        - start_time_unix_nano
        - end_time_unix_nano
        - status
        - resource
      properties:
        span_id:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.SpanId'
          description: Unique span identifier (16 hex chars)
        trace_id:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.TraceId'
          description: Trace identifier (32 hex chars)
        parent_span_id:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.SpanId'
          description: Parent span identifier (null for root spans)
        trace_state:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.TraceState'
          description: W3C trace state
        name:
          type: string
          minLength: 1
          description: Human-readable span name
        kind:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Enums.SpanKind'
          description: Span kind
        start_time_unix_nano:
          type: integer
          format: int64
          description: Start timestamp in nanoseconds since epoch
        end_time_unix_nano:
          type: integer
          format: int64
          description: End timestamp in nanoseconds since epoch
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Common.Attribute'
          description: Span attributes
        dropped_attributes_count:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Count'
          description: Dropped attributes count
        events:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.OTel.Traces.SpanEvent'
          description: Span events (logs attached to span)
        dropped_events_count:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Count'
          description: Dropped events count
        links:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.OTel.Traces.SpanLink'
          description: Links to other spans
        dropped_links_count:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Count'
          description: Dropped links count
        status:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Traces.SpanStatus'
          description: Span status
        flags:
          type: integer
          format: int32
          description: Span flags
        resource:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Resource.Resource'
          description: Resource describing the entity that produced this span
        instrumentation_scope:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.InstrumentationScope'
          description: Instrumentation scope
      description: >-
        OpenTelemetry Span representing a single operation in a distributed
        trace
    Qyl.Common.DurationNs:
      type: integer
      format: int64
      minimum: 0
      description: Duration in nanoseconds
      x-csharp-type: long
      x-duckdb-type: UBIGINT
    Qyl.Common.Errors.ProblemDetails:
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri
          description: A URI reference identifying the problem type
          default: about:blank
        title:
          type: string
          description: A short, human-readable summary of the problem type
        status:
          type: integer
          format: int32
          description: >-
            The HTTP status code (informational only, actual code set by
            subtype)
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence
        instance:
          type: string
          format: uri
          description: A URI reference identifying the specific occurrence
        timestamp:
          type: string
          format: date-time
          description: Timestamp of the error
      description: RFC 7807 Problem Details for HTTP APIs
    Qyl.Common.SpanId:
      type: string
      minLength: 16
      maxLength: 16
      pattern: ^[a-f0-9]{16}$
      description: Unique span identifier (16 lowercase hex characters)
      example: b7ad6b7169203331
      x-csharp-type: SpanId
      x-csharp-struct: true
      x-duckdb-type: VARCHAR(16)
    Qyl.Common.TraceState:
      type: string
      description: W3C Trace Context tracestate header (vendor-specific key-value pairs)
      example: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE
    Qyl.OTel.Enums.SpanKind:
      type: number
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
      description: Span kind describing the relationship between spans
    Qyl.Common.Attribute:
      type: object
      required:
        - key
        - value
      properties:
        key:
          type: string
          minLength: 1
          maxLength: 256
          description: Attribute key (dot-separated namespace)
        value:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.AttributeValue'
          description: Attribute value
      description: Key-value attribute pair following OTel conventions
    Qyl.Common.Count:
      type: integer
      format: int64
      minimum: 0
      description: Generic non-negative counter
      x-csharp-type: long
      x-duckdb-type: BIGINT
    Qyl.OTel.Traces.SpanEvent:
      type: object
      required:
        - name
        - time_unix_nano
      properties:
        name:
          type: string
          minLength: 1
          description: Event name
        time_unix_nano:
          type: integer
          format: int64
          description: Event timestamp in nanoseconds since epoch
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Common.Attribute'
          description: Event attributes
        dropped_attributes_count:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Count'
          description: Dropped attributes count
      description: Event occurring during a span's lifetime
    Qyl.OTel.Traces.SpanLink:
      type: object
      required:
        - trace_id
        - span_id
      properties:
        trace_id:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.TraceId'
          description: Linked trace ID
        span_id:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.SpanId'
          description: Linked span ID
        trace_state:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.TraceState'
          description: Trace state of the linked span
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Common.Attribute'
          description: Link attributes
        dropped_attributes_count:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Count'
          description: Dropped attributes count
        flags:
          type: integer
          format: int32
          description: Link flags
      description: Link to another span (e.g., batch processing)
    Qyl.OTel.Traces.SpanStatus:
      type: object
      required:
        - code
      properties:
        code:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Enums.SpanStatusCode'
          description: Status code
        message:
          type: string
          description: Status message (only for ERROR status)
      description: Span status
    Qyl.OTel.Resource.Resource:
      type: object
      required:
        - service.name
      properties:
        service.name:
          type: string
          description: Service name (required)
        service.namespace:
          type: string
          description: Service namespace for grouping
        service.instance.id:
          type: string
          description: Service instance ID (unique per instance)
        service.version:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.SemVer'
          description: Service version
        telemetry.sdk.name:
          type: string
          description: Telemetry SDK name
        telemetry.sdk.language:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Enums.TelemetrySdkLanguage'
          description: Telemetry SDK language
        telemetry.sdk.version:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.SemVer'
          description: Telemetry SDK version
        telemetry.auto.version:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.SemVer'
          description: Auto-instrumentation agent name
        deployment.environment.name:
          type: string
          description: Deployment environment (e.g., production, staging)
        cloud.provider:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Resource.CloudProvider'
          description: Cloud provider
        cloud.region:
          type: string
          description: Cloud region
        cloud.availability_zone:
          type: string
          description: Cloud availability zone
        cloud.account.id:
          type: string
          description: Cloud account ID
        cloud.platform:
          type: string
          description: Cloud platform (e.g., aws_ecs, gcp_cloud_run)
        host.name:
          type: string
          description: Host name
        host.id:
          type: string
          description: Host ID
        host.type:
          type: string
          description: Host type (e.g., n1-standard-1)
        host.arch:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Resource.HostArch'
          description: Host architecture (e.g., amd64, arm64)
        os.type:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Resource.OsType'
          description: Operating system type
        os.description:
          type: string
          description: Operating system description
        os.version:
          type: string
          description: Operating system version
        process.pid:
          type: integer
          format: int64
          description: Process ID
        process.executable.name:
          type: string
          description: Process executable name
        process.command_line:
          type: string
          description: Process command line
        process.runtime.name:
          type: string
          description: Process runtime name
        process.runtime.version:
          type: string
          description: Process runtime version
        container.id:
          type: string
          description: Container ID
        container.name:
          type: string
          description: Container name
        container.image.name:
          type: string
          description: Container image name
        container.image.tag:
          type: string
          description: Container image tag
        k8s.cluster.name:
          type: string
          description: Kubernetes cluster name
        k8s.namespace.name:
          type: string
          description: Kubernetes namespace
        k8s.pod.name:
          type: string
          description: Kubernetes pod name
        k8s.pod.uid:
          type: string
          description: Kubernetes pod UID
        k8s.deployment.name:
          type: string
          description: Kubernetes deployment name
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Common.Attribute'
          description: Additional resource attributes
        dropped_attributes_count:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Count'
          description: Dropped attributes count
      description: Resource describes the entity producing telemetry
    Qyl.Common.InstrumentationScope:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: Name of the instrumentation scope (library name)
        version:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.SemVer'
          description: Version of the instrumentation scope
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Common.Attribute'
          description: Additional attributes for the scope
        dropped_attributes_count:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Count'
          description: Dropped attributes count
      description: >-
        Instrumentation scope identifying the library/component emitting
        telemetry
    Qyl.Common.AttributeValue:
      anyOf:
        - type: string
        - type: boolean
        - type: integer
          format: int64
        - type: number
          format: double
        - type: array
          items:
            type: string
        - type: array
          items:
            type: boolean
        - type: array
          items:
            type: integer
            format: int64
        - type: array
          items:
            type: number
            format: double
        - type: string
          format: byte
      description: Primitive attribute value types supported by OpenTelemetry
    Qyl.OTel.Enums.SpanStatusCode:
      type: number
      enum:
        - 0
        - 1
        - 2
      description: Span status code
    Qyl.Common.SemVer:
      type: string
      pattern: >-
        ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
      description: Semantic version string (e.g., 1.2.3)
      example: 2.1.0
    Qyl.OTel.Enums.TelemetrySdkLanguage:
      type: string
      enum:
        - cpp
        - dotnet
        - erlang
        - go
        - java
        - nodejs
        - php
        - python
        - ruby
        - rust
        - swift
        - webjs
      description: Telemetry SDK language
    Qyl.OTel.Resource.CloudProvider:
      type: string
      enum:
        - alibaba_cloud
        - aws
        - azure
        - gcp
        - heroku
        - ibm_cloud
        - tencent_cloud
      description: Cloud provider types
    Qyl.OTel.Resource.HostArch:
      type: string
      enum:
        - amd64
        - arm32
        - arm64
        - ia64
        - ppc32
        - ppc64
        - s390x
        - x86
      description: Host architecture types
    Qyl.OTel.Resource.OsType:
      type: string
      enum:
        - windows
        - linux
        - darwin
        - freebsd
        - netbsd
        - openbsd
        - dragonflybsd
        - hpux
        - aix
        - solaris
        - z_os
      description: Operating system types

````