Skip to content

Commit de3b91c

Browse files
fix(platform): use LLMOps external span in trace context headers (#1613)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 67466db commit de3b91c

5 files changed

Lines changed: 7 additions & 5 deletions

File tree

packages/uipath-platform/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-platform"
3-
version = "0.1.44"
3+
version = "0.1.45"
44
description = "HTTP client library for programmatic access to UiPath Platform"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

packages/uipath-platform/src/uipath/platform/chat/llm_trace_context.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from opentelemetry import trace
44
from uipath.core.feature_flags import FeatureFlags
5+
from uipath.core.tracing.span_utils import UiPathSpanUtils
56

67
from ..common._config import UiPathConfig
78

@@ -22,7 +23,8 @@ def build_trace_context_headers(
2223
return {}
2324

2425
headers: dict[str, str] = {}
25-
span = trace.get_current_span()
26+
llmops_span = UiPathSpanUtils.get_external_current_span()
27+
span = llmops_span or trace.get_current_span()
2628
ctx = span.get_span_context()
2729
if ctx and ctx.trace_id and ctx.span_id:
2830
trace_id = format(ctx.trace_id, "032x")

packages/uipath-platform/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/uipath/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ requires-python = ">=3.11"
77
dependencies = [
88
"uipath-core>=0.5.8, <0.6.0",
99
"uipath-runtime>=0.10.1, <0.11.0",
10-
"uipath-platform>=0.1.43, <0.2.0",
10+
"uipath-platform>=0.1.45, <0.2.0",
1111
"click>=8.3.1",
1212
"httpx>=0.28.1",
1313
"pyjwt>=2.10.1",

packages/uipath/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)