opentelemetry-instrumentation-openai 0.21.4__py3-none-any.whl → 0.21.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of opentelemetry-instrumentation-openai might be problematic. Click here for more details.
- opentelemetry/instrumentation/openai/shared/chat_wrappers.py +6 -6
- opentelemetry/instrumentation/openai/version.py +1 -1
- {opentelemetry_instrumentation_openai-0.21.4.dist-info → opentelemetry_instrumentation_openai-0.21.5.dist-info}/METADATA +1 -1
- {opentelemetry_instrumentation_openai-0.21.4.dist-info → opentelemetry_instrumentation_openai-0.21.5.dist-info}/RECORD +6 -6
- {opentelemetry_instrumentation_openai-0.21.4.dist-info → opentelemetry_instrumentation_openai-0.21.5.dist-info}/WHEEL +0 -0
- {opentelemetry_instrumentation_openai-0.21.4.dist-info → opentelemetry_instrumentation_openai-0.21.5.dist-info}/entry_points.txt +0 -0
|
@@ -294,10 +294,11 @@ def _set_chat_metrics(
|
|
|
294
294
|
def _set_choice_counter_metrics(choice_counter, choices, shared_attributes):
|
|
295
295
|
choice_counter.add(len(choices), attributes=shared_attributes)
|
|
296
296
|
for choice in choices:
|
|
297
|
-
attributes_with_reason = {
|
|
298
|
-
|
|
299
|
-
"llm.response.finish_reason"
|
|
300
|
-
|
|
297
|
+
attributes_with_reason = {**shared_attributes}
|
|
298
|
+
if choice.get("finish_reason"):
|
|
299
|
+
attributes_with_reason["llm.response.finish_reason"] = choice.get(
|
|
300
|
+
"finish_reason"
|
|
301
|
+
)
|
|
301
302
|
choice_counter.add(1, attributes=attributes_with_reason)
|
|
302
303
|
|
|
303
304
|
|
|
@@ -463,8 +464,6 @@ class ChatStream(ObjectProxy):
|
|
|
463
464
|
):
|
|
464
465
|
super().__init__(response)
|
|
465
466
|
|
|
466
|
-
print("HEYY", response.__class__.__name__)
|
|
467
|
-
|
|
468
467
|
self._span = span
|
|
469
468
|
self._instance = instance
|
|
470
469
|
self._token_counter = token_counter
|
|
@@ -563,6 +562,7 @@ class ChatStream(ObjectProxy):
|
|
|
563
562
|
is_streaming=True,
|
|
564
563
|
)
|
|
565
564
|
|
|
565
|
+
@dont_throw
|
|
566
566
|
def _close_span(self):
|
|
567
567
|
if not is_azure_openai(self._instance):
|
|
568
568
|
_set_streaming_token_metrics(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.21.
|
|
1
|
+
__version__ = "0.21.5"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: opentelemetry-instrumentation-openai
|
|
3
|
-
Version: 0.21.
|
|
3
|
+
Version: 0.21.5
|
|
4
4
|
Summary: OpenTelemetry OpenAI instrumentation
|
|
5
5
|
Home-page: https://github.com/traceloop/openllmetry/tree/main/packages/opentelemetry-instrumentation-openai
|
|
6
6
|
License: Apache-2.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
opentelemetry/instrumentation/openai/__init__.py,sha256=xl3Kvqry9glVhu8VtdknfUE9FpXQ7KWAFqtVlpjE-40,1344
|
|
2
2
|
opentelemetry/instrumentation/openai/shared/__init__.py,sha256=rn8AqGI0s0RAPlJGFgOtKE4ONPUF9N8rBPkmPErqB9o,8018
|
|
3
|
-
opentelemetry/instrumentation/openai/shared/chat_wrappers.py,sha256=
|
|
3
|
+
opentelemetry/instrumentation/openai/shared/chat_wrappers.py,sha256=UtS3c3Ox8-bosx2T8kLBHPKj7TUOH-xzFYkHZw1xQLo,24132
|
|
4
4
|
opentelemetry/instrumentation/openai/shared/completion_wrappers.py,sha256=-JHfgyxic5I3Wr3Uc_L-U7ztDVFcyovtF37tNLtaW3s,6604
|
|
5
5
|
opentelemetry/instrumentation/openai/shared/config.py,sha256=5uekQEnmYo1o6tsTD2IGc-cVmHUo5KmUC4pOVdrFFNk,102
|
|
6
6
|
opentelemetry/instrumentation/openai/shared/embeddings_wrappers.py,sha256=7aVXEaDw0Lzb_iAmVaUSqNTXLnXxAmWURM1iGHdXI18,6686
|
|
@@ -10,8 +10,8 @@ opentelemetry/instrumentation/openai/v0/__init__.py,sha256=ZpnAQW0vJYVeNC--RYR21
|
|
|
10
10
|
opentelemetry/instrumentation/openai/v1/__init__.py,sha256=sAA10BU4nsviHpqp0SLJdsKKLOyPS-xi0bk5N5uM2fE,8355
|
|
11
11
|
opentelemetry/instrumentation/openai/v1/assistant_wrappers.py,sha256=T6Vtdp1fAZdcYjGiTMZwkn4F4DgsltD4p4xLEFW-GhI,5874
|
|
12
12
|
opentelemetry/instrumentation/openai/v1/event_handler_wrapper.py,sha256=SAzYoun2yyOloofyOWtxpm8E2M9TL3Nm8TgKdNyXHuY,2779
|
|
13
|
-
opentelemetry/instrumentation/openai/version.py,sha256=
|
|
14
|
-
opentelemetry_instrumentation_openai-0.21.
|
|
15
|
-
opentelemetry_instrumentation_openai-0.21.
|
|
16
|
-
opentelemetry_instrumentation_openai-0.21.
|
|
17
|
-
opentelemetry_instrumentation_openai-0.21.
|
|
13
|
+
opentelemetry/instrumentation/openai/version.py,sha256=yq-fGfdU069XbMVu8cXj7x9Ga-YNsSY_1SmDswa-WEI,23
|
|
14
|
+
opentelemetry_instrumentation_openai-0.21.5.dist-info/METADATA,sha256=DUug8rOWmmoy07j_PUp6CWGqGQ4S_dNFyeQe50DcktY,2255
|
|
15
|
+
opentelemetry_instrumentation_openai-0.21.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
16
|
+
opentelemetry_instrumentation_openai-0.21.5.dist-info/entry_points.txt,sha256=vTBfiX5yXji5YHikuJHEOoBZ1TFdPQ1EI4ctd2pZSeE,93
|
|
17
|
+
opentelemetry_instrumentation_openai-0.21.5.dist-info/RECORD,,
|
|
File without changes
|