Metadata-Version: 2.4
Name: respan-instrumentation-openinference
Version: 1.2.5
Summary: Respan instrumentation wrapper for OpenInference
License: Apache 2.0
Author: Respan
Author-email: team@respan.ai
Requires-Python: >=3.11,<3.14
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: openinference-semantic-conventions (>=0.1.32,<0.2.0)
Requires-Dist: opentelemetry-semantic-conventions-ai (>=0.5.1,<0.6.0)
Requires-Dist: respan-tracing (>=2.15.2,<3.0.0)
Description-Content-Type: text/markdown

# respan-instrumentation-openinference

Respan's generic wrapper for
[OpenInference](https://github.com/Arize-ai/openinference) instrumentors.

It installs one OpenInference-to-Respan translator before the exporter and
adapts either standard `.instrument()` delegates or processor-style delegates
to Respan's `activate()` / `deactivate()` protocol:

```python
from openinference.instrumentation.google_adk import GoogleADKInstrumentor
from respan import Respan
from respan_instrumentation_openinference import OpenInferenceInstrumentor

respan = Respan(instrumentations=[OpenInferenceInstrumentor(GoogleADKInstrumentor)])
```

The translator emits the canonical span contract: log type, bounded JSON
input/output, model, provider, provider-reported usage, messages, tool
definitions, current-turn tool calls, and embedding content. Consumed raw
OpenInference attributes and legacy Respan/top-level aliases are removed before
export. Auto-instrumented spans do not receive `traceloop.span.kind`.

Activation is process-wide and reference-counted per upstream instrumentor
class. Deactivating one wrapper cannot remove a delegate still used by another
wrapper, externally active delegates are not claimed, and the final owner
removes the shared translator and delegate it owns.

