Merged
Conversation
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
…ion with new methods
…WatsonXInstrumentor to reflect changes in library dependencies.
Contributor
There was a problem hiding this comment.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📥 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