opentelemetry-instrumentation-openai 0.21.1__tar.gz → 0.21.3__tar.gz
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-0.21.1 → opentelemetry_instrumentation_openai-0.21.3}/PKG-INFO +4 -4
- {opentelemetry_instrumentation_openai-0.21.1 → opentelemetry_instrumentation_openai-0.21.3}/opentelemetry/instrumentation/openai/shared/chat_wrappers.py +14 -1
- opentelemetry_instrumentation_openai-0.21.3/opentelemetry/instrumentation/openai/version.py +1 -0
- {opentelemetry_instrumentation_openai-0.21.1 → opentelemetry_instrumentation_openai-0.21.3}/pyproject.toml +4 -4
- opentelemetry_instrumentation_openai-0.21.1/opentelemetry/instrumentation/openai/version.py +0 -1
- {opentelemetry_instrumentation_openai-0.21.1 → opentelemetry_instrumentation_openai-0.21.3}/README.md +0 -0
- {opentelemetry_instrumentation_openai-0.21.1 → opentelemetry_instrumentation_openai-0.21.3}/opentelemetry/instrumentation/openai/__init__.py +0 -0
- {opentelemetry_instrumentation_openai-0.21.1 → opentelemetry_instrumentation_openai-0.21.3}/opentelemetry/instrumentation/openai/shared/__init__.py +0 -0
- {opentelemetry_instrumentation_openai-0.21.1 → opentelemetry_instrumentation_openai-0.21.3}/opentelemetry/instrumentation/openai/shared/completion_wrappers.py +0 -0
- {opentelemetry_instrumentation_openai-0.21.1 → opentelemetry_instrumentation_openai-0.21.3}/opentelemetry/instrumentation/openai/shared/config.py +0 -0
- {opentelemetry_instrumentation_openai-0.21.1 → opentelemetry_instrumentation_openai-0.21.3}/opentelemetry/instrumentation/openai/shared/embeddings_wrappers.py +0 -0
- {opentelemetry_instrumentation_openai-0.21.1 → opentelemetry_instrumentation_openai-0.21.3}/opentelemetry/instrumentation/openai/shared/image_gen_wrappers.py +0 -0
- {opentelemetry_instrumentation_openai-0.21.1 → opentelemetry_instrumentation_openai-0.21.3}/opentelemetry/instrumentation/openai/utils.py +0 -0
- {opentelemetry_instrumentation_openai-0.21.1 → opentelemetry_instrumentation_openai-0.21.3}/opentelemetry/instrumentation/openai/v0/__init__.py +0 -0
- {opentelemetry_instrumentation_openai-0.21.1 → opentelemetry_instrumentation_openai-0.21.3}/opentelemetry/instrumentation/openai/v1/__init__.py +0 -0
- {opentelemetry_instrumentation_openai-0.21.1 → opentelemetry_instrumentation_openai-0.21.3}/opentelemetry/instrumentation/openai/v1/assistant_wrappers.py +0 -0
- {opentelemetry_instrumentation_openai-0.21.1 → opentelemetry_instrumentation_openai-0.21.3}/opentelemetry/instrumentation/openai/v1/event_handler_wrapper.py +0 -0
{opentelemetry_instrumentation_openai-0.21.1 → opentelemetry_instrumentation_openai-0.21.3}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: opentelemetry-instrumentation-openai
|
|
3
|
-
Version: 0.21.
|
|
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
|
|
@@ -14,9 +14,9 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
16
|
Provides-Extra: instruments
|
|
17
|
-
Requires-Dist: opentelemetry-api (>=1.
|
|
18
|
-
Requires-Dist: opentelemetry-instrumentation (>=0.
|
|
19
|
-
Requires-Dist: opentelemetry-semantic-conventions (>=0.
|
|
17
|
+
Requires-Dist: opentelemetry-api (>=1.25.0,<2.0.0)
|
|
18
|
+
Requires-Dist: opentelemetry-instrumentation (>=0.46b0,<0.47)
|
|
19
|
+
Requires-Dist: opentelemetry-semantic-conventions (>=0.46b0,<0.47)
|
|
20
20
|
Requires-Dist: opentelemetry-semantic-conventions-ai (==0.2.0)
|
|
21
21
|
Requires-Dist: tiktoken (>=0.6.0,<1)
|
|
22
22
|
Project-URL: Repository, https://github.com/traceloop/openllmetry/tree/main/packages/opentelemetry-instrumentation-openai
|
|
@@ -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(
|
|
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
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.21.3"
|
|
@@ -8,7 +8,7 @@ show_missing = true
|
|
|
8
8
|
|
|
9
9
|
[tool.poetry]
|
|
10
10
|
name = "opentelemetry-instrumentation-openai"
|
|
11
|
-
version = "0.21.
|
|
11
|
+
version = "0.21.3"
|
|
12
12
|
description = "OpenTelemetry OpenAI instrumentation"
|
|
13
13
|
authors = [
|
|
14
14
|
"Gal Kleinman <gal@traceloop.com>",
|
|
@@ -24,9 +24,9 @@ include = "opentelemetry/instrumentation/openai"
|
|
|
24
24
|
|
|
25
25
|
[tool.poetry.dependencies]
|
|
26
26
|
python = ">=3.9,<4"
|
|
27
|
-
opentelemetry-api = "^1.
|
|
28
|
-
opentelemetry-instrumentation = "^0.
|
|
29
|
-
opentelemetry-semantic-conventions = "^0.
|
|
27
|
+
opentelemetry-api = "^1.25.0"
|
|
28
|
+
opentelemetry-instrumentation = "^0.46b0"
|
|
29
|
+
opentelemetry-semantic-conventions = "^0.46b0"
|
|
30
30
|
opentelemetry-semantic-conventions-ai = "0.2.0"
|
|
31
31
|
tiktoken = ">=0.6.0, <1"
|
|
32
32
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.21.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|