Skip to content

Commit 42fe040

Browse files
authored
Merge pull request #392 from UiPath/fix/tracing_parent_span
feat(tracing): fix parent span mapping
2 parents 2378a4b + a669061 commit 42fe040

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
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.60"
3+
version = "2.0.61"
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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ 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+
parent_span_id_str = env.get("UIPATH_PARENT_SPAN_ID")
138+
139+
if parent_span_id_str:
140+
parent_id = uuid.UUID(parent_span_id_str)
141+
137142
# Convert attributes to a format compatible with UiPathSpan
138143
attributes_dict: dict[str, Any] = (
139144
dict(otel_span.attributes) if otel_span.attributes else {}

0 commit comments

Comments
 (0)