OpenInference OTEL Tracing
OpenInference OTEL Tracing enables detailed observability of your LLM or agent workflows by automatically capturing inputs, outputs, and execution details as OpenTelemetry spans viewable in Arize AX. It provides decorators and helper methods for instrumenting functions, chains, agents, and tools — simplifying setup and reducing the need for manual tracing code.Installation
Ensure you have OpenInference and OpenTelemetry installed:Setting Up Tracing
You can configure tracing in two ways:- Option 1: Using
TracerProvider(OpenInference) - Option 2: Using
arize.otel.register
TracerProvider from openinference.instrumentation or using arize.otel.register.
- Using arize.otel.register
- Using TracerProvider
Using your Tracer
Yourtracer object can be used in two ways:
As a Decorator (trace an entire function)
my_func’s parameters and return.
As a Context Manager (trace a specific block)
Spans
For more information about all the different spans kinds you can trace & how to, you can check out our complete guide for spans.Additional Tracing Features
These utilities help you control or enrich your tracing:- Suppress tracing to skip certain spans (useful for non-critical or noisy code).
- Context attributes to add metadata (like
session_idoruser_id) to all spans in a block — making your traces searchable and contextual in Arize AX.
Suppress Tracing
Using Context Attributes
OpenInference OTEL Tracing makes it easy to instrument your LLM or agent workflows, visualize performance, and debug behavior directly inside Arize AX. For advanced configuration and supported frameworks, see the OpenInference Repo.