Skip to content

Commit 5f42802

Browse files
committed
feat(tracing): otel status error description to attributes error
1 parent 4f9cf49 commit 5f42802

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath"
3-
version = "2.0.57"
3+
version = "2.0.58"
44
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.10"

src/uipath/tracing/_utils.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,17 @@ def otel_span_to_uipath_span(otel_span: ReadableSpan) -> UiPathSpan:
134134
if otel_span.parent is not None:
135135
parent_id = _SpanUtils.span_id_to_uuid4(otel_span.parent.span_id)
136136

137-
# Map status
138-
status = 1 # Default to OK
139-
if otel_span.status.status_code == StatusCode.ERROR:
140-
status = 2 # Error
141-
142137
# Convert attributes to a format compatible with UiPathSpan
143138
attributes_dict: dict[str, Any] = (
144139
dict(otel_span.attributes) if otel_span.attributes else {}
145140
)
146141

142+
# Map status
143+
status = 1 # Default to OK
144+
if otel_span.status.status_code == StatusCode.ERROR:
145+
status = 2 # Error
146+
attributes_dict["error"] = otel_span.status.description
147+
147148
original_inputs = attributes_dict.get("inputs", None)
148149
original_outputs = attributes_dict.get("outputs", None)
149150

0 commit comments

Comments
 (0)