Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/uipath-core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[project]
name = "uipath-core"
version = "0.5.34"
version = "0.5.35"
description = "UiPath Core abstractions"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
dependencies = [
"opentelemetry-sdk>=1.39.0, <2.0.0",
"opentelemetry-sdk>=1.45.2, <2.0.0",
"opentelemetry-instrumentation>=0.60b0, <1.0.0",
"pydantic>=2.12.5, <3.0.0",
]
Expand Down
68 changes: 23 additions & 45 deletions packages/uipath-core/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/uipath-platform/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[project]
name = "uipath-platform"
version = "0.3.11"
version = "0.3.12"
description = "HTTP client library for programmatic access to UiPath Platform"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
dependencies = [
"anyio>=4.0.0",
"anyio>=4.14.2",
"httpx>=0.28.1",
"tenacity>=9.0.0",
"truststore>=0.10.1",
"uipath-core>=0.5.34, <0.6.0",
"uipath-core>=0.5.35, <0.6.0",
"pydantic-function-models>=0.1.11",
"sqlparse>=0.6.0, <0.7.0",
"sqlparse>=0.6.1, <0.7.0",
]
classifiers = [
"Intended Audience :: Developers",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ def otel_span_to_uipath_span(
"""
# Extract the context information from the OTel span
span_context = otel_span.get_span_context()
if span_context is None:
raise ValueError(f"Span {otel_span.name!r} has no span context")

# Convert to OTEL hex format (32 chars for trace_id, 16 chars for span_id)
trace_id = format(span_context.trace_id, "032x")
Expand Down
8 changes: 8 additions & 0 deletions packages/uipath-platform/tests/services/test_span_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,14 @@ def test_attributes_map_to_top_level_fields(self) -> None:
assert getattr(uipath_span, span_field) == expected_output, span_field
assert span_dict[top_level_key] == expected_output, top_level_key

def test_missing_span_context_raises(self) -> None:
mock_span = Mock(spec=OTelSpan)
mock_span.get_span_context.return_value = None
mock_span.name = "no-context-span"

with pytest.raises(ValueError, match="no-context-span"):
_SpanUtils.otel_span_to_uipath_span(mock_span)

@patch.dict(os.environ, {"UIPATH_ORGANIZATION_ID": "test-org"})
def test_verbosity_level_omitted_when_unset(self) -> None:
"""Spans that don't set verbosityLevel must not carry the key on the wire.
Expand Down
Loading
Loading