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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/uipath/tracing/_otel_exporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
)
Expand Down
20 changes: 20 additions & 0 deletions tests/tracing/test_otel_exporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,26 @@ 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"]
assert isinstance(attributes, dict)
self.assertEqual(attributes["toolType"], "Escalation")

def test_llm_span_mapping_consistency(self):
"""
Test that LLM spans are consistently mapped to completion type.
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

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