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

# 06.13.2025: Enhanced span creation and logging

> Available in Phoenix 10.12+

<Update label="06.13.2025">
  ## Enhanced Span Creation And Logging

  **New Features:**

  * Added `POST /projects/{project_identifier}/spans` route for span ingestion.

  * Added `log_spans` client method to submit a sequence of spans, rejecting the entire batch if any span is invalid or not unique.

  * Added `log_spans_dataframe` for submitting spans as a dataframe.

  * Introduced `uniquify_spans` and `uniquify_spans_dataframe` helpers to regenerate span and trace IDs while preserving relationships.

  * Improved validation and error handling to prevent partial ingestion and ensure safe, conflict-free span creation.

  #### Example Usage

  ```python theme={null}
  from phoenix.client import Client
  from phoenix.client.helpers.spans import uniquify_spans

  client = Client()

  spans = [
      {
          "name": "llm_call",
          "context": {"trace_id": "trace_123", "span_id": "span_456"},
          "start_time": "2024-01-15T10:00:00Z",
          "end_time": "2024-01-15T10:00:05Z",
          "span_kind": "LLM"
      }
  ]

  unique_spans = uniquify_spans(spans)
  result = client.spans.log_spans(
      project_identifier="my-project",
      spans=unique_spans,
  )
  ```

  <Card title="feat: Add `log_spans` to client and REST API by anticorrelator · Pull Request #8005 · Arize-ai/phoenix" icon="github" href="https://github.com/Arize-ai/phoenix/pull/8005" horizontal>
    GitHub
  </Card>
</Update>
