opentelemetry-instrumentation-openai 0.46.0__py3-none-any.whl → 0.46.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/chat_wrappers.py +2 -1
- opentelemetry/instrumentation/openai/shared/config.py +2 -2
- opentelemetry/instrumentation/openai/v1/responses_wrappers.py +9 -3
- opentelemetry/instrumentation/openai/version.py +1 -1
- {opentelemetry_instrumentation_openai-0.46.0.dist-info → opentelemetry_instrumentation_openai-0.46.2.dist-info}/METADATA +1 -1
- {opentelemetry_instrumentation_openai-0.46.0.dist-info → opentelemetry_instrumentation_openai-0.46.2.dist-info}/RECORD +8 -8
- {opentelemetry_instrumentation_openai-0.46.0.dist-info → opentelemetry_instrumentation_openai-0.46.2.dist-info}/WHEEL +0 -0
- {opentelemetry_instrumentation_openai-0.46.0.dist-info → opentelemetry_instrumentation_openai-0.46.2.dist-info}/entry_points.txt +0 -0
|
@@ -429,7 +429,8 @@ async def _process_image_item(item, trace_id, span_id, message_index, content_in
|
|
|
429
429
|
image_format = item["image_url"]["url"].split(";")[0].split("/")[1]
|
|
430
430
|
image_name = f"message_{message_index}_content_{content_index}.{image_format}"
|
|
431
431
|
base64_string = item["image_url"]["url"].split(",")[1]
|
|
432
|
-
|
|
432
|
+
# Convert trace_id and span_id to strings as expected by upload function
|
|
433
|
+
url = await Config.upload_base64_image(str(trace_id), str(span_id), image_name, base64_string)
|
|
433
434
|
|
|
434
435
|
return {"type": "image_url", "image_url": {"url": url}}
|
|
435
436
|
|
|
@@ -7,8 +7,8 @@ class Config:
|
|
|
7
7
|
enrich_assistant = False
|
|
8
8
|
exception_logger = None
|
|
9
9
|
get_common_metrics_attributes: Callable[[], dict] = lambda: {}
|
|
10
|
-
upload_base64_image: Callable[[str, str, str], str] = (
|
|
11
|
-
lambda trace_id, span_id,
|
|
10
|
+
upload_base64_image: Callable[[str, str, str, str], str] = (
|
|
11
|
+
lambda trace_id, span_id, image_name, base64_string: str
|
|
12
12
|
)
|
|
13
13
|
enable_trace_context_propagation: bool = True
|
|
14
14
|
use_legacy_attributes = True
|
|
@@ -418,9 +418,15 @@ def set_data_attributes(traced_response: TracedData, span: Span):
|
|
|
418
418
|
)
|
|
419
419
|
tool_call_index += 1
|
|
420
420
|
elif block_dict.get("type") == "reasoning":
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
421
|
+
reasoning_summary = block_dict.get("summary")
|
|
422
|
+
if reasoning_summary is not None and reasoning_summary != []:
|
|
423
|
+
if isinstance(reasoning_summary, (dict, list)):
|
|
424
|
+
reasoning_value = json.dumps(reasoning_summary)
|
|
425
|
+
else:
|
|
426
|
+
reasoning_value = reasoning_summary
|
|
427
|
+
_set_span_attribute(
|
|
428
|
+
span, f"{GEN_AI_COMPLETION}.0.reasoning", reasoning_value
|
|
429
|
+
)
|
|
424
430
|
# TODO: handle other block types, in particular other calls
|
|
425
431
|
|
|
426
432
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.46.
|
|
1
|
+
__version__ = "0.46.2"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
opentelemetry/instrumentation/openai/__init__.py,sha256=Mx_nwMl0TlhUjrQOR4qdx6MEhBUKp5cuUIIXFzi3mXo,2093
|
|
2
2
|
opentelemetry/instrumentation/openai/shared/__init__.py,sha256=Ba429tv5NPuQN7RoLzaj00K9oj88BaUBdPmUUsZ-7ic,12346
|
|
3
|
-
opentelemetry/instrumentation/openai/shared/chat_wrappers.py,sha256=
|
|
3
|
+
opentelemetry/instrumentation/openai/shared/chat_wrappers.py,sha256=arXBvPA04h2G4ZVarvenf35UbN-0MBeHe61NwpsWWwI,40358
|
|
4
4
|
opentelemetry/instrumentation/openai/shared/completion_wrappers.py,sha256=600McQXNCPFaifeD4yFq00beZ9XjGEbYT_3XVojHQT4,9244
|
|
5
|
-
opentelemetry/instrumentation/openai/shared/config.py,sha256=
|
|
5
|
+
opentelemetry/instrumentation/openai/shared/config.py,sha256=LKSimbIEK-59uWuJRZtg-Bp-5-GS716xOLvwvLVyzw8,491
|
|
6
6
|
opentelemetry/instrumentation/openai/shared/embeddings_wrappers.py,sha256=oRHghd4vSDJ6fNHjL9G8QfKnPnp_NkZfVmTDSgZScVU,9251
|
|
7
7
|
opentelemetry/instrumentation/openai/shared/event_emitter.py,sha256=iXUoyEHbC9DqwjnudkPOZlDBC4qLdEBmfsxB_q0nzbQ,3113
|
|
8
8
|
opentelemetry/instrumentation/openai/shared/event_models.py,sha256=PCfCGxrrArwZqR-4wFcXrhwQq0sBMAxmSrpC4PUMtaM,876
|
|
@@ -13,9 +13,9 @@ opentelemetry/instrumentation/openai/v0/__init__.py,sha256=FhpVbP8NqjN2We_srppZ_
|
|
|
13
13
|
opentelemetry/instrumentation/openai/v1/__init__.py,sha256=oLst4xav77tTteZKXo59uyb-2IWqw_xOafaSMzTxq9g,13255
|
|
14
14
|
opentelemetry/instrumentation/openai/v1/assistant_wrappers.py,sha256=oa5xYEDELFN9luvSn3y1xhSs37yRYY_Pwh6htqOs8gc,11297
|
|
15
15
|
opentelemetry/instrumentation/openai/v1/event_handler_wrapper.py,sha256=AT-eDZOFP-K_mm-ecdgQaILoIsEiItZmtwzwAuse86Q,4350
|
|
16
|
-
opentelemetry/instrumentation/openai/v1/responses_wrappers.py,sha256=
|
|
17
|
-
opentelemetry/instrumentation/openai/version.py,sha256=
|
|
18
|
-
opentelemetry_instrumentation_openai-0.46.
|
|
19
|
-
opentelemetry_instrumentation_openai-0.46.
|
|
20
|
-
opentelemetry_instrumentation_openai-0.46.
|
|
21
|
-
opentelemetry_instrumentation_openai-0.46.
|
|
16
|
+
opentelemetry/instrumentation/openai/v1/responses_wrappers.py,sha256=7d6Z6rK6AoANgOMQajmrbJ7tZDq3uZpHRJP7sj545AU,28492
|
|
17
|
+
opentelemetry/instrumentation/openai/version.py,sha256=lWEdbG8IshPF1zUeQxPyfsi3uFhuXQmN7phOE5OaeI8,23
|
|
18
|
+
opentelemetry_instrumentation_openai-0.46.2.dist-info/METADATA,sha256=GOKwiZRHVr0E69yFINrk5m12pczRqg4CCbe8ns_PsiQ,2157
|
|
19
|
+
opentelemetry_instrumentation_openai-0.46.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
20
|
+
opentelemetry_instrumentation_openai-0.46.2.dist-info/entry_points.txt,sha256=vTBfiX5yXji5YHikuJHEOoBZ1TFdPQ1EI4ctd2pZSeE,93
|
|
21
|
+
opentelemetry_instrumentation_openai-0.46.2.dist-info/RECORD,,
|
|
File without changes
|