> ## Documentation Index
> Fetch the complete documentation index at: https://agent-observability-docs.splunk.com/llms.txt
> Use this file to discover all available pages before exploring further.

# http_instrumentation

## Module

Supported automatic OpenTelemetry export and HTTP instrumentation setup.

## \_InstrumentationChanges

Components installed by one facade invocation and safe to roll back.

### rollback

```python theme={null}
def rollback(self) -> None
```

Undo only components installed by this invocation.

## configure\_distributed\_tracing

```python theme={null}
def configure_distributed_tracing(*,
                                  tracer_provider: SDKTracerProvider | None=None,
                                  app: Any | None=None,
                                  instrument_requests: bool=True,
                                  instrument_httpx: bool=True,
                                  instrument_aiohttp_client: bool=True) -> SDKTracerProvider
```

Configure Splunk AO export and supported automatic HTTP propagation.

**Arguments**

* `tracer_provider` (`SDKTracerProvider | None`): Optional application-owned OpenTelemetry SDK provider. A new provider
  is created when omitted. This function never replaces the process-global
  provider.
* `app` (`Any | None`): Optional FastAPI or Starlette application to instrument.
* `instrument_requests` (`bool`): Whether to instrument process-wide Requests clients.
* `instrument_httpx` (`bool`): Whether to instrument process-wide HTTPX sync and async clients.
* `instrument_aiohttp_client` (`bool`): Whether to instrument process-wide aiohttp clients.

**Returns**

* `SDKTracerProvider`: The configured provider. The caller owns it and must call `shutdown()`
  during process teardown.

**Notes**

Repeated calls with the same provider do not attach another Splunk AO span
processor. Use `instrument_distributed_tracing()` instead when export
has already been configured separately on the provider. This function also
wraps the current process-global text-map propagator for session baggage.
Install a custom global propagator first; replacing it afterward removes
the session adapter.

## instrument\_distributed\_tracing

```python theme={null}
def instrument_distributed_tracing(*,
                                   tracer_provider: TracerProvider | None=None,
                                   app: Any | None=None,
                                   instrument_requests: bool=True,
                                   instrument_httpx: bool=True,
                                   instrument_aiohttp_client: bool=True) -> None
```

Enable supported upstream OTel server and client instrumentation.

**Arguments**

* `tracer_provider` (`TracerProvider | None`): Caller-owned provider used by the upstream instrumentors. The current
  global provider is used when omitted; this function never replaces it.
* `app` (`Any | None`): Optional FastAPI or Starlette application to instrument.
* `instrument_requests` (`bool`): Whether to instrument process-wide Requests clients.
* `instrument_httpx` (`bool`): Whether to instrument process-wide HTTPX sync and async clients.
* `instrument_aiohttp_client` (`bool`): Whether to instrument process-wide aiohttp clients.

**Notes**

Client instrumentation is process-wide. Configure each supported client
through one owner. The caller also owns provider shutdown. This function
wraps the current process-global text-map propagator so explicit Splunk AO
sessions can use W3C baggage. Install any custom global propagator before
calling this function; replacing it afterward removes the session adapter.
