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

> ## Agent Instructions
> To act on Atlan objects, use the Atlan MCP server at https://api.atlan.com/mcp or the SDK. To install or publish skills from a terminal, use the `aireg` CLI; `aireg --map json` prints its command map. The `atlanai` CLI is deprecated. Run a read-only identity check before any write.
> The docs MCP server at /mcp searches these docs only. It cannot read or change Atlan objects.
> SDK packages: Python `atlanai` (PyPI) and TypeScript `@atlanai/sdk` (npm). Show Python first, then TypeScript.
> These docs cover Atlan Trident, Atlan's hosted product. AI Registry and Agent Registry are its earlier names. Registry OSS is Atlan's open-source agent registry: the registry specification and its aireg CLI, with their own public repository, docs and release notes; /open-source on this site links them. Registry OSS is open source; Atlan Trident is not. Answer generic aireg or specification questions from the project's docs, and use these docs for Atlan-specific setup such as the Atlan adapter, sign-in and workspaces.
> Atlan offers a second product, the Agentic Data Catalog: Atlan's enterprise context layer, covering the data catalog, connectors, lineage, data governance and glossary. It is documented at https://docs.atlan.com; answer questions about it from those docs, not these.

# List the spans of one of your own runs that used a metric or saved query



## OpenAPI

````yaml /public-openapi.json get /metric/v1/artifacts/{artifact_id}/traces/{trace_id}/spans
openapi: 3.1.0
info:
  title: Atlan public API
  version: current
  description: >-
    Public HTTP API reference for Registry, Skills, Agents, outputs, files, MCP
    servers and tools, Model Gateway, and OTLP telemetry ingestion.
servers:
  - url: https://api.atlan.com
    description: Atlan API base URL
security:
  - bearer: []
tags:
  - name: Core
  - name: Skill
  - name: Agent
  - name: Files
  - name: Knowledge
  - name: MCP
  - name: Observability
  - name: Credentials
  - name: Store
  - name: Apps
  - name: Evals
  - name: Ontologies
  - name: Ontology bindings
  - name: Slack
  - name: GitHub
  - name: Repositories
  - name: Models
paths:
  /metric/v1/artifacts/{artifact_id}/traces/{trace_id}/spans:
    get:
      tags:
        - Core
      summary: List the spans of one of your own runs that used a metric or saved query
      operationId: metric.listArtifactUseTraceSpans
      parameters:
        - in: path
          name: artifact_id
          required: true
          schema:
            type: string
        - name: trace_id
          in: path
          required: true
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
        - name: cursor
          in: query
          required: false
          schema:
            type: string
        - name: fields
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/metric-SpanListEnvelope'
          description: HTTP 200 response.
        '400':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/metric-ValidationProblem'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - invalid_query
          description: HTTP 400 response.
        '401':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/metric-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - alg_mismatch
                          - alg_not_allowed
                          - audience_mismatch
                          - invalid_api_key
                          - missing_identity
                          - missing_org
                          - missing_user
                          - signature_invalid
                          - token_expired
                          - token_malformed
                          - token_missing
                          - token_not_yet_valid
                          - token_rejected
                          - token_service_account_unbound
                          - unauthorized
                          - unknown_account
                          - unknown_key
                          - untrusted_issuer
          description: HTTP 401 response.
        '403':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/metric-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - access_denied
                          - account_suspended
                          - forbidden
                          - platform_principal_refused
          description: HTTP 403 response.
        '404':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/metric-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - not_found
          description: HTTP 404 response.
        '500':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/metric-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - internal_error
          description: HTTP 500 response.
        '503':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/metric-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - auth_unavailable
                          - service_overloaded
          description: HTTP 503 response.
        '504':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/metric-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - request_timeout
          description: HTTP 504 response.
components:
  schemas:
    metric-SpanListEnvelope:
      properties:
        items:
          items:
            $ref: '#/components/schemas/metric-SpanViewDto'
          type: array
        page:
          $ref: '#/components/schemas/metric-CursorPage'
      required:
        - items
        - page
      type: object
    metric-ValidationProblem:
      allOf:
        - $ref: '#/components/schemas/metric-ProblemDetails'
        - properties:
            allowed_values:
              type: array
              items:
                type: string
            field:
              type: string
          type: object
    metric-ProblemDetails:
      type: object
      required:
        - title
        - status
        - detail
        - code
      properties:
        code:
          type: string
        detail:
          type: string
        status:
          type: integer
          format: int32
          minimum: 0
        title:
          type: string
        trace_id:
          type:
            - string
            - 'null'
    metric-SpanViewDto:
      properties:
        artifact_observation:
          oneOf:
            - $ref: '#/components/schemas/metric-ArtifactObservation'
            - type: 'null'
        attributes: {}
        command_name:
          type:
            - string
            - 'null'
        cost:
          oneOf:
            - $ref: '#/components/schemas/metric-CostView'
            - type: 'null'
        duration_ms:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        ended_at_unix_seconds:
          type:
            - integer
            - 'null'
          format: int64
        event_seq:
          type:
            - integer
            - 'null'
          format: int64
        events: {}
        input: {}
        mcp_server:
          type:
            - string
            - 'null'
        metadata: {}
        model:
          type:
            - string
            - 'null'
        name:
          type: string
        output: {}
        parent_span_id:
          type:
            - string
            - 'null'
        provider:
          type:
            - string
            - 'null'
        score_name:
          type:
            - string
            - 'null'
        score_value:
          type:
            - number
            - 'null'
          format: double
        scorer_id:
          type:
            - string
            - 'null'
        scorer_version:
          type:
            - integer
            - 'null'
          format: int64
        service_name:
          type:
            - string
            - 'null'
        session_id:
          type:
            - string
            - 'null'
        skill_name:
          type:
            - string
            - 'null'
        skill_version:
          type:
            - string
            - 'null'
        span_id:
          type: string
        span_kind:
          type: string
        span_status:
          $ref: '#/components/schemas/metric-TraceStatus'
        span_type:
          type: string
        started_at_unix_seconds:
          type: integer
          format: int64
        tool_name:
          type:
            - string
            - 'null'
        tool_type:
          type:
            - string
            - 'null'
        trace_id:
          type: string
        usage:
          oneOf:
            - $ref: '#/components/schemas/metric-UsageView'
            - type: 'null'
      required:
        - span_id
        - trace_id
        - name
        - span_type
        - span_kind
        - started_at_unix_seconds
        - span_status
      type: object
    metric-CursorPage:
      properties:
        limit:
          type: integer
          format: int32
          minimum: 0
        next_cursor:
          type:
            - string
            - 'null'
      required:
        - limit
      type: object
    metric-ArtifactObservation:
      properties:
        observed_at_unix_seconds:
          type: integer
          format: int64
        omitted_count:
          type: integer
          minimum: 0
        operation:
          $ref: '#/components/schemas/metric-ObservationOperation'
        references:
          items:
            $ref: '#/components/schemas/metric-ArtifactReference'
          type: array
        returned_count:
          type: integer
          minimum: 0
      required:
        - operation
        - observed_at_unix_seconds
        - returned_count
        - omitted_count
        - references
      type: object
    metric-CostView:
      properties:
        input_cost_usd:
          type: number
          format: double
        output_cost_usd:
          type: number
          format: double
        source:
          type:
            - string
            - 'null'
        total_cost_usd:
          type: number
          format: double
      required:
        - input_cost_usd
        - output_cost_usd
        - total_cost_usd
      type: object
    metric-TraceStatus:
      enum:
        - ok
        - error
        - unset
      type: string
    metric-UsageView:
      properties:
        cache_read_tokens:
          type: integer
          format: int64
        cache_write_tokens:
          type: integer
          format: int64
        input_tokens:
          type: integer
          format: int64
        output_tokens:
          type: integer
          format: int64
        total_tokens:
          type: integer
          format: int64
      required:
        - input_tokens
        - output_tokens
        - total_tokens
        - cache_read_tokens
        - cache_write_tokens
      type: object
    metric-ObservationOperation:
      enum:
        - discover
        - retrieve
      type: string
    metric-ArtifactReference:
      properties:
        artifact_id:
          type: string
        content_hash_hex:
          type:
            - string
            - 'null'
        display_name:
          type: string
        etag:
          type: string
        kind:
          type: string
        name:
          type: string
        org_id:
          type: string
        release_id:
          type:
            - string
            - 'null'
        requested_channel:
          type:
            - string
            - 'null'
        selection:
          oneOf:
            - $ref: '#/components/schemas/metric-ArtifactSelection'
            - type: 'null'
        source_digest:
          type:
            - string
            - 'null'
        uri:
          type: string
        version_id:
          type: string
        version_ordinal:
          type: integer
          format: int64
        workspace_id:
          type: string
      required:
        - org_id
        - workspace_id
        - kind
        - artifact_id
        - version_id
        - version_ordinal
        - name
        - display_name
        - uri
        - etag
      type: object
    metric-ArtifactSelection:
      enum:
        - head
        - version
        - release
      type: string
  securitySchemes:
    bearer:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.