opentelemetry-instrumentation-openai 0.16.9__py3-none-any.whl → 0.17.0__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.
- opentelemetry/instrumentation/openai/shared/__init__.py +3 -3
- opentelemetry/instrumentation/openai/shared/chat_wrappers.py +3 -3
- opentelemetry/instrumentation/openai/shared/embeddings_wrappers.py +1 -1
- opentelemetry/instrumentation/openai/shared/image_gen_wrappers.py +1 -1
- opentelemetry/instrumentation/openai/version.py +1 -1
- {opentelemetry_instrumentation_openai-0.16.9.dist-info → opentelemetry_instrumentation_openai-0.17.0.dist-info}/METADATA +2 -2
- {opentelemetry_instrumentation_openai-0.16.9.dist-info → opentelemetry_instrumentation_openai-0.17.0.dist-info}/RECORD +9 -9
- {opentelemetry_instrumentation_openai-0.16.9.dist-info → opentelemetry_instrumentation_openai-0.17.0.dist-info}/WHEEL +0 -0
- {opentelemetry_instrumentation_openai-0.16.9.dist-info → opentelemetry_instrumentation_openai-0.17.0.dist-info}/entry_points.txt +0 -0
|
@@ -107,13 +107,13 @@ def _set_request_attributes(span, kwargs):
|
|
|
107
107
|
return
|
|
108
108
|
|
|
109
109
|
_set_api_attributes(span)
|
|
110
|
-
_set_span_attribute(span, SpanAttributes.
|
|
110
|
+
_set_span_attribute(span, SpanAttributes.LLM_SYSTEM, "OpenAI")
|
|
111
111
|
_set_span_attribute(span, SpanAttributes.LLM_REQUEST_MODEL, kwargs.get("model"))
|
|
112
112
|
_set_span_attribute(
|
|
113
113
|
span, SpanAttributes.LLM_REQUEST_MAX_TOKENS, kwargs.get("max_tokens")
|
|
114
114
|
)
|
|
115
|
-
_set_span_attribute(span, SpanAttributes.
|
|
116
|
-
_set_span_attribute(span, SpanAttributes.
|
|
115
|
+
_set_span_attribute(span, SpanAttributes.LLM_REQUEST_TEMPERATURE, kwargs.get("temperature"))
|
|
116
|
+
_set_span_attribute(span, SpanAttributes.LLM_REQUEST_TOP_P, kwargs.get("top_p"))
|
|
117
117
|
_set_span_attribute(
|
|
118
118
|
span, SpanAttributes.LLM_FREQUENCY_PENALTY, kwargs.get("frequency_penalty")
|
|
119
119
|
)
|
|
@@ -238,7 +238,7 @@ def _set_chat_metrics(
|
|
|
238
238
|
instance, token_counter, choice_counter, duration_histogram, response_dict, duration
|
|
239
239
|
):
|
|
240
240
|
shared_attributes = {
|
|
241
|
-
"
|
|
241
|
+
"gen_ai.response.model": response_dict.get("model") or None,
|
|
242
242
|
"server.address": _get_openai_base_url(instance),
|
|
243
243
|
}
|
|
244
244
|
|
|
@@ -428,7 +428,7 @@ def _build_from_streaming_response(
|
|
|
428
428
|
yield item_to_yield
|
|
429
429
|
|
|
430
430
|
shared_attributes = {
|
|
431
|
-
"
|
|
431
|
+
"gen_ai.response.model": complete_response.get("model") or None,
|
|
432
432
|
"server.address": _get_openai_base_url(instance),
|
|
433
433
|
"stream": True,
|
|
434
434
|
}
|
|
@@ -496,7 +496,7 @@ async def _abuild_from_streaming_response(
|
|
|
496
496
|
yield item_to_yield
|
|
497
497
|
|
|
498
498
|
shared_attributes = {
|
|
499
|
-
"
|
|
499
|
+
"gen_ai.response.model": complete_response.get("model") or None,
|
|
500
500
|
"server.address": _get_openai_base_url(instance),
|
|
501
501
|
"stream": True,
|
|
502
502
|
}
|
|
@@ -189,7 +189,7 @@ def _set_embeddings_metrics(
|
|
|
189
189
|
duration,
|
|
190
190
|
):
|
|
191
191
|
shared_attributes = {
|
|
192
|
-
"
|
|
192
|
+
"gen_ai.response.model": response_dict.get("model") or None,
|
|
193
193
|
"server.address": _get_openai_base_url(instance),
|
|
194
194
|
}
|
|
195
195
|
|
|
@@ -54,7 +54,7 @@ def image_gen_metrics_wrapper(
|
|
|
54
54
|
|
|
55
55
|
shared_attributes = {
|
|
56
56
|
# not provide response.model in ImagesResponse response, use model in request kwargs
|
|
57
|
-
"
|
|
57
|
+
"gen_ai.response.model": kwargs.get("model") or None,
|
|
58
58
|
"server.address": _get_openai_base_url(instance),
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.
|
|
1
|
+
__version__ = "0.17.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: opentelemetry-instrumentation-openai
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.17.0
|
|
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
|
|
@@ -17,7 +17,7 @@ Provides-Extra: instruments
|
|
|
17
17
|
Requires-Dist: opentelemetry-api (>=1.24.0,<2.0.0)
|
|
18
18
|
Requires-Dist: opentelemetry-instrumentation (>=0.45b0,<0.46)
|
|
19
19
|
Requires-Dist: opentelemetry-semantic-conventions (>=0.45b0,<0.46)
|
|
20
|
-
Requires-Dist: opentelemetry-semantic-conventions-ai (==0.
|
|
20
|
+
Requires-Dist: opentelemetry-semantic-conventions-ai (==0.2.0)
|
|
21
21
|
Project-URL: Repository, https://github.com/traceloop/openllmetry/tree/main/packages/opentelemetry-instrumentation-openai
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
opentelemetry/instrumentation/openai/__init__.py,sha256=xl3Kvqry9glVhu8VtdknfUE9FpXQ7KWAFqtVlpjE-40,1344
|
|
2
|
-
opentelemetry/instrumentation/openai/shared/__init__.py,sha256=
|
|
3
|
-
opentelemetry/instrumentation/openai/shared/chat_wrappers.py,sha256=
|
|
2
|
+
opentelemetry/instrumentation/openai/shared/__init__.py,sha256=eBVYPw2Zh28p9wak6Ncba3jSt-bdIgJjzJrad6snCxo,7359
|
|
3
|
+
opentelemetry/instrumentation/openai/shared/chat_wrappers.py,sha256=zLhgpBLJnBWt5aoVfh3Lvwkv0IlALGj_DWoTMdbb484,17002
|
|
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
|
-
opentelemetry/instrumentation/openai/shared/embeddings_wrappers.py,sha256=
|
|
7
|
-
opentelemetry/instrumentation/openai/shared/image_gen_wrappers.py,sha256=
|
|
6
|
+
opentelemetry/instrumentation/openai/shared/embeddings_wrappers.py,sha256=6I6I98T1a5Np0ZjcGZQbId4ZyEmMI6o9wVm8qoRpO9o,6595
|
|
7
|
+
opentelemetry/instrumentation/openai/shared/image_gen_wrappers.py,sha256=BuYVdxiI71ajx5WZ0B5OpgFzOWGGh-fV77pp3h3nrJA,1891
|
|
8
8
|
opentelemetry/instrumentation/openai/utils.py,sha256=IM5l_MjM7XnO0e7tDGsPml-juQ9SI1QK200X0atiAyE,3357
|
|
9
9
|
opentelemetry/instrumentation/openai/v0/__init__.py,sha256=ngmmYyfTwRQSjTZAvNpBIOHQ1BIUXeQnOQz126Iucp0,6116
|
|
10
10
|
opentelemetry/instrumentation/openai/v1/__init__.py,sha256=6XHk11JhkpZixgMDsjb0b-efd8LlBTG0jjMCyf0fOSo,8652
|
|
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.
|
|
15
|
-
opentelemetry_instrumentation_openai-0.
|
|
16
|
-
opentelemetry_instrumentation_openai-0.
|
|
17
|
-
opentelemetry_instrumentation_openai-0.
|
|
13
|
+
opentelemetry/instrumentation/openai/version.py,sha256=XpM3lncCzPBIwMSvDN7i10pke_c6KdJtVLZYbCiaTRw,23
|
|
14
|
+
opentelemetry_instrumentation_openai-0.17.0.dist-info/METADATA,sha256=QZfh79nV4FTuPmXnCxx806ywzS2IW4uJvZ3ZcAgcvUg,2218
|
|
15
|
+
opentelemetry_instrumentation_openai-0.17.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
16
|
+
opentelemetry_instrumentation_openai-0.17.0.dist-info/entry_points.txt,sha256=vTBfiX5yXji5YHikuJHEOoBZ1TFdPQ1EI4ctd2pZSeE,93
|
|
17
|
+
opentelemetry_instrumentation_openai-0.17.0.dist-info/RECORD,,
|
|
File without changes
|