> ## Documentation Index
> Fetch the complete documentation index at: https://www.adaline.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Log spans

# LogSpansClient

`adaline.logs.spans` searches individual spans and returns their full payloads — content, parsed content, attributes, tags, status, and timestamps. Use this when a trace-level search isn't granular enough for the filter you need. Every method is async.

## Access

```python theme={null}
from adaline.main import Adaline

adaline = Adaline()
spans = adaline.logs.spans  # LogSpansClient
```

The class is also exported directly:

```python theme={null}
from adaline.clients import LogSpansClient
```

Types from `adaline_api`:

```python theme={null}
from adaline_api.models.search_log_spans_request import SearchLogSpansRequest
from adaline_api.models.search_spans_response import SearchSpansResponse
```

***

## search()

Paginated span search with typed filter objects. Returns full span payloads — `content`, `attributes`, `parsed_content`, tags, status, timestamps.

```python theme={null}
async def search(*, query: SearchLogSpansRequest) -> SearchSpansResponse
```

### Parameters

| Name    | Type                                                                  | Required | Description                         |
| ------- | --------------------------------------------------------------------- | -------- | ----------------------------------- |
| `query` | [`SearchLogSpansRequest`](/docs/reference/api/v2/openapi/export-log-spans) | Yes      | Project, filters, sort, pagination. |

### Returns

[`SearchSpansResponse`](/docs/reference/api/v2/openapi/export-log-spans) with `{ data: list[SpanRow]; pagination: Pagination }`.

### Example

```python theme={null}
from adaline_api.models.search_log_spans_request import SearchLogSpansRequest

response = await adaline.logs.spans.search(
    query=SearchLogSpansRequest(
        project_id="project_abc123",
        filters=[
            {"type": "model", "column": "model", "operator": "equals", "value": "gpt-4o"},
            {"type": "status", "column": "status", "operator": "equals", "value": "failure"},
        ],
        sort="startedAt:desc",
        limit=50,
    )
)

for span in response.data:
    print(span.id, span.name, span.content.type)
```

***

## See Also

* [LogsClient](/docs/reference/sdk/v2/python/classes/logs) — parent client
* [LogTracesClient](/docs/reference/sdk/v2/python/classes/log-traces) — sibling sub-client for trace search
* API reference: [Search spans](/docs/reference/api/v2/openapi/export-log-spans)
