---
title: Traces API Overview
description: Search and retrieve distributed traces and spans from OpenObserve using the trace API, exploring the full execution path of requests across your services.
---


This documentation provides comprehensive guidance on using the OpenObserve API to search and retrieve traces from your application. Traces in OpenObserve represent the complete operational flow of requests through your system, showing the full tree of operations and their sub-operations (spans).

:::accordion[What are Traces?]
- **Traces** describe complete operations in your system.
- Each trace represents the full execution path of a request.
- Traces contain multiple **spans** that represent sub-operations or functions.
- Each trace has a unique trace ID.
:::

:::accordion[What are Spans?]
- **Spans** are individual operations within a trace.
- They represent specific functions, service calls, or operations.
- Each span has its own unique span ID.
- Spans are organized in a tree structure within a trace.
:::

:::accordion[Example: OpenObserve Search Operation]
When a user performs a search query in OpenObserve:

- The **trace** represents the entire search operation from query initiation to result return.
- **Spans** might include: scheduler evaluation, query processing, gRPC search execution, cache operations, database interactions.
- You can see the complete flow showing how the operation moves through different OpenObserve services (scheduler → querier → search services).
- Each span shows the duration and status of individual OpenObserve components involved in processing the search request.
:::

## API Endpoints

- [Get latest traces using `/api/{org_id}/{stream_name}/traces/latest`](trace-search-api.md)