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

# Tracing & observability

> Apollo-style tracing and OpenTelemetry spans via schema extensions.

Both tracers are [schema extensions](/data/schema-extensions), so they attach with
`Schema(extensions=[...])` and add no cost when absent.

## Apollo tracing

`ApolloTracingExtension` merges per-operation and per-field timing into
`ExecutionResult.extensions["tracing"]`.

```python theme={null}
from fastql import Schema
from fastql.tracing import ApolloTracingExtension

schema = Schema(query=Query, extensions=[ApolloTracingExtension()])
```

## OpenTelemetry

`OpenTelemetryExtension` emits an operation span and a child span per resolved field.
It lives behind the `[opentelemetry]` extra and imports the dependency lazily.

```bash theme={null}
pip install mygenx-fastql[opentelemetry]
```

```python theme={null}
from fastql.opentelemetry import OpenTelemetryExtension

schema = Schema(query=Query, extensions=[OpenTelemetryExtension()])
```

Pass a custom `tracer=` to integrate with an existing provider. Without the extra
installed, instantiating the extension raises an `ImportError` naming
`mygenx-fastql[opentelemetry]`; the core itself never imports OpenTelemetry.
