opentelemetry-instrumentation-openai 0.39.0__py3-none-any.whl → 0.39.2__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/__init__.py +4 -0
- opentelemetry/instrumentation/openai/version.py +1 -1
- {opentelemetry_instrumentation_openai-0.39.0.dist-info → opentelemetry_instrumentation_openai-0.39.2.dist-info}/METADATA +1 -1
- {opentelemetry_instrumentation_openai-0.39.0.dist-info → opentelemetry_instrumentation_openai-0.39.2.dist-info}/RECORD +6 -6
- {opentelemetry_instrumentation_openai-0.39.0.dist-info → opentelemetry_instrumentation_openai-0.39.2.dist-info}/WHEEL +1 -1
- {opentelemetry_instrumentation_openai-0.39.0.dist-info → opentelemetry_instrumentation_openai-0.39.2.dist-info}/entry_points.txt +0 -0
|
@@ -185,6 +185,10 @@ def _set_response_attributes(span, response):
|
|
|
185
185
|
_set_span_attribute(
|
|
186
186
|
span, SpanAttributes.LLM_USAGE_PROMPT_TOKENS, usage.get("prompt_tokens")
|
|
187
187
|
)
|
|
188
|
+
prompt_tokens_details = dict(usage.get("prompt_tokens_details", {}))
|
|
189
|
+
_set_span_attribute(
|
|
190
|
+
span, SpanAttributes.LLM_USAGE_CACHE_READ_INPUT_TOKENS, prompt_tokens_details.get("cached_tokens", 0)
|
|
191
|
+
)
|
|
188
192
|
return
|
|
189
193
|
|
|
190
194
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.39.
|
|
1
|
+
__version__ = "0.39.2"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
opentelemetry/instrumentation/openai/__init__.py,sha256=g_RyqxN0DEaPegyaFfoZVskxnaPMGx6Yrc9wZvkx7r8,2086
|
|
2
|
-
opentelemetry/instrumentation/openai/shared/__init__.py,sha256=
|
|
2
|
+
opentelemetry/instrumentation/openai/shared/__init__.py,sha256=X10dKV5-rs7GgxrcYtmEpoehCJEgUnHvWH6DV8MbzC0,10014
|
|
3
3
|
opentelemetry/instrumentation/openai/shared/chat_wrappers.py,sha256=5otROZDeMN1w6kCWQIr8S9fQd2fHf1s-7absMTpjNPg,28462
|
|
4
4
|
opentelemetry/instrumentation/openai/shared/completion_wrappers.py,sha256=PYQNUaW37pPunsBE8Fj-nbSlwSJ54RN80muf3hjoMTU,7367
|
|
5
5
|
opentelemetry/instrumentation/openai/shared/config.py,sha256=dCQviJ1a5cpFlrP0HcKgE7lpiXB98ssnumLy_CIMibQ,355
|
|
@@ -10,8 +10,8 @@ opentelemetry/instrumentation/openai/v0/__init__.py,sha256=02-bXv0aZbscMYO2W3jsH
|
|
|
10
10
|
opentelemetry/instrumentation/openai/v1/__init__.py,sha256=B2Ut0X14KQS5in_0jLBMCvXQK73SqBy2rBFIDk5ZRkc,8688
|
|
11
11
|
opentelemetry/instrumentation/openai/v1/assistant_wrappers.py,sha256=WRpOuUc5Wi7KFMt8gPMy0b0l7N4EGQIeYAkOxPPZgWI,7733
|
|
12
12
|
opentelemetry/instrumentation/openai/v1/event_handler_wrapper.py,sha256=4HsnPwR450NA5w-KDgMfQjK8U4do_M-sMMPU4LjXyiQ,3444
|
|
13
|
-
opentelemetry/instrumentation/openai/version.py,sha256=
|
|
14
|
-
opentelemetry_instrumentation_openai-0.39.
|
|
15
|
-
opentelemetry_instrumentation_openai-0.39.
|
|
16
|
-
opentelemetry_instrumentation_openai-0.39.
|
|
17
|
-
opentelemetry_instrumentation_openai-0.39.
|
|
13
|
+
opentelemetry/instrumentation/openai/version.py,sha256=K8FnyITen0BG2e5roEV7aq3XQUCszmZIFMjEKeIzOJw,23
|
|
14
|
+
opentelemetry_instrumentation_openai-0.39.2.dist-info/METADATA,sha256=vNAKfb3usWMbvjvdDPoUm7Fvylsn0bm0iheRm7vZmuU,2186
|
|
15
|
+
opentelemetry_instrumentation_openai-0.39.2.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
16
|
+
opentelemetry_instrumentation_openai-0.39.2.dist-info/entry_points.txt,sha256=vTBfiX5yXji5YHikuJHEOoBZ1TFdPQ1EI4ctd2pZSeE,93
|
|
17
|
+
opentelemetry_instrumentation_openai-0.39.2.dist-info/RECORD,,
|