Repository navigation
feat(openai): extend version range to support openai v3 #393
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f6f934e
feat: support openai v3
lmolkova 186cf92
refactor(openai): rely on existing importorskip for httpx in interop …
lmolkova c02814f
fix(openai): use structural URL access to fix server.address with ope…
lmolkova 01bf8fc
fix(openai): add comment explaining structural URL access
lmolkova 9030b62
fix(openai): remove unused noqa directive and update uv.lock
lmolkova 32ce82e
feat(openai): add latest2 tox factor for openai v2 testing
lmolkova cd281f2
fix CI
lmolkova f3e0224
fix(openai): update _instruments version constraint to < 4
lmolkova 4e07915
docs: update generated README.md
lmolkova 7288613
Merge branch 'main' into copilot/support-openai-v3
lmolkova 75a6ace
Merge branch 'main' into copilot/support-openai-v3
lmolkova File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
1 change: 1 addition & 0 deletions
1
instrumentation/opentelemetry-instrumentation-genai-openai/.changelog/393.changed
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Extend supported version range for the openai library to include v3. | ||
1 change: 1 addition & 0 deletions
1
instrumentation/opentelemetry-instrumentation-genai-openai/.changelog/393.fixed
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Fix ``server.address`` and ``server.port`` not recorded when using openai v3 (httpx2 URL type). |
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
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
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
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
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
55 changes: 55 additions & 0 deletions
55
instrumentation/opentelemetry-instrumentation-genai-openai/tests/requirements.openai-v2.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # Copyright The OpenTelemetry Authors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
|
|
||
| # ******************************** | ||
| # WARNING: NOT HERMETIC !!!!!!!!!! | ||
| # ******************************** | ||
| # | ||
| # This "requirements.txt" is installed in conjunction | ||
| # with multiple other dependencies in the top-level "tox.ini" | ||
| # file. In particular, please see: | ||
| # | ||
| # openai-v2: {[testenv]test_deps} | ||
| # openai-v2: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-genai-openai/tests/requirements.openai-v2.txt | ||
| # | ||
| # This provides additional dependencies, namely: | ||
| # | ||
| # opentelemetry-api | ||
| # opentelemetry-sdk | ||
| # opentelemetry-semantic-conventions | ||
| # opentelemetry-instrumentation | ||
| # | ||
| # ... with a "dev" version based on the latest distribution. | ||
|
|
||
|
|
||
| # This variant of the requirements aims to test the system using | ||
| # the latest openai v2.x release (httpx-based, as opposed to the httpx2-based v3.x). | ||
| # It also includes opentelemetry-instrumentation-httpx to exercise the httpx interop tests. | ||
|
|
||
| openai==2.54.0 | ||
| # older pydantic is required for PyPy < 3.11 | ||
| pydantic==2.12.5 | ||
| httpx==0.28.1 | ||
| opentelemetry-instrumentation-httpx==0.64b0 | ||
| # older jiter is required for PyPy < 3.11 | ||
| jiter==0.11.1 | ||
| Deprecated==1.3.1 | ||
| importlib-metadata==9.0.0 | ||
| packaging==26.2 | ||
| wrapt==2.2.2 | ||
| # test with the latest version of opentelemetry-api, sdk, semantic conventions, and instrumentation | ||
|
|
||
| -e instrumentation/opentelemetry-instrumentation-genai-openai | ||
| -e util/opentelemetry-util-genai |
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.