---
title: "List LLM Observability experiment spans (v1)"
method: GET
path: "/api/v2/llm-obs/v1/experiments/{experiment_id}/events"
tags: ["LLM Observability"]
deprecated: true
---

# List LLM Observability experiment spans (v1)

`GET /api/v2/llm-obs/v1/experiments/{experiment_id}/events`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/llm-obs/v1/experiments/{experiment_id}/events`
- Auth: API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`

> **Deprecated.**

Retrieve spans with their evaluation metrics for a given experiment. Returns spans only, with no summary metrics and no pagination. Deprecated in favor of `ListLLMObsExperimentEventsV3`.

## Path parameters

- `experiment_id` string, required

## Response `200`

OK

- LLMObsExperimentSpansResponse: Response for listing experiment spans (v1). Returns only spans with their evaluation metrics. No summary metrics or pagination are included. Deprecated in favor of `ListLLMObsExperimentEventsV3`.
  - `data` LLMObsExperimentSpanDataResponse[], required: List of experiment spans with their evaluation metrics.
    - `attributes` LLMObsExperimentSpanWithEvals, required: An experiment span enriched with its associated evaluation metrics.
      - `dataset_record_id` string, nullable: ID of the dataset record this span evaluated.
      - `duration` number, double: Duration of the span in nanoseconds.
      - `eval_metrics` LLMObsExperimentEvalMetricEvent[]: Evaluation metrics associated with this span.
        - `assessment` 'pass' | 'fail': Assessment result for an LLM Observability experiment metric.
        - `boolean_value` boolean, nullable: Boolean value. Present when `metric_type` is `boolean`.
        - `categorical_value` string, nullable: Categorical value. Present when `metric_type` is `categorical`.
        - `eval_source_type` string: Source type of the evaluation.
        - `id` string: Unique identifier of the evaluation metric event.
        - `json_value` object, nullable: JSON value. Present when `metric_type` is `json`.
        - `label` string: Label or name for the metric.
        - `metadata` object, nullable: Arbitrary metadata associated with the metric.
        - `metric_source` string: Source of the metric. Either `custom` (user-submitted) or `summary` (experiment-level aggregate).
        - `metric_type` 'score' | 'categorical' | 'boolean' | 'json': Type of metric recorded for an LLM Observability experiment.
        - `reasoning` string, nullable: Human-readable reasoning for the metric value.
        - `score_value` number, double, nullable: Numeric score. Present when `metric_type` is `score`.
        - `span_id` string: Span ID this metric is associated with.
        - `tags` string[]: Tags associated with the metric.
        - `timestamp_ms` integer: Timestamp when the metric was recorded, in milliseconds since Unix epoch.
        - `trace_id` string: Trace ID linking this metric to a span.
      - `id` string: Unique identifier of the span.
      - `meta` LLMObsExperimentSpanMeta: Metadata associated with an experiment span.
        - `error` LLMObsExperimentSpanError: Error details for an experiment span.
          - `message` string: Error message.
          - `stack` string: Stack trace of the error.
          - `type` string: The error type or exception class name.
        - `expected_output` object: Expected output for the span, used for evaluation.
        - `input` AnyValue, nullable: An arbitrary object value with additional properties.
        - `output` AnyValue, nullable: An arbitrary object value with additional properties.
      - `metrics` object: Numeric metrics attached to the span.
      - `name` string: Name of the span.
      - `parent_id` string: Parent span ID, if any.
      - `span_id` string: Span ID.
      - `start_ns` integer: Start time in nanoseconds since Unix epoch.
      - `status` 'ok' | 'error': Status of the span.
      - `tags` string[]: Tags associated with the span.
      - `trace_id` string: Trace ID.
    - `id` string, required: Unique identifier of the span.
    - `type` 'experiments', required: Resource type for a span item in an experiment spans response.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too many requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
