From 221f15dee8b7e8d98dff693718b67ddd4d778e61 Mon Sep 17 00:00:00 2001 From: Leighton Chen Date: Thu, 29 Aug 2024 11:33:24 -0700 Subject: [PATCH 1/9] Merge branch 'main' of https://github.com/open-telemetry/opentelemetry-python-contrib into bugfix/registered-method-error From 827ff8c439abf4ceb9b2c445b3b5303c5d793101 Mon Sep 17 00:00:00 2001 From: Leighton Chen Date: Wed, 30 Oct 2024 13:51:09 -0700 Subject: [PATCH 2/9] add --- .github/component_owners.yml | 4 ++++ CONTRIBUTING.md | 5 +++++ README.md | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/component_owners.yml b/.github/component_owners.yml index dcc1013476..4892f619df 100644 --- a/.github/component_owners.yml +++ b/.github/component_owners.yml @@ -66,3 +66,7 @@ components: processor/opentelemetry-processor-baggage: - codeboten + + instrumentation/genai/: + - lmolkova + - lzchen diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8d72683692..c9abd771a1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,6 +34,7 @@ Please also read the [OpenTelemetry Contributor Guide](https://github.com/open-t * [Testing against a different Core repo branch/commit](#testing-against-a-different-core-repo-branchcommit) * [Style Guide](#style-guide) * [Guideline for instrumentations](#guideline-for-instrumentations) +* [Guidance for GenAI instrumentations](#guideline-for-genai-instrumentations) * [Expectations from contributors](#expectations-from-contributors) ## Find a Buddy and get Started Quickly @@ -272,6 +273,10 @@ Below is a checklist of things to be mindful of when implementing a new instrume - ex. - All instrumentations have the same version. If you are going to develop a new instrumentation it would probably have `X.Y.dev` version and depends on `opentelemetry-instrumentation` and `opentelemetry-semantic-conventions` for the same version. That means that if you want to install your instrumentation you need to install its dependencies from this repo and the core repo also from git. +## Guidance for GenAI instrumentations + +Instrumentations that relate to [generative AI](https://opentelemetry.io/docs/specs/semconv/gen-ai/) systems will be placed in [genai](./instrumentation/genai) folder. This section covers contributions related to those instrumentations. Please note that the [guidelines for instrumentations](#guideline-for-instrumentations) and [expectations from contributors](#expectations-from-contributors) still apply. If you would like to be tagged in PRs related to these instrumentations, please submit a PR to add your github alias to [component_owners.yml](.github/component_owners.yml) under the corresponding instrumentation folder(s). If you would like to be able to approve PRs related to these instrumentations, you must join [opentelemetry-python-contrib-approvers](https://github.com/orgs/open-telemetry/teams/opentelemetry-python-contrib-approvers) team. Please ask one of the [Python contrib maintainers](https://github.com/orgs/open-telemetry/teams/opentelemetry-python-contrib-maintainers) to be accepted into the team. For tracking issues related to generative AI, please filter/add a label for [gen-ai](https://github.com/open-telemetry/opentelemetry-python-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Agen-ai) to filter for/create issues. If you do not see an issue related to an instrumentation you would like to contribute, please create a new tracking issue so the community is aware of it's progress. + ## Expectations from contributors OpenTelemetry is an open source community, and as such, greatly encourages contributions from anyone interested in the project. With that being said, there is a certain level of expectation from contributors even after a pull request is merged, specifically pertaining to instrumentations. The OpenTelemetry Python community expects contributors to maintain a level of support and interest in the instrumentations they contribute. This is to ensure that the instrumentation does not become stale and still functions the way the original contributor intended. Some instrumentations also pertain to libraries that the current members of the community are not so familiar with, so it is necessary to rely on the expertise of the original contributing parties. diff --git a/README.md b/README.md index a04c4b7c7b..8582c472ba 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,6 @@ Emeritus Approvers: Maintainers ([@open-telemetry/python-maintainers](https://github.com/orgs/open-telemetry/teams/python-maintainers)): - [Aaron Abbott](https://github.com/aabmass), Google -- [Diego Hurtado](https://github.com/ocelotl), Lightstep - [Leighton Chen](https://github.com/lzchen), Microsoft - [Riccardo Magliocchetti](https://github.com/xrmx), Elastic - [Shalev Roda](https://github.com/shalevr), Cisco @@ -141,6 +140,7 @@ Maintainers ([@open-telemetry/python-maintainers](https://github.com/orgs/open-t Emeritus Maintainers: - [Alex Boten](https://github.com/codeboten), Lightstep +- [Diego Hurtado](https://github.com/ocelotl), Lightstep - [Owais Lone](https://github.com/owais), Splunk - [Yusuke Tsutsumi](https://github.com/toumorokoshi), Google From 6d618ed105f61a8a695cf8e009e1b5e9bbd70364 Mon Sep 17 00:00:00 2001 From: Leighton Chen Date: Wed, 30 Oct 2024 14:08:14 -0700 Subject: [PATCH 3/9] move openai-v2 --- .../opentelemetry-instrumentation-openai-v2/CHANGELOG.md | 0 .../{ => genai}/opentelemetry-instrumentation-openai-v2/LICENSE | 0 .../opentelemetry-instrumentation-openai-v2/README.rst | 0 .../opentelemetry-instrumentation-openai-v2/pyproject.toml | 0 .../src/opentelemetry/instrumentation/openai_v2/__init__.py | 0 .../src/opentelemetry/instrumentation/openai_v2/package.py | 0 .../src/opentelemetry/instrumentation/openai_v2/patch.py | 0 .../src/opentelemetry/instrumentation/openai_v2/utils.py | 0 .../src/opentelemetry/instrumentation/openai_v2/version.py | 0 .../opentelemetry-instrumentation-openai-v2/test-requirements.txt | 0 .../opentelemetry-instrumentation-openai-v2/tests/__init__.py | 0 .../tests/cassettes/test_chat_completion_404.yaml | 0 .../tests/cassettes/test_chat_completion_extra_params.yaml | 0 .../tests/cassettes/test_chat_completion_multiple_choices.yaml | 0 .../test_chat_completion_multiple_choices_streaming.yaml | 0 .../test_chat_completion_multiple_tools_streaming_no_content.yaml | 0 ...est_chat_completion_multiple_tools_streaming_with_content.yaml | 0 .../tests/cassettes/test_chat_completion_streaming.yaml | 0 .../cassettes/test_chat_completion_streaming_not_complete.yaml | 0 .../cassettes/test_chat_completion_tool_calls_no_content.yaml | 0 .../cassettes/test_chat_completion_tool_calls_with_content.yaml | 0 .../tests/cassettes/test_chat_completion_with_content.yaml | 0 .../opentelemetry-instrumentation-openai-v2/tests/conftest.py | 0 .../tests/test_chat_completions.py | 0 24 files changed, 0 insertions(+), 0 deletions(-) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/CHANGELOG.md (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/LICENSE (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/README.rst (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/pyproject.toml (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/package.py (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/version.py (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/test-requirements.txt (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/tests/__init__.py (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_404.yaml (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_extra_params.yaml (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices.yaml (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices_streaming.yaml (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_no_content.yaml (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_with_content.yaml (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming.yaml (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming_not_complete.yaml (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_no_content.yaml (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_with_content.yaml (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_with_content.yaml (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/tests/conftest.py (100%) rename instrumentation/{ => genai}/opentelemetry-instrumentation-openai-v2/tests/test_chat_completions.py (100%) diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/CHANGELOG.md b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/CHANGELOG.md rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/LICENSE b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/LICENSE similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/LICENSE rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/LICENSE diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/README.rst b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/README.rst similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/README.rst rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/README.rst diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/pyproject.toml b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/pyproject.toml similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/pyproject.toml rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/pyproject.toml diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/package.py b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/package.py similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/package.py rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/package.py diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/version.py b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/version.py similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/version.py rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/version.py diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/test-requirements.txt b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/test-requirements.txt rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/tests/__init__.py b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/__init__.py similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/tests/__init__.py rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/__init__.py diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_404.yaml b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_404.yaml similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_404.yaml rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_404.yaml diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_extra_params.yaml b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_extra_params.yaml similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_extra_params.yaml rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_extra_params.yaml diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices.yaml b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices.yaml similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices.yaml rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices.yaml diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices_streaming.yaml b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices_streaming.yaml similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices_streaming.yaml rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices_streaming.yaml diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_no_content.yaml b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_no_content.yaml similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_no_content.yaml rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_no_content.yaml diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_with_content.yaml b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_with_content.yaml similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_with_content.yaml rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_with_content.yaml diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming.yaml b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming.yaml similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming.yaml rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming.yaml diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming_not_complete.yaml b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming_not_complete.yaml similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming_not_complete.yaml rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming_not_complete.yaml diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_no_content.yaml b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_no_content.yaml similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_no_content.yaml rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_no_content.yaml diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_with_content.yaml b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_with_content.yaml similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_with_content.yaml rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_with_content.yaml diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_with_content.yaml b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_with_content.yaml similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_with_content.yaml rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_with_content.yaml diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/tests/conftest.py b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/tests/conftest.py rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py diff --git a/instrumentation/opentelemetry-instrumentation-openai-v2/tests/test_chat_completions.py b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/test_chat_completions.py similarity index 100% rename from instrumentation/opentelemetry-instrumentation-openai-v2/tests/test_chat_completions.py rename to instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/test_chat_completions.py From 9f7322efa67fa1bd02d67ada46677b8f4417553e Mon Sep 17 00:00:00 2001 From: Leighton Chen Date: Wed, 30 Oct 2024 14:24:46 -0700 Subject: [PATCH 4/9] update folders --- .github/component_owners.yml | 1 + .../test-requirements.txt | 2 +- tox.ini | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/component_owners.yml b/.github/component_owners.yml index 4892f619df..5ee162e5b4 100644 --- a/.github/component_owners.yml +++ b/.github/component_owners.yml @@ -68,5 +68,6 @@ components: - codeboten instrumentation/genai/: + - karthikscale3 - lmolkova - lzchen diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt index a3d7402a9c..2c1e0b35f0 100644 --- a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt +++ b/instrumentation/genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt @@ -8,4 +8,4 @@ pytest-vcr==1.0.2 wrapt==1.16.0 -e opentelemetry-instrumentation --e instrumentation/opentelemetry-instrumentation-openai-v2 +-e instrumentation/genai/opentelemetry-instrumentation-openai-v2 diff --git a/tox.ini b/tox.ini index 53c55561b6..4108633498 100644 --- a/tox.ini +++ b/tox.ini @@ -414,7 +414,7 @@ commands_pre = openai: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions openai: pip install opentelemetry-sdk@{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk openai: pip install opentelemetry-test-utils@{env:CORE_REPO}\#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils - openai: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-openai-v2/test-requirements.txt + openai: pip install -r {toxinidir}/instrumentation/genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt distro: pip install opentelemetry-api@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api distro: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions @@ -471,7 +471,7 @@ commands_pre = openai: pip install opentelemetry-api@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api openai: pip install opentelemetry-sdk@{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk openai: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions - openai: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-openai-v2/test-requirements.txt + openai: pip install -r {toxinidir}/instrumentation/genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt confluent-kafka: pip install opentelemetry-api@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api confluent-kafka: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions @@ -910,8 +910,8 @@ commands = test-instrumentation-mysqlclient: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-mysqlclient/tests {posargs} lint-instrumentation-mysqlclient: sh -c "cd instrumentation && pylint --rcfile ../.pylintrc opentelemetry-instrumentation-mysqlclient" - test-instrumentation-openai-v2: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-openai-v2/tests {posargs} - lint-instrumentation-openai-v2: sh -c "cd instrumentation && pylint --rcfile ../.pylintrc opentelemetry-instrumentation-openai-v2" + test-instrumentation-openai-v2: pytest {toxinidir}/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests {posargs} + lint-instrumentation-openai-v2: sh -c "cd instrumentation/genai && pylint --rcfile ../../.pylintrc opentelemetry-instrumentation-openai-v2" test-instrumentation-sio-pika: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-pika/tests {posargs} lint-instrumentation-sio-pika: sh -c "cd instrumentation && pylint --rcfile ../.pylintrc opentelemetry-instrumentation-pika" From 04f555772fe798755c6f4c6eb11dfa391fb965a7 Mon Sep 17 00:00:00 2001 From: Leighton Chen Date: Fri, 1 Nov 2024 10:02:10 -0700 Subject: [PATCH 5/9] Update CONTRIBUTING.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com> --- CONTRIBUTING.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c9abd771a1..798b1ef571 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -275,7 +275,15 @@ Below is a checklist of things to be mindful of when implementing a new instrume ## Guidance for GenAI instrumentations -Instrumentations that relate to [generative AI](https://opentelemetry.io/docs/specs/semconv/gen-ai/) systems will be placed in [genai](./instrumentation/genai) folder. This section covers contributions related to those instrumentations. Please note that the [guidelines for instrumentations](#guideline-for-instrumentations) and [expectations from contributors](#expectations-from-contributors) still apply. If you would like to be tagged in PRs related to these instrumentations, please submit a PR to add your github alias to [component_owners.yml](.github/component_owners.yml) under the corresponding instrumentation folder(s). If you would like to be able to approve PRs related to these instrumentations, you must join [opentelemetry-python-contrib-approvers](https://github.com/orgs/open-telemetry/teams/opentelemetry-python-contrib-approvers) team. Please ask one of the [Python contrib maintainers](https://github.com/orgs/open-telemetry/teams/opentelemetry-python-contrib-maintainers) to be accepted into the team. For tracking issues related to generative AI, please filter/add a label for [gen-ai](https://github.com/open-telemetry/opentelemetry-python-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Agen-ai) to filter for/create issues. If you do not see an issue related to an instrumentation you would like to contribute, please create a new tracking issue so the community is aware of it's progress. +Instrumentations that relate to [Generative AI](https://opentelemetry.io/docs/specs/semconv/gen-ai/) systems will be placed in the [genai](./instrumentation/genai) folder. This section covers contributions related to those instrumentations. Please note that the [guidelines for instrumentations](#guideline-for-instrumentations) and [expectations from contributors](#expectations-from-contributors) still apply. + +### Get Involved + +* Reviewing PRs: If you would like to be tagged as reviewer in new PRs related to these instrumentations, please submit a PR to add your GitHub handle to [component_owners.yml](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2944/.github/component_owners.yml) under the corresponding instrumentation folder(s). + +* Approving PRs: If you would like to be able to approve PRs related to these instrumentations, you must join [opentelemetry-python-contrib-approvers](https://github.com/orgs/open-telemetry/teams/opentelemetry-python-contrib-approvers) team. Please ask one of the [Python contrib maintainers](https://github.com/orgs/open-telemetry/teams/opentelemetry-python-contrib-maintainers) to be accepted into the team. + +* Tracking and Creating Issues: For tracking issues related to Generative AI, please filter or add the label [gen-ai](https://github.com/open-telemetry/opentelemetry-python-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Agen-ai) when creating or searching issues. If you do not see an issue related to an instrumentation you would like to contribute to, please create a new tracking issue so the community is aware of its progress. ## Expectations from contributors From 2fb7a85f786d203bc5b67d227c6338db6e9944a5 Mon Sep 17 00:00:00 2001 From: Leighton Chen Date: Fri, 1 Nov 2024 15:15:45 -0700 Subject: [PATCH 6/9] move folder --- .github/component_owners.yml | 2 +- .../opentelemetry-instrumentation-openai-v2/CHANGELOG.md | 0 .../opentelemetry-instrumentation-openai-v2/LICENSE | 0 .../opentelemetry-instrumentation-openai-v2/README.rst | 0 .../pyproject.toml | 0 .../opentelemetry/instrumentation/openai_v2/__init__.py | 0 .../opentelemetry/instrumentation/openai_v2/package.py | 0 .../src/opentelemetry/instrumentation/openai_v2/patch.py | 0 .../src/opentelemetry/instrumentation/openai_v2/utils.py | 0 .../opentelemetry/instrumentation/openai_v2/version.py | 0 .../test-requirements.txt | 2 +- .../tests/__init__.py | 0 .../tests/cassettes/test_chat_completion_404.yaml | 0 .../cassettes/test_chat_completion_extra_params.yaml | 0 .../cassettes/test_chat_completion_multiple_choices.yaml | 0 .../test_chat_completion_multiple_choices_streaming.yaml | 0 ...at_completion_multiple_tools_streaming_no_content.yaml | 0 ..._completion_multiple_tools_streaming_with_content.yaml | 0 .../tests/cassettes/test_chat_completion_streaming.yaml | 0 .../test_chat_completion_streaming_not_complete.yaml | 0 .../test_chat_completion_tool_calls_no_content.yaml | 0 .../test_chat_completion_tool_calls_with_content.yaml | 0 .../cassettes/test_chat_completion_with_content.yaml | 0 .../tests/conftest.py | 0 .../tests/test_chat_completions.py | 0 tox.ini | 8 ++++---- 26 files changed, 6 insertions(+), 6 deletions(-) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/CHANGELOG.md (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/LICENSE (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/README.rst (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/pyproject.toml (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/package.py (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/version.py (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/test-requirements.txt (73%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/tests/__init__.py (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_404.yaml (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_extra_params.yaml (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices.yaml (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices_streaming.yaml (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_no_content.yaml (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_with_content.yaml (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming.yaml (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming_not_complete.yaml (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_no_content.yaml (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_with_content.yaml (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_with_content.yaml (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/tests/conftest.py (100%) rename {instrumentation/genai => instrumentation-genai}/opentelemetry-instrumentation-openai-v2/tests/test_chat_completions.py (100%) diff --git a/.github/component_owners.yml b/.github/component_owners.yml index 5ee162e5b4..621e00b005 100644 --- a/.github/component_owners.yml +++ b/.github/component_owners.yml @@ -67,7 +67,7 @@ components: processor/opentelemetry-processor-baggage: - codeboten - instrumentation/genai/: + instrumentation-genai/: - karthikscale3 - lmolkova - lzchen diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/LICENSE b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/LICENSE similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/LICENSE rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/LICENSE diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/README.rst b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/README.rst similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/README.rst rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/README.rst diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/pyproject.toml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/pyproject.toml similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/pyproject.toml rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/pyproject.toml diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/package.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/package.py similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/package.py rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/package.py diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/version.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/version.py similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/version.py rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/version.py diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt similarity index 73% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt index 2c1e0b35f0..09a7c75c16 100644 --- a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt @@ -8,4 +8,4 @@ pytest-vcr==1.0.2 wrapt==1.16.0 -e opentelemetry-instrumentation --e instrumentation/genai/opentelemetry-instrumentation-openai-v2 +-e instrumentation-genai/opentelemetry-instrumentation-openai-v2 diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/__init__.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/__init__.py similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/__init__.py rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/__init__.py diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_404.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_404.yaml similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_404.yaml rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_404.yaml diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_extra_params.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_extra_params.yaml similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_extra_params.yaml rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_extra_params.yaml diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices.yaml similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices.yaml rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices.yaml diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices_streaming.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices_streaming.yaml similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices_streaming.yaml rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices_streaming.yaml diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_no_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_no_content.yaml similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_no_content.yaml rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_no_content.yaml diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_with_content.yaml similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_with_content.yaml rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_with_content.yaml diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming.yaml similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming.yaml rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming.yaml diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming_not_complete.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming_not_complete.yaml similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming_not_complete.yaml rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming_not_complete.yaml diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_no_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_no_content.yaml similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_no_content.yaml rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_no_content.yaml diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_with_content.yaml similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_with_content.yaml rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_with_content.yaml diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_with_content.yaml similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_with_content.yaml rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_with_content.yaml diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py diff --git a/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/test_chat_completions.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_chat_completions.py similarity index 100% rename from instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests/test_chat_completions.py rename to instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_chat_completions.py diff --git a/tox.ini b/tox.ini index 4108633498..e57e495448 100644 --- a/tox.ini +++ b/tox.ini @@ -414,7 +414,7 @@ commands_pre = openai: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions openai: pip install opentelemetry-sdk@{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk openai: pip install opentelemetry-test-utils@{env:CORE_REPO}\#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils - openai: pip install -r {toxinidir}/instrumentation/genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt + openai: pip install -r {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt distro: pip install opentelemetry-api@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api distro: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions @@ -471,7 +471,7 @@ commands_pre = openai: pip install opentelemetry-api@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api openai: pip install opentelemetry-sdk@{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk openai: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions - openai: pip install -r {toxinidir}/instrumentation/genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt + openai: pip install -r {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements.txt confluent-kafka: pip install opentelemetry-api@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api confluent-kafka: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions @@ -910,8 +910,8 @@ commands = test-instrumentation-mysqlclient: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-mysqlclient/tests {posargs} lint-instrumentation-mysqlclient: sh -c "cd instrumentation && pylint --rcfile ../.pylintrc opentelemetry-instrumentation-mysqlclient" - test-instrumentation-openai-v2: pytest {toxinidir}/instrumentation/genai/opentelemetry-instrumentation-openai-v2/tests {posargs} - lint-instrumentation-openai-v2: sh -c "cd instrumentation/genai && pylint --rcfile ../../.pylintrc opentelemetry-instrumentation-openai-v2" + test-instrumentation-openai-v2: pytest {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests {posargs} + lint-instrumentation-openai-v2: sh -c "cd instrumentation-genai && pylint --rcfile ../../.pylintrc opentelemetry-instrumentation-openai-v2" test-instrumentation-sio-pika: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-pika/tests {posargs} lint-instrumentation-sio-pika: sh -c "cd instrumentation && pylint --rcfile ../.pylintrc opentelemetry-instrumentation-pika" From 8d5e11c55263632f3de82358cea6ed61d66cd966 Mon Sep 17 00:00:00 2001 From: Leighton Chen Date: Fri, 1 Nov 2024 15:36:30 -0700 Subject: [PATCH 7/9] remove --- .../src/opentelemetry/instrumentation/bootstrap_gen.py | 4 ---- tox.ini | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py index 95d25026f9..ff6065d058 100644 --- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py +++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py @@ -120,10 +120,6 @@ "library": "mysqlclient < 3", "instrumentation": "opentelemetry-instrumentation-mysqlclient==0.49b0.dev", }, - { - "library": "openai >= 1.0.0", - "instrumentation": "opentelemetry-instrumentation-openai-v2==2.0.0.dev", - }, { "library": "pika >= 0.12.0", "instrumentation": "opentelemetry-instrumentation-pika==0.49b0.dev", diff --git a/tox.ini b/tox.ini index e57e495448..62eeb03be2 100644 --- a/tox.ini +++ b/tox.ini @@ -911,7 +911,7 @@ commands = lint-instrumentation-mysqlclient: sh -c "cd instrumentation && pylint --rcfile ../.pylintrc opentelemetry-instrumentation-mysqlclient" test-instrumentation-openai-v2: pytest {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests {posargs} - lint-instrumentation-openai-v2: sh -c "cd instrumentation-genai && pylint --rcfile ../../.pylintrc opentelemetry-instrumentation-openai-v2" + lint-instrumentation-openai-v2: sh -c "cd instrumentation-genai && pylint --rcfile ../.pylintrc opentelemetry-instrumentation-openai-v2" test-instrumentation-sio-pika: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-pika/tests {posargs} lint-instrumentation-sio-pika: sh -c "cd instrumentation && pylint --rcfile ../.pylintrc opentelemetry-instrumentation-pika" From 65f72cb33e696714a8a677e27baa6fdd913d9e76 Mon Sep 17 00:00:00 2001 From: Leighton Chen Date: Fri, 1 Nov 2024 15:52:09 -0700 Subject: [PATCH 8/9] Update pyproject.toml --- opentelemetry-contrib-instrumentations/pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/opentelemetry-contrib-instrumentations/pyproject.toml b/opentelemetry-contrib-instrumentations/pyproject.toml index 2b6b2cfedb..b34226b669 100644 --- a/opentelemetry-contrib-instrumentations/pyproject.toml +++ b/opentelemetry-contrib-instrumentations/pyproject.toml @@ -57,7 +57,6 @@ dependencies = [ "opentelemetry-instrumentation-logging==0.49b0.dev", "opentelemetry-instrumentation-mysql==0.49b0.dev", "opentelemetry-instrumentation-mysqlclient==0.49b0.dev", - "opentelemetry-instrumentation-openai-v2==2.0.0.dev", "opentelemetry-instrumentation-pika==0.49b0.dev", "opentelemetry-instrumentation-psycopg==0.49b0.dev", "opentelemetry-instrumentation-psycopg2==0.49b0.dev", From 268122822e43eb7f7940718c9829698cb7045a0f Mon Sep 17 00:00:00 2001 From: Leighton Chen Date: Fri, 1 Nov 2024 15:58:24 -0700 Subject: [PATCH 9/9] Update README.md --- instrumentation/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/instrumentation/README.md b/instrumentation/README.md index db437fe518..6bb47f6f9c 100644 --- a/instrumentation/README.md +++ b/instrumentation/README.md @@ -29,7 +29,6 @@ | [opentelemetry-instrumentation-logging](./opentelemetry-instrumentation-logging) | logging | No | experimental | [opentelemetry-instrumentation-mysql](./opentelemetry-instrumentation-mysql) | mysql-connector-python >= 8.0, < 10.0 | No | experimental | [opentelemetry-instrumentation-mysqlclient](./opentelemetry-instrumentation-mysqlclient) | mysqlclient < 3 | No | experimental -| [opentelemetry-instrumentation-openai-v2](./opentelemetry-instrumentation-openai-v2) | openai >= 1.26.0 | No | experimental | [opentelemetry-instrumentation-pika](./opentelemetry-instrumentation-pika) | pika >= 0.12.0 | No | experimental | [opentelemetry-instrumentation-psycopg](./opentelemetry-instrumentation-psycopg) | psycopg >= 3.1.0 | No | experimental | [opentelemetry-instrumentation-psycopg2](./opentelemetry-instrumentation-psycopg2) | psycopg2 >= 2.7.3.1 | No | experimental