From 84a7083fbf2ec01d4907653923511468fc741f77 Mon Sep 17 00:00:00 2001 From: Sakshar Thakkar Date: Tue, 3 Feb 2026 23:13:10 -0800 Subject: [PATCH 1/4] fix(tracing): preserve existing toolType span attribute The exporter was unconditionally overwriting toolType to "Integration" even when already set by the instrumentor (e.g., "Escalation"). Co-Authored-By: Claude Opus 4.5 --- src/uipath/tracing/_otel_exporters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uipath/tracing/_otel_exporters.py b/src/uipath/tracing/_otel_exporters.py index 2496d9331..a47c3acd1 100644 --- a/src/uipath/tracing/_otel_exporters.py +++ b/src/uipath/tracing/_otel_exporters.py @@ -285,7 +285,7 @@ def _map_tool_call_attributes(self, attributes: Dict[str, Any]) -> Dict[str, Any result["arguments"] = _safe_parse_json( attributes.get("input", attributes.get("input.value", "{}")) ) - result["toolType"] = "Integration" + result["toolType"] = result.get("toolType") or "Integration" result["result"] = _safe_parse_json( attributes.get("output", attributes.get("output.value")) ) From a9db5cdedbe4ab6cdec4213af016c3d9ecda3e2d Mon Sep 17 00:00:00 2001 From: Sakshar Thakkar Date: Tue, 3 Feb 2026 23:57:54 -0800 Subject: [PATCH 2/4] test: add unit test for toolType preservation Co-Authored-By: Claude Opus 4.5 --- tests/tracing/test_otel_exporters.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/tracing/test_otel_exporters.py b/tests/tracing/test_otel_exporters.py index bd3569ca5..3dd3aa549 100644 --- a/tests/tracing/test_otel_exporters.py +++ b/tests/tracing/test_otel_exporters.py @@ -411,6 +411,25 @@ def test_tool_span_mapping_issue(self): self.assertIn("input", attributes) self.assertEqual(attributes["input"], {}) + def test_tool_span_preserves_existing_tool_type(self): + """Test that existing toolType in attributes is preserved, not overwritten.""" + span_data = { + "Id": "test-span-id", + "TraceId": "test-trace-id", + "Attributes": { + "openinference.span.kind": "TOOL", + "tool.name": "my_custom_tool", + "input.value": "{}", + "output.value": '"result"', + "toolType": "Escalation", + }, + } + + self.exporter._process_span_attributes(span_data) + + attributes = span_data["Attributes"] + self.assertEqual(attributes["toolType"], "Escalation") + def test_llm_span_mapping_consistency(self): """ Test that LLM spans are consistently mapped to completion type. From 8e258d150879c4435a1986e3d78292b0aecb3a84 Mon Sep 17 00:00:00 2001 From: Sakshar Thakkar Date: Tue, 3 Feb 2026 23:58:24 -0800 Subject: [PATCH 3/4] chore: bump version to 2.7.3 Co-Authored-By: Claude Opus 4.5 --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 65ec21878..10b6d4d35 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath" -version = "2.7.2" +version = "2.7.3" description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools." readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.11" diff --git a/uv.lock b/uv.lock index 8d6a06b75..0a5493884 100644 --- a/uv.lock +++ b/uv.lock @@ -2491,7 +2491,7 @@ wheels = [ [[package]] name = "uipath" -version = "2.7.2" +version = "2.7.3" source = { editable = "." } dependencies = [ { name = "applicationinsights" }, From 9c04d3ed935a6b10b2829a101e9651d43b198822 Mon Sep 17 00:00:00 2001 From: Sakshar Thakkar Date: Wed, 4 Feb 2026 00:00:43 -0800 Subject: [PATCH 4/4] fix: add isinstance assert for type checker Co-Authored-By: Claude Opus 4.5 --- tests/tracing/test_otel_exporters.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tracing/test_otel_exporters.py b/tests/tracing/test_otel_exporters.py index 3dd3aa549..40aaa3938 100644 --- a/tests/tracing/test_otel_exporters.py +++ b/tests/tracing/test_otel_exporters.py @@ -428,6 +428,7 @@ def test_tool_span_preserves_existing_tool_type(self): self.exporter._process_span_attributes(span_data) attributes = span_data["Attributes"] + assert isinstance(attributes, dict) self.assertEqual(attributes["toolType"], "Escalation") def test_llm_span_mapping_consistency(self):