opentelemetry-python-contrib
opentelemetry-python-contrib copied to clipboard
Add common gen AI utils into opentelemetry-instrumentation
Description
Part of https://github.com/open-telemetry/opentelemetry-python-contrib/issues/3191
(Copied out of cohere PR https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3081)
Type of change
Refactor
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [x] Added tests
Does This PR Require a Core Repo Change?
- [ ] Yes. - Link to PR:
- [x] No.
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.
- [x] Followed the style guidelines of this project
- [x] Changelogs have been updated
- [x] Unit tests have been added
Lint and tests for OpenAI are failing because we test against oldest published supported dependencies https://github.com/open-telemetry/opentelemetry-python-contrib/blob/07c97eac380d2f86f09a95851fb6c38182537d05/tox.ini#L427-L429 https://github.com/open-telemetry/opentelemetry-python-contrib/blob/07c97eac380d2f86f09a95851fb6c38182537d05/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-0.txt#L12-L14
To move this PR forward we either need to
- Disable "oldest supported" tests
py3x-test-instrumentation-openai-v2-0 - Wait until next release of
opentelemetry-instrumentationis published to update OpenAI code
2. Wait until next release of
opentelemetry-instrumentationis published to update OpenAI code
I decided to do this, I've split the openai changes for now. I'll make a tracking bug to update the code once this PR is merged.
Putting this back in draft for now, see the comments on linked issue https://github.com/open-telemetry/opentelemetry-python-contrib/issues/3191#issuecomment-2596409863