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

1from respan import Respan
2from respan_instrumentation_openinference import OpenInferenceInstrumentor
3
4# Pass any OpenInference instrumentor class
5from openinference.instrumentation.crewai import CrewAIInstrumentor
6
7respan = Respan(
8 instrumentations=[
9 OpenInferenceInstrumentor(instrumentor=CrewAIInstrumentor())
10 ]
11)
12
13# 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.