opentelemetry-instrumentation-openai 0.21.2__py3-none-any.whl → 0.21.3__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.

@@ -429,7 +429,9 @@ def _set_streaming_token_metrics(
429
429
  **shared_attributes,
430
430
  "llm.usage.token_type": "completion",
431
431
  }
432
- token_counter.record(completion_usage, attributes=attributes_with_token_type)
432
+ token_counter.record(
433
+ completion_usage, attributes=attributes_with_token_type
434
+ )
433
435
 
434
436
 
435
437
  class ChatStream(ObjectProxy):
@@ -458,6 +460,8 @@ class ChatStream(ObjectProxy):
458
460
  ):
459
461
  super().__init__(response)
460
462
 
463
+ print("HEYY", response.__class__.__name__)
464
+
461
465
  self._span = span
462
466
  self._instance = instance
463
467
  self._token_counter = token_counter
@@ -476,6 +480,15 @@ class ChatStream(ObjectProxy):
476
480
  def __enter__(self):
477
481
  return self
478
482
 
483
+ def __exit__(self, exc_type, exc_val, exc_tb):
484
+ self.__wrapped__.__exit__(exc_type, exc_val, exc_tb)
485
+
486
+ async def __aenter__(self):
487
+ return self
488
+
489
+ async def __aexit__(self, exc_type, exc_val, exc_tb):
490
+ await self.__wrapped__.__aexit__(exc_type, exc_val, exc_tb)
491
+
479
492
  def __iter__(self):
480
493
  return self
481
494
 
@@ -1 +1 @@
1
- __version__ = "0.21.2"
1
+ __version__ = "0.21.3"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: opentelemetry-instrumentation-openai
3
- Version: 0.21.2
3
+ Version: 0.21.3
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=5kEyVhz2YDHvuq2SDQOsDhtjbG7R7GCn793oLq2_J_k,7490
3
- opentelemetry/instrumentation/openai/shared/chat_wrappers.py,sha256=ppjZgX8k5iORHUlCSyGPxDAYpXKOqs9KiCUSB0Cgu4s,23353
3
+ opentelemetry/instrumentation/openai/shared/chat_wrappers.py,sha256=c0cQrC-GhOWOZTRCgA3PUNJ2Bbj0nPLQShfHht0Chns,23728
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=aL3uAkfscMcCqCjzY1lZUNtxkiIV2agg6B8wB5CO8mg,6598
@@ -10,8 +10,8 @@ opentelemetry/instrumentation/openai/v0/__init__.py,sha256=z8RkR1Zp2P_qdIIMCvI6H
10
10
  opentelemetry/instrumentation/openai/v1/__init__.py,sha256=5apXSO-jvr5hjqdu4PzSI62R6br4U029c4n9RE5e5GY,8368
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=Br99nmRrjyPtE6zPC2M_-gnaJCaBkqZI2lE8zWDjxpQ,23
14
- opentelemetry_instrumentation_openai-0.21.2.dist-info/METADATA,sha256=ZzWmwyw4ltpzPg_EE2F6jiqrQGHWHMpkMEoPCDMNlTI,2255
15
- opentelemetry_instrumentation_openai-0.21.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
16
- opentelemetry_instrumentation_openai-0.21.2.dist-info/entry_points.txt,sha256=vTBfiX5yXji5YHikuJHEOoBZ1TFdPQ1EI4ctd2pZSeE,93
17
- opentelemetry_instrumentation_openai-0.21.2.dist-info/RECORD,,
13
+ opentelemetry/instrumentation/openai/version.py,sha256=OuyMnGmg358HwAdxiwjFQLgs9GVfgE0ScR1LQr-0UX4,23
14
+ opentelemetry_instrumentation_openai-0.21.3.dist-info/METADATA,sha256=rLhzlEq8CeLd-JjUXpoMGcdAueWRn0aelneqtb9yPo4,2255
15
+ opentelemetry_instrumentation_openai-0.21.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
16
+ opentelemetry_instrumentation_openai-0.21.3.dist-info/entry_points.txt,sha256=vTBfiX5yXji5YHikuJHEOoBZ1TFdPQ1EI4ctd2pZSeE,93
17
+ opentelemetry_instrumentation_openai-0.21.3.dist-info/RECORD,,