OpenInference Instrumentor

Use any OpenInference instrumentor with Respan.

OpenInferenceInstrumentor is a generic wrapper that adapts any OpenInference instrumentor to Respan’s plugin protocol. This lets you use the full OpenInference ecosystem (30+ instrumentors) with Respan.

Install

pip install respan-ai respan-instrumentation-openinference

Then install the specific OpenInference instrumentor you need:

pip install openinference-instrumentation-crewai # CrewAI
pip install openinference-instrumentation-langchain # LangChain
pip install openinference-instrumentation-llama-index # LlamaIndex
pip install openinference-instrumentation-openai # OpenAI
pip install openinference-instrumentation-anthropic # Anthropic
pip install openinference-instrumentation-bedrock # AWS Bedrock
pip install openinference-instrumentation-google-adk # Google ADK
pip install openinference-instrumentation-pydantic-ai # Pydantic AI
# ... and 20+ more

Usage

from respan import Respan
from respan_instrumentation_openinference import OpenInferenceInstrumentor
# Pass any OpenInference instrumentor class
from openinference.instrumentation.crewai import CrewAIInstrumentor
respan = Respan(
instrumentations=[
OpenInferenceInstrumentor(instrumentor=CrewAIInstrumentor())
]
)
# All CrewAI calls are now auto-traced and sent to Respan

How it works

  1. The wrapper calls instrumentor.instrument() which patches the target library
  2. OpenInference spans are emitted via OpenTelemetry
  3. Respan’s composite processor auto-enriches OpenInference attributes into Traceloop/GenAI equivalents
  4. Spans appear in Respan with full model, tokens, input/output data

Supported instrumentors

See the full OpenInference list — any instrumentor that follows the OpenInference protocol works with this wrapper.