Skip to main content

Module

Supported automatic OpenTelemetry export and HTTP instrumentation setup.

_InstrumentationChanges

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

rollback

Undo only components installed by this invocation.

configure_distributed_tracing

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

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.