From 4b067dcb35f2a5522e9ba28e9145296b22825fd1 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Mon, 11 Nov 2024 15:44:32 +0800 Subject: [PATCH] opentelemetry-instrumentation-openai-v2: add codefromthecrypt and fix yaml fixture Follow-up to #2945 See https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2984#discussion_r1834466394 Signed-off-by: Adrian Cole --- .github/component_owners.yml | 1 + .../tests/cassettes/test_chat_completion_404.yaml | 12 +++++++----- .../tests/conftest.py | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/component_owners.yml b/.github/component_owners.yml index 3aeb90b297..1e89d59567 100644 --- a/.github/component_owners.yml +++ b/.github/component_owners.yml @@ -73,3 +73,4 @@ components: - lzchen - gyliu513 - nirga + - codefromthecrypt 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 index ae00c6ef70..0782cba71d 100644 --- 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 @@ -24,7 +24,7 @@ interactions: host: - api.openai.com user-agent: - - OpenAI/Python 1.26.0 + - OpenAI/Python 1.54.3 x-stainless-arch: - arm64 x-stainless-async: @@ -34,7 +34,9 @@ interactions: x-stainless-os: - MacOS x-stainless-package-version: - - 1.26.0 + - 1.54.3 + x-stainless-retry-count: + - '0' x-stainless-runtime: - CPython x-stainless-runtime-version: @@ -56,13 +58,13 @@ interactions: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8dd0709dffd19c8c-SIN + - 8e0ca7056be15f93-SIN Connection: - keep-alive Content-Type: - application/json; charset=utf-8 Date: - - Mon, 04 Nov 2024 00:20:44 GMT + - Mon, 11 Nov 2024 07:43:38 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -80,7 +82,7 @@ interactions: vary: - Origin x-request-id: - - req_e08854c4f7d5104af6fdc755caed30fc + - req_75175efff56c313161c136c479e082ac status: code: 404 message: Not Found diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py index 84a9bf2692..899b2f122c 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py @@ -161,7 +161,7 @@ def deserialize(cassette_string): return yaml.load(cassette_string, Loader=yaml.Loader) -@pytest.fixture(scope="module") +@pytest.fixture(scope="module", autouse=True) def fixture_vcr(vcr): vcr.register_serializer("yaml", PrettyPrintJSONBody) return vcr