Respan IBM watsonx.ai Instrumentation
Native Respan instrumentation for the official ibm-watsonx-ai Python SDK.
Installation
pip install respan-ai respan-instrumentation-watsonx ibm-watsonx-ai
Usage
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. Stream calls are finalized on normal completion, early close,
or failure and carry the canonical streaming flag. Embedding spans retain the
complete numeric vector payload, as required by the Respan span contract.
Create the model/client inside application code and close it according to the
IBM SDK lifecycle. Always call respan.shutdown() in an outer finally block
so buffered spans are exported even when the provider call fails.
Metadata
Release files for respan-instrumentation-watsonx 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| respan_instrumentation_watsonx-0.1.1.tar.gz | 12.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| respan_instrumentation_watsonx-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.6 kB
Release files / respan_instrumentation_watsonx-0.1.1.tar.gz
| Download URL | respan_instrumentation_watsonx-0.1.1.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7353c5674ed4a38d8a50aacc7e28cc4ac66113da571a1ca2fdd3d524134aa5ce
|
|
BLAKE2b-256 checksum How to use checksums |
8acc7069a75f898cd8362c1249da9d22cb453fd152c40f68f651ebaa14c12cbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / respan_instrumentation_watsonx-0.1.1-py3-none-any.whl
| Download URL | respan_instrumentation_watsonx-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a31e3b846e8c52ee5eec26d1b9c1ab0772f8aa985bf6fa7926bd991bb2ae01fd
|
|
BLAKE2b-256 checksum How to use checksums |
b226248bb3a7b4ae846ac8e2bf1709c4f8bad87a75b43fd0f12b35d8679e2c51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|