Metadata-Version: 2.4
Name: respan-instrumentation-watsonx
Version: 0.1.0
Summary: Respan instrumentation plugin for IBM watsonx.ai
License: Apache 2.0
Author: Respan
Author-email: team@respan.ai
Requires-Python: >=3.11,<3.15
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
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: ibm-watsonx-ai (>=1.0.0)
Requires-Dist: opentelemetry-semantic-conventions-ai (>=0.4.1)
Requires-Dist: respan-sdk (>=2.6.1)
Requires-Dist: respan-tracing (>=2.17.0,<3.0.0)
Description-Content-Type: text/markdown

# Respan IBM watsonx.ai Instrumentation

Native Respan instrumentation for the official `ibm-watsonx-ai` Python SDK.

## Installation

```bash
pip install respan-ai respan-instrumentation-watsonx ibm-watsonx-ai
```

## Usage

```python
from respan import Respan
from respan_instrumentation_watsonx import WatsonxInstrumentor

respan = Respan(
    api_key="RESPAN_API_KEY",
    instrumentations=[WatsonxInstrumentor()],
)
```

The instrumentor traces:

- `ModelInference.generate()`
- `ModelInference.generate_text()`
- `ModelInference.generate_text_stream()`
- `ModelInference.chat()`
- `ModelInference.chat_stream()`
- `ModelInference.agenerate()`
- `ModelInference.agenerate_stream()`
- `ModelInference.achat()`
- `ModelInference.achat_stream()`
- `Embeddings.generate()`
- `Embeddings.embed_query()`
- `Embeddings.embed_documents()`
- `Embeddings.agenerate()`
- `Embeddings.aembed_query()`
- `Embeddings.aembed_documents()`

Chat and text-generation spans use canonical GenAI fields such as
`gen_ai.prompt.*`, `gen_ai.completion.*`, `llm.request.functions`, and token
usage attributes. Embedding spans record the input and usage metadata but do not
export embedding vectors.

