Skip to content

Commit 6adcc50

Browse files
authored
Merge pull request #34 from UiPath/fix/samples
fix: set proper span_type
2 parents 018e69d + 0b47497 commit 6adcc50

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-mcp"
3-
version = "0.0.30"
3+
version = "0.0.31"
44
description = "UiPath MCP SDK"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.10"

src/uipath_mcp/_cli/_runtime/_tracer.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,30 +38,35 @@ def create_span_for_message(
3838
if isinstance(root_value, types.JSONRPCRequest):
3939
span = self.tracer.start_span(f"{root_value.method} [{root_value.id}]")
4040
span.set_attribute("type", "request")
41+
span.set_attribute("span_type", "request")
4142
span.set_attribute("id", str(root_value.id))
4243
span.set_attribute("method", root_value.method)
4344
self._add_request_attributes(span, root_value)
4445

4546
elif isinstance(root_value, types.JSONRPCNotification):
4647
span = self.tracer.start_span(root_value.method)
4748
span.set_attribute("type", "notification")
49+
span.set_attribute("span_type", "notification")
4850
span.set_attribute("method", root_value.method)
4951
self._add_notification_attributes(span, root_value)
5052

5153
elif isinstance(root_value, types.JSONRPCResponse):
5254
span = self.tracer.start_span(f"response [{root_value.id}]")
5355
span.set_attribute("type", "response")
56+
span.set_attribute("span_type", "response")
5457
span.set_attribute("id", str(root_value.id))
5558
self._add_response_attributes(span, root_value)
5659

5760
elif isinstance(root_value, types.JSONRPCError):
5861
span = self.tracer.start_span(f"error [{root_value.id}]")
5962
span.set_attribute("type", "error")
63+
span.set_attribute("span_type", "error")
6064
span.set_attribute("id", str(root_value.id))
6165
span.set_attribute("error_code", root_value.error.code)
6266
span.set_attribute("error_message", root_value.error.message)
6367
else:
6468
span = self.tracer.start_span("unknown")
69+
span.set_attribute("span_type", str(type(root_value).__name__))
6570
span.set_attribute("type", str(type(root_value).__name__))
6671

6772
# Add context attributes

0 commit comments

Comments
 (0)