-
Notifications
You must be signed in to change notification settings - Fork 509
Add IBM watsonx.ai instrumentation #941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
…ion with new methods
…WatsonXInstrumentor to reflect changes in library dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds instrumentation support for the IBM watsonx.ai API in AgentOps, providing telemetry tracking for model operations including text generation, chat completions, streaming responses, tokenization, and model details. Key changes include:
- Introduction of the IBMWatsonXInstrumentor and dedicated stream wrappers for handling streaming responses.
- Implementation of utilities for attribute extraction and conversion from IBM watsonx.ai API parameters.
- Updates to method wrapping to support both standard and streaming API calls.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| agentops/instrumentation/ibm_watsonx_ai/stream_wrapper.py | Implements stream wrappers with telemetry for streaming responses. |
| agentops/instrumentation/ibm_watsonx_ai/instrumentor.py | Introduces the IBMWatsonXInstrumentor and method wrapping logic. |
| agentops/instrumentation/ibm_watsonx_ai/attributes/common.py | Provides common attribute extraction utilities and parameter conversion. |
| agentops/instrumentation/ibm_watsonx_ai/attributes/attributes.py | Implements attribute extraction functions for different API operations. |
| agentops/instrumentation/ibm_watsonx_ai/attributes/init.py | Exposes attribute extraction utilities. |
| agentops/instrumentation/ibm_watsonx_ai/init.py | Sets up constants and versioning for IBM watsonx.ai instrumentation. |
| agentops/instrumentation/init.py | Updates the instrumentor loader to include the IBM watsonx.ai instrumentor. |
📥 Pull Request
Closes #940
📘 Description
The insrumentation covers
🧪 Testing
(Ping me for ENV vars) -- Update - Added on gist itself
Python >=3.10 <3.13
pip install ibm-watsonx-ai
https://gist.github.com/Dwij1704/532f93989540dd924bb210106faf3049