Remove 3rd party patterns from the sdk#1047
Merged
Conversation
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes the third-party OpenTelemetry instrumentation code for OpenAI from third_party/ and replaces it with an in-house implementation under agentops/instrumentation/openai. It also updates tests to point at the new wrapper infrastructure and adjusts the build configuration to stop packaging the deleted code.
- Deleted legacy third-party OpenTelemetry instrumentation for OpenAI under
third_party/opentelemetry - Added full in-house wrappers and instrumentor in
agentops/instrumentation/openai - Updated tests and
pyproject.tomlto reference the new modules
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| third_party/opentelemetry/instrumentation/openai/** | Entire directory removed to drop third-party code |
| agentops/instrumentation/openai/** | New in-house instrumentation wrappers and instrumentor |
| tests/unit/instrumentation/openai_core/test_instrumentor.py | Updated import paths and assertions for new wrappers |
| pyproject.toml | Removed wheel inclusion of third_party |
Comments suppressed due to low confidence (1)
agentops/instrumentation/openai/v0.py:93
- This else appears to pair with the first
if is_metrics_enabled()rather than the embeddings metrics block. After removing the guard, it now attempts to unpack eight variables where only two were set. Consider restoring the conditional or realigning the indentation so the else correctly covers embedding metric initialization.
else:
tcdent
approved these changes
Jun 10, 2025
Contributor
|
This is clean! |
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
📘 Description
Closes #1037
🧪 Testing
https://gist.github.com/Dwij1704/f4b3a9c1d34f3a956d0abfd7b7dffe39