opentelemetry-python-contrib icon indicating copy to clipboard operation
opentelemetry-python-contrib copied to clipboard

Add common gen AI utils into opentelemetry-instrumentation

Open aabmass opened this issue 10 months ago • 3 comments
trafficstars

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

aabmass avatar Jan 15 '25 17:01 aabmass

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

  1. Disable "oldest supported" tests py3x-test-instrumentation-openai-v2-0
  2. Wait until next release of opentelemetry-instrumentation is published to update OpenAI code

aabmass avatar Jan 15 '25 17:01 aabmass

2. Wait until next release of opentelemetry-instrumentation is 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.

aabmass avatar Jan 15 '25 23:01 aabmass

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

aabmass avatar Jan 17 '25 15:01 aabmass