uipath 2.0.23__py3-none-any.whl → 2.0.25__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of uipath might be problematic. Click here for more details.

@@ -176,7 +176,7 @@ class ActionsService(FolderContext, BaseService):
176
176
  """
177
177
  super().__init__(config=config, execution_context=execution_context)
178
178
 
179
- @traced(run_type="uipath", hide_input=True, hide_output=True)
179
+ @traced(name="actions_create", run_type="uipath")
180
180
  async def create_async(
181
181
  self,
182
182
  title: str,
@@ -234,7 +234,7 @@ class ActionsService(FolderContext, BaseService):
234
234
  await self.request_async(spec.method, spec.endpoint, content=spec.content)
235
235
  return Action.model_validate(json_response)
236
236
 
237
- @traced(run_type="uipath", hide_input=True, hide_output=True)
237
+ @traced(name="actions_create", run_type="uipath")
238
238
  def create(
239
239
  self,
240
240
  title: str,
@@ -292,7 +292,7 @@ class ActionsService(FolderContext, BaseService):
292
292
  self.request(spec.method, spec.endpoint, content=spec.content)
293
293
  return Action.model_validate(json_response)
294
294
 
295
- @traced(run_type="uipath", hide_input=True, hide_output=True)
295
+ @traced(name="actions_retrieve", run_type="uipath")
296
296
  def retrieve(
297
297
  self, action_key: str, app_folder_path: str = "", app_folder_key: str = ""
298
298
  ) -> Action:
@@ -317,7 +317,7 @@ class ActionsService(FolderContext, BaseService):
317
317
 
318
318
  return Action.model_validate(response.json())
319
319
 
320
- @traced(run_type="uipath", hide_input=True, hide_output=True)
320
+ @traced(name="actions_retrieve", run_type="uipath")
321
321
  async def retrieve_async(
322
322
  self, action_key: str, app_folder_path: str = "", app_folder_key: str = ""
323
323
  ) -> Action:
@@ -22,7 +22,9 @@ class AssetsService(FolderContext, BaseService):
22
22
  super().__init__(config=config, execution_context=execution_context)
23
23
 
24
24
  @infer_bindings()
25
- @traced(run_type="uipath", hide_input=True, hide_output=True)
25
+ @traced(
26
+ name="assets_retrieve", run_type="uipath", hide_input=True, hide_output=True
27
+ )
26
28
  def retrieve(
27
29
  self,
28
30
  name: str,
@@ -58,7 +60,9 @@ class AssetsService(FolderContext, BaseService):
58
60
 
59
61
  return UserAsset.model_validate(response.json())
60
62
 
61
- @traced(run_type="uipath", hide_input=True, hide_output=True)
63
+ @traced(
64
+ name="assets_retrieve", run_type="uipath", hide_input=True, hide_output=True
65
+ )
62
66
  async def retrieve_async(
63
67
  self,
64
68
  name: str,
@@ -86,7 +90,9 @@ class AssetsService(FolderContext, BaseService):
86
90
  return UserAsset.model_validate(response.json())
87
91
 
88
92
  @infer_bindings()
89
- @traced(run_type="uipath", hide_input=True, hide_output=True)
93
+ @traced(
94
+ name="assets_credential", run_type="uipath", hide_input=True, hide_output=True
95
+ )
90
96
  def retrieve_credential(
91
97
  self,
92
98
  name: str,
@@ -122,7 +128,9 @@ class AssetsService(FolderContext, BaseService):
122
128
  return user_asset.credential_password
123
129
 
124
130
  @infer_bindings()
125
- @traced(run_type="uipath", hide_input=True, hide_output=True)
131
+ @traced(
132
+ name="assets_credential", run_type="uipath", hide_input=True, hide_output=True
133
+ )
126
134
  async def retrieve_credential_async(
127
135
  self,
128
136
  name: str,
@@ -158,7 +166,7 @@ class AssetsService(FolderContext, BaseService):
158
166
 
159
167
  return user_asset.credential_password
160
168
 
161
- @traced(run_type="uipath", hide_input=True, hide_output=True)
169
+ @traced(name="assets_update", run_type="uipath", hide_input=True, hide_output=True)
162
170
  def update(
163
171
  self,
164
172
  robot_asset: UserAsset,
@@ -187,7 +195,7 @@ class AssetsService(FolderContext, BaseService):
187
195
  headers=spec.headers,
188
196
  )
189
197
 
190
- @traced(run_type="uipath", hide_input=True, hide_output=True)
198
+ @traced(name="assets_update", run_type="uipath", hide_input=True, hide_output=True)
191
199
  async def update_async(
192
200
  self,
193
201
  robot_asset: UserAsset,
@@ -10,6 +10,11 @@ from ..tracing._traced import traced
10
10
  from ._base_service import BaseService
11
11
 
12
12
 
13
+ def _upload_from_memory_input_processor(inputs: Dict[str, Any]) -> Dict[str, Any]:
14
+ inputs["content"] = "<Redacted>"
15
+ return inputs
16
+
17
+
13
18
  class BucketsService(FolderContext, BaseService):
14
19
  """Service for managing UiPath storage buckets.
15
20
 
@@ -20,7 +25,7 @@ class BucketsService(FolderContext, BaseService):
20
25
  def __init__(self, config: Config, execution_context: ExecutionContext) -> None:
21
26
  super().__init__(config=config, execution_context=execution_context)
22
27
 
23
- @traced(run_type="uipath", hide_input=True, hide_output=True)
28
+ @traced(name="buckets_download", run_type="uipath")
24
29
  def download(
25
30
  self,
26
31
  bucket_key: str,
@@ -59,7 +64,7 @@ class BucketsService(FolderContext, BaseService):
59
64
  file_content = request("GET", read_uri, headers=headers).content
60
65
  file.write(file_content)
61
66
 
62
- @traced(run_type="uipath", hide_input=True, hide_output=True)
67
+ @traced(name="buckets_upload", run_type="uipath")
63
68
  def upload(
64
69
  self,
65
70
  *,
@@ -111,7 +116,11 @@ class BucketsService(FolderContext, BaseService):
111
116
  else:
112
117
  request("PUT", write_uri, headers=headers, files={"file": file})
113
118
 
114
- @traced(run_type="uipath", hide_input=True, hide_output=True)
119
+ @traced(
120
+ name="buckets_upload_from_memory",
121
+ run_type="uipath",
122
+ input_processor=_upload_from_memory_input_processor,
123
+ )
115
124
  def upload_from_memory(
116
125
  self,
117
126
  *,
@@ -167,7 +176,7 @@ class BucketsService(FolderContext, BaseService):
167
176
  request("PUT", write_uri, headers=headers, content=content)
168
177
 
169
178
  @infer_bindings()
170
- @traced(run_type="uipath", hide_input=True, hide_output=True)
179
+ @traced(name="buckets_retrieve", run_type="uipath")
171
180
  def retrieve(self, name: str) -> Any:
172
181
  """Retrieve bucket information by its name.
173
182
 
@@ -192,7 +201,7 @@ class BucketsService(FolderContext, BaseService):
192
201
  return response.json()["value"][0]
193
202
 
194
203
  @infer_bindings()
195
- @traced(run_type="uipath", hide_input=True, hide_output=True)
204
+ @traced(name="buckets_retrieve", run_type="uipath")
196
205
  async def retrieve_async(self, name: str) -> Any:
197
206
  """Asynchronously retrieve bucket information by its name.
198
207
 
@@ -216,7 +225,7 @@ class BucketsService(FolderContext, BaseService):
216
225
 
217
226
  return response.json()["value"][0]
218
227
 
219
- @traced(run_type="uipath", hide_input=True, hide_output=True)
228
+ @traced(name="buckets_retrieve_by_key", run_type="uipath")
220
229
  def retrieve_by_key(self, key: str) -> Any:
221
230
  """Retrieve bucket information by its key.
222
231
 
@@ -236,7 +245,7 @@ class BucketsService(FolderContext, BaseService):
236
245
 
237
246
  return response.json()
238
247
 
239
- @traced(run_type="uipath", hide_input=True, hide_output=True)
248
+ @traced(name="buckets_retrieve_by_key", run_type="uipath")
240
249
  async def retrieve_by_key_async(self, key: str) -> Any:
241
250
  """Asynchronously retrieve bucket information by its key.
242
251
 
@@ -73,7 +73,11 @@ class ConnectionsService(BaseService):
73
73
  except AttributeError as e:
74
74
  raise PluginNotFoundError(f"Plugin '{name}' is not installed") from e
75
75
 
76
- @traced(run_type="uipath", hide_input=True, hide_output=True)
76
+ @traced(
77
+ name="connections_retrieve",
78
+ run_type="uipath",
79
+ hide_output=True,
80
+ )
77
81
  def retrieve(self, key: str) -> Connection:
78
82
  """Retrieve connection details by its key.
79
83
 
@@ -91,7 +95,11 @@ class ConnectionsService(BaseService):
91
95
  response = self.request(spec.method, url=spec.endpoint)
92
96
  return Connection.model_validate(response.json())
93
97
 
94
- @traced(run_type="uipath", hide_input=True, hide_output=True)
98
+ @traced(
99
+ name="connections_retrieve",
100
+ run_type="uipath",
101
+ hide_output=True,
102
+ )
95
103
  async def retrieve_async(self, key: str) -> Connection:
96
104
  """Asynchronously retrieve connection details by its key.
97
105
 
@@ -109,7 +117,11 @@ class ConnectionsService(BaseService):
109
117
  response = await self.request_async(spec.method, url=spec.endpoint)
110
118
  return Connection.model_validate(response.json())
111
119
 
112
- @traced(run_type="uipath", hide_input=True, hide_output=True)
120
+ @traced(
121
+ name="connections_retrieve_token",
122
+ run_type="uipath",
123
+ hide_output=True,
124
+ )
113
125
  def retrieve_token(self, key: str) -> ConnectionToken:
114
126
  """Retrieve an authentication token for a connection.
115
127
 
@@ -128,7 +140,11 @@ class ConnectionsService(BaseService):
128
140
  response = self.request(spec.method, url=spec.endpoint, params=spec.params)
129
141
  return ConnectionToken.model_validate(response.json())
130
142
 
131
- @traced(run_type="uipath", hide_input=True, hide_output=True)
143
+ @traced(
144
+ name="connections_retrieve_token",
145
+ run_type="uipath",
146
+ hide_output=True,
147
+ )
132
148
  async def retrieve_token_async(self, key: str) -> ConnectionToken:
133
149
  """Asynchronously retrieve an authentication token for a connection.
134
150
 
@@ -42,7 +42,7 @@ class ContextGroundingService(FolderContext, BaseService):
42
42
  self._folders_service = folders_service
43
43
  super().__init__(config=config, execution_context=execution_context)
44
44
 
45
- @traced(run_type="uipath", hide_input=True, hide_output=True)
45
+ @traced(name="contextgrounding_retrieve", run_type="uipath")
46
46
  def retrieve(
47
47
  self,
48
48
  name: str,
@@ -82,7 +82,7 @@ class ContextGroundingService(FolderContext, BaseService):
82
82
  None,
83
83
  )
84
84
 
85
- @traced(run_type="uipath", hide_input=True, hide_output=True)
85
+ @traced(name="contextgrounding_retrieve", run_type="uipath")
86
86
  async def retrieve_async(
87
87
  self,
88
88
  name: str,
@@ -124,7 +124,7 @@ class ContextGroundingService(FolderContext, BaseService):
124
124
  None,
125
125
  )
126
126
 
127
- @traced(run_type="uipath", hide_input=True, hide_output=True)
127
+ @traced(name="contextgrounding_retrieve_by_id", run_type="uipath")
128
128
  def retrieve_by_id(
129
129
  self,
130
130
  id: str,
@@ -154,7 +154,7 @@ class ContextGroundingService(FolderContext, BaseService):
154
154
  params=spec.params,
155
155
  ).json()
156
156
 
157
- @traced(run_type="uipath", hide_input=True, hide_output=True)
157
+ @traced(name="contextgrounding_retrieve_by_id", run_type="uipath")
158
158
  async def retrieve_by_id_async(
159
159
  self,
160
160
  id: str,
@@ -187,7 +187,7 @@ class ContextGroundingService(FolderContext, BaseService):
187
187
 
188
188
  return response.json()
189
189
 
190
- @traced(run_type="uipath", hide_input=True, hide_output=True)
190
+ @traced(name="contextgrounding_search", run_type="uipath")
191
191
  def search(
192
192
  self,
193
193
  name: str,
@@ -234,7 +234,7 @@ class ContextGroundingService(FolderContext, BaseService):
234
234
  response.json()
235
235
  )
236
236
 
237
- @traced(run_type="uipath", hide_input=True, hide_output=True)
237
+ @traced(name="contextgrounding_search", run_type="uipath")
238
238
  async def search_async(
239
239
  self,
240
240
  name: str,
@@ -284,7 +284,7 @@ class ContextGroundingService(FolderContext, BaseService):
284
284
  response.json()
285
285
  )
286
286
 
287
- @traced(run_type="uipath", hide_input=True, hide_output=True)
287
+ @traced(name="contextgrounding_get_or_create_index", run_type="uipath")
288
288
  def get_or_create_index(
289
289
  self,
290
290
  name: str,
@@ -321,7 +321,7 @@ class ContextGroundingService(FolderContext, BaseService):
321
321
  ).json()
322
322
  return ContextGroundingIndex.model_validate(response)
323
323
 
324
- @traced(run_type="uipath", hide_input=True, hide_output=True)
324
+ @traced(name="contextgrounding_get_or_create_index", run_type="uipath")
325
325
  async def get_or_create_index_async(
326
326
  self,
327
327
  name: str,
@@ -360,7 +360,7 @@ class ContextGroundingService(FolderContext, BaseService):
360
360
  ).json()
361
361
  return ContextGroundingIndex.model_validate(response)
362
362
 
363
- @traced(run_type="uipath", hide_input=True, hide_output=True)
363
+ @traced(name="contextgrounding_ingest_data", run_type="uipath")
364
364
  def ingest_data(
365
365
  self,
366
366
  index: ContextGroundingIndex,
@@ -380,7 +380,7 @@ class ContextGroundingService(FolderContext, BaseService):
380
380
  headers=spec.headers,
381
381
  )
382
382
 
383
- @traced(run_type="uipath", hide_input=True, hide_output=True)
383
+ @traced(name="contextgrounding_ingest_data", run_type="uipath")
384
384
  async def ingest_data_async(
385
385
  self,
386
386
  index: ContextGroundingIndex,
@@ -400,7 +400,7 @@ class ContextGroundingService(FolderContext, BaseService):
400
400
  headers=spec.headers,
401
401
  )
402
402
 
403
- @traced(run_type="uipath", hide_input=True, hide_output=True)
403
+ @traced(name="contextgrounding_delete_index", run_type="uipath")
404
404
  def delete_index(
405
405
  self,
406
406
  index: ContextGroundingIndex,
@@ -420,7 +420,7 @@ class ContextGroundingService(FolderContext, BaseService):
420
420
  headers=spec.headers,
421
421
  )
422
422
 
423
- @traced(run_type="uipath", hide_input=True, hide_output=True)
423
+ @traced(name="contextgrounding_delete_index", run_type="uipath")
424
424
  async def delete_index_async(
425
425
  self,
426
426
  index: ContextGroundingIndex,
@@ -33,7 +33,7 @@ class FolderService(BaseService):
33
33
  def __init__(self, config: Config, execution_context: ExecutionContext) -> None:
34
34
  super().__init__(config=config, execution_context=execution_context)
35
35
 
36
- @traced(run_type="uipath")
36
+ @traced(name="folder_retrieve_key_by_folder_path", run_type="uipath")
37
37
  def retrieve_key_by_folder_path(self, folder_path: str) -> Optional[str]:
38
38
  spec = _retrieve_spec(folder_path)
39
39
  response = self.request(
@@ -27,7 +27,7 @@ class JobsService(FolderContext, BaseService):
27
27
  @overload
28
28
  def resume(self, *, job_id: str, payload: Any) -> None: ...
29
29
 
30
- @traced(run_type="uipath", hide_input=True, hide_output=True)
30
+ @traced(name="jobs_resume", run_type="uipath")
31
31
  def resume(
32
32
  self,
33
33
  *,
@@ -54,7 +54,7 @@ class UiPathOpenAIService(BaseService):
54
54
  def __init__(self, config: Config, execution_context: ExecutionContext) -> None:
55
55
  super().__init__(config=config, execution_context=execution_context)
56
56
 
57
- @traced(run_type="uipath", hide_input=True, hide_output=True)
57
+ @traced(name="llm_embeddings_usage", run_type="uipath")
58
58
  async def embeddings_usage(
59
59
  self, input: str, embedding_model: str = EmbeddingModels.text_embedding_ada_002
60
60
  ):
@@ -81,7 +81,7 @@ class UiPathOpenAIService(BaseService):
81
81
 
82
82
  return UsageInfo.model_validate(response.json())
83
83
 
84
- @traced(run_type="uipath", hide_input=True, hide_output=True)
84
+ @traced(name="llm_embeddings", run_type="uipath")
85
85
  async def embeddings(
86
86
  self, input: str, embedding_model: str = EmbeddingModels.text_embedding_ada_002
87
87
  ):
@@ -107,7 +107,7 @@ class UiPathOpenAIService(BaseService):
107
107
 
108
108
  return TextEmbedding.model_validate(response.json())
109
109
 
110
- @traced(run_type="uipath", hide_input=True, hide_output=True)
110
+ @traced(name="llm_chat_completions", run_type="uipath")
111
111
  async def chat_completions(
112
112
  self,
113
113
  messages: List[Dict[str, str]],
@@ -157,7 +157,7 @@ class UiPathOpenAIService(BaseService):
157
157
 
158
158
  return ChatCompletion.model_validate(response.json())
159
159
 
160
- @traced(run_type="uipath", hide_input=True, hide_output=True)
160
+ @traced(name="llm_chat_completions_usage", run_type="uipath")
161
161
  async def chat_completions_usage(
162
162
  self,
163
163
  messages: List[Dict[str, str]],
@@ -216,7 +216,7 @@ class UiPathLlmChatService(BaseService):
216
216
  def __init__(self, config: Config, execution_context: ExecutionContext) -> None:
217
217
  super().__init__(config=config, execution_context=execution_context)
218
218
 
219
- @traced(run_type="uipath", hide_input=True, hide_output=True)
219
+ @traced(name="llm_chat_completions", run_type="uipath")
220
220
  async def chat_completions(
221
221
  self,
222
222
  messages: List[Dict[str, str]],
@@ -23,7 +23,7 @@ class ProcessesService(FolderContext, BaseService):
23
23
  def __init__(self, config: Config, execution_context: ExecutionContext) -> None:
24
24
  super().__init__(config=config, execution_context=execution_context)
25
25
 
26
- @traced(run_type="uipath", hide_input=True, hide_output=True)
26
+ @traced(name="processes_invoke", run_type="uipath")
27
27
  def invoke(
28
28
  self,
29
29
  name: str,
@@ -81,7 +81,7 @@ class ProcessesService(FolderContext, BaseService):
81
81
  return Job.model_validate(response.json()["value"][0])
82
82
 
83
83
  @infer_bindings()
84
- @traced(run_type="uipath", hide_input=True, hide_output=True)
84
+ @traced(name="processes_invoke", run_type="uipath")
85
85
  async def invoke_async(
86
86
  self,
87
87
  name: str,
@@ -21,7 +21,7 @@ class QueuesService(FolderContext, BaseService):
21
21
  def __init__(self, config: Config, execution_context: ExecutionContext) -> None:
22
22
  super().__init__(config=config, execution_context=execution_context)
23
23
 
24
- @traced(run_type="uipath", hide_input=True, hide_output=True)
24
+ @traced(name="queues_list_items", run_type="uipath")
25
25
  def list_items(self) -> Response:
26
26
  """Retrieves a list of queue items from the Orchestrator.
27
27
 
@@ -31,7 +31,7 @@ class QueuesService(FolderContext, BaseService):
31
31
  spec = self._list_items_spec()
32
32
  return self.request(spec.method, url=spec.endpoint)
33
33
 
34
- @traced(run_type="uipath", hide_input=True, hide_output=True)
34
+ @traced(name="queues_list_items", run_type="uipath")
35
35
  async def list_items_async(self) -> Response:
36
36
  """Asynchronously retrieves a list of queue items from the Orchestrator.
37
37
 
@@ -41,7 +41,7 @@ class QueuesService(FolderContext, BaseService):
41
41
  spec = self._list_items_spec()
42
42
  return await self.request_async(spec.method, url=spec.endpoint)
43
43
 
44
- @traced(run_type="uipath", hide_input=True, hide_output=True)
44
+ @traced(name="queues_create_item", run_type="uipath")
45
45
  def create_item(self, item: Union[Dict[str, Any], QueueItem]) -> Response:
46
46
  """Creates a new queue item in the Orchestrator.
47
47
 
@@ -56,7 +56,7 @@ class QueuesService(FolderContext, BaseService):
56
56
  spec = self._create_item_spec(item)
57
57
  return self.request(spec.method, url=spec.endpoint, json=spec.json)
58
58
 
59
- @traced(run_type="uipath", hide_input=True, hide_output=True)
59
+ @traced(name="queues_create_item", run_type="uipath")
60
60
  async def create_item_async(
61
61
  self, item: Union[Dict[str, Any], QueueItem]
62
62
  ) -> Response:
@@ -73,7 +73,7 @@ class QueuesService(FolderContext, BaseService):
73
73
  spec = self._create_item_spec(item)
74
74
  return await self.request_async(spec.method, url=spec.endpoint, json=spec.json)
75
75
 
76
- @traced(run_type="uipath", hide_input=True, hide_output=True)
76
+ @traced(name="queues_create_items", run_type="uipath")
77
77
  def create_items(
78
78
  self,
79
79
  items: List[Union[Dict[str, Any], QueueItem]],
@@ -93,7 +93,7 @@ class QueuesService(FolderContext, BaseService):
93
93
  spec = self._create_items_spec(items, queue_name, commit_type)
94
94
  return self.request(spec.method, url=spec.endpoint, json=spec.json)
95
95
 
96
- @traced(run_type="uipath", hide_input=True, hide_output=True)
96
+ @traced(name="queues_create_items", run_type="uipath")
97
97
  async def create_items_async(
98
98
  self,
99
99
  items: List[Union[Dict[str, Any], QueueItem]],
@@ -113,7 +113,7 @@ class QueuesService(FolderContext, BaseService):
113
113
  spec = self._create_items_spec(items, queue_name, commit_type)
114
114
  return await self.request_async(spec.method, url=spec.endpoint, json=spec.json)
115
115
 
116
- @traced(run_type="uipath", hide_input=True, hide_output=True)
116
+ @traced(name="queues_create_transaction_item", run_type="uipath")
117
117
  def create_transaction_item(
118
118
  self, item: Union[Dict[str, Any], TransactionItem], no_robot: bool = False
119
119
  ) -> Response:
@@ -129,7 +129,7 @@ class QueuesService(FolderContext, BaseService):
129
129
  spec = self._create_transaction_item_spec(item, no_robot)
130
130
  return self.request(spec.method, url=spec.endpoint, json=spec.json)
131
131
 
132
- @traced(run_type="uipath", hide_input=True, hide_output=True)
132
+ @traced(name="queues_create_transaction_item", run_type="uipath")
133
133
  async def create_transaction_item_async(
134
134
  self, item: Union[Dict[str, Any], TransactionItem], no_robot: bool = False
135
135
  ) -> Response:
@@ -145,7 +145,7 @@ class QueuesService(FolderContext, BaseService):
145
145
  spec = self._create_transaction_item_spec(item, no_robot)
146
146
  return await self.request_async(spec.method, url=spec.endpoint, json=spec.json)
147
147
 
148
- @traced(run_type="uipath", hide_input=True, hide_output=True)
148
+ @traced(name="queues_update_progress_of_transaction_item", run_type="uipath")
149
149
  def update_progress_of_transaction_item(
150
150
  self, transaction_key: str, progress: str
151
151
  ) -> Response:
@@ -163,7 +163,7 @@ class QueuesService(FolderContext, BaseService):
163
163
  spec = self._update_progress_of_transaction_item_spec(transaction_key, progress)
164
164
  return self.request(spec.method, url=spec.endpoint, json=spec.json)
165
165
 
166
- @traced(run_type="uipath", hide_input=True, hide_output=True)
166
+ @traced(name="queues_update_progress_of_transaction_item", run_type="uipath")
167
167
  async def update_progress_of_transaction_item_async(
168
168
  self, transaction_key: str, progress: str
169
169
  ) -> Response:
@@ -181,7 +181,7 @@ class QueuesService(FolderContext, BaseService):
181
181
  spec = self._update_progress_of_transaction_item_spec(transaction_key, progress)
182
182
  return await self.request_async(spec.method, url=spec.endpoint, json=spec.json)
183
183
 
184
- @traced(run_type="uipath", hide_input=True, hide_output=True)
184
+ @traced(name="queues_complete_transaction_item", run_type="uipath")
185
185
  def complete_transaction_item(
186
186
  self, transaction_key: str, result: Union[Dict[str, Any], TransactionItemResult]
187
187
  ) -> Response:
@@ -199,7 +199,7 @@ class QueuesService(FolderContext, BaseService):
199
199
  spec = self._complete_transaction_item_spec(transaction_key, result)
200
200
  return self.request(spec.method, url=spec.endpoint, json=spec.json)
201
201
 
202
- @traced(run_type="uipath", hide_input=True, hide_output=True)
202
+ @traced(name="queues_complete_transaction_item", run_type="uipath")
203
203
  async def complete_transaction_item_async(
204
204
  self, transaction_key: str, result: Union[Dict[str, Any], TransactionItemResult]
205
205
  ) -> Response:
@@ -7,7 +7,10 @@ def user_agent_value(specific_component: str) -> str:
7
7
  product = "UiPath.Python.Sdk"
8
8
  product_component = f"UiPath.Python.Sdk.Activities.{specific_component}"
9
9
 
10
- version = importlib.metadata.version("uipath")
10
+ try:
11
+ version = importlib.metadata.version("uipath")
12
+ except importlib.metadata.PackageNotFoundError:
13
+ version = "unknown"
11
14
 
12
15
  return f"{product}/{product_component}/{version}"
13
16
 
uipath/tracing/_traced.py CHANGED
@@ -51,8 +51,9 @@ class TracingManager:
51
51
 
52
52
  Args:
53
53
  tracer_implementation: A function that takes the same parameters as _opentelemetry_traced
54
- and returns a decorator
54
+ and returns a decorator. If None, reverts to default implementation.
55
55
  """
56
+ tracer_implementation = tracer_implementation or _opentelemetry_traced
56
57
  cls._custom_tracer_implementation = tracer_implementation
57
58
 
58
59
  # Work with a copy of the registry to avoid modifying it during iteration
@@ -60,7 +61,10 @@ class TracingManager:
60
61
 
61
62
  for original_func, decorated_func, params in registry_copy:
62
63
  # Apply the new decorator with the same parameters
63
- new_decorated_func = tracer_implementation(**params)(original_func)
64
+ supported_params = _get_supported_params(tracer_implementation, params)
65
+ new_decorated_func = tracer_implementation(**supported_params)(
66
+ original_func
67
+ )
64
68
 
65
69
  logger.debug(
66
70
  f"Reapplying decorator to {original_func.__name__}, from {decorated_func.__name__}"
@@ -125,6 +129,7 @@ def wait_for_tracers():
125
129
 
126
130
 
127
131
  def _opentelemetry_traced(
132
+ name: Optional[str] = None,
128
133
  run_type: Optional[str] = None,
129
134
  span_type: Optional[str] = None,
130
135
  input_processor: Optional[Callable[..., Any]] = None,
@@ -133,9 +138,11 @@ def _opentelemetry_traced(
133
138
  """Default tracer implementation using OpenTelemetry."""
134
139
 
135
140
  def decorator(func):
141
+ trace_name = name if name is not None else func.__name__
142
+
136
143
  @wraps(func)
137
144
  def sync_wrapper(*args, **kwargs):
138
- with tracer.start_as_current_span(func.__name__) as span:
145
+ with tracer.start_as_current_span(trace_name) as span:
139
146
  default_span_type = "function_call_sync"
140
147
  span.set_attribute(
141
148
  "span_type",
@@ -170,7 +177,7 @@ def _opentelemetry_traced(
170
177
 
171
178
  @wraps(func)
172
179
  async def async_wrapper(*args, **kwargs):
173
- with tracer.start_as_current_span(func.__name__) as span:
180
+ with tracer.start_as_current_span(trace_name) as span:
174
181
  default_span_type = "function_call_async"
175
182
  span.set_attribute(
176
183
  "span_type",
@@ -205,7 +212,7 @@ def _opentelemetry_traced(
205
212
 
206
213
  @wraps(func)
207
214
  def generator_wrapper(*args, **kwargs):
208
- with tracer.start_as_current_span(func.__name__) as span:
215
+ with tracer.start_as_current_span(trace_name) as span:
209
216
  default_span_type = "function_call_generator_sync"
210
217
  span.set_attribute(
211
218
  "span_type",
@@ -246,7 +253,7 @@ def _opentelemetry_traced(
246
253
 
247
254
  @wraps(func)
248
255
  async def async_generator_wrapper(*args, **kwargs):
249
- with tracer.start_as_current_span(func.__name__) as span:
256
+ with tracer.start_as_current_span(trace_name) as span:
250
257
  default_span_type = "function_call_generator_async"
251
258
  span.set_attribute(
252
259
  "span_type",
@@ -297,7 +304,38 @@ def _opentelemetry_traced(
297
304
  return decorator
298
305
 
299
306
 
307
+ def _get_supported_params(tracer_impl, params):
308
+ """Extract the parameters supported by the tracer implementation.
309
+
310
+ Args:
311
+ tracer_impl: The tracer implementation function or callable
312
+ params: Dictionary of parameters to check
313
+
314
+ Returns:
315
+ Dictionary containing only parameters supported by the tracer implementation
316
+ """
317
+ supported_params = {}
318
+ if hasattr(tracer_impl, "__code__"):
319
+ # For regular functions
320
+ impl_signature = inspect.signature(tracer_impl)
321
+ for param_name, param_value in params.items():
322
+ if param_name in impl_signature.parameters and param_value is not None:
323
+ supported_params[param_name] = param_value
324
+ elif callable(tracer_impl):
325
+ # For callable objects
326
+ impl_signature = inspect.signature(tracer_impl.__call__)
327
+ for param_name, param_value in params.items():
328
+ if param_name in impl_signature.parameters and param_value is not None:
329
+ supported_params[param_name] = param_value
330
+ else:
331
+ # If we can't inspect, pass all parameters and let the function handle it
332
+ supported_params = params
333
+
334
+ return supported_params
335
+
336
+
300
337
  def traced(
338
+ name: Optional[str] = None,
301
339
  run_type: Optional[str] = None,
302
340
  span_type: Optional[str] = None,
303
341
  input_processor: Optional[Callable[..., Any]] = None,
@@ -325,6 +363,7 @@ def traced(
325
363
 
326
364
  # Store the parameters for later reapplication
327
365
  params = {
366
+ "name": name,
328
367
  "run_type": run_type,
329
368
  "span_type": span_type,
330
369
  "input_processor": input_processor,
@@ -338,8 +377,12 @@ def traced(
338
377
  )
339
378
 
340
379
  def decorator(func):
341
- # Decorate the function
342
- decorated_func = tracer_impl(**params)(func)
380
+ # Check which parameters are supported by the tracer_impl
381
+ supported_params = _get_supported_params(tracer_impl, params)
382
+
383
+ # Decorate the function with only supported parameters
384
+ decorated_func = tracer_impl(**supported_params)(func)
385
+
343
386
  # Register both original and decorated function with parameters
344
387
  TracingManager.register_traced_function(func, decorated_func, params)
345
388
  return decorated_func
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath
3
- Version: 2.0.23
3
+ Version: 2.0.25
4
4
  Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
5
5
  Project-URL: Homepage, https://uipath.com
6
6
  Project-URL: Repository, https://github.com/UiPath/uipath-python
@@ -40,25 +40,25 @@ uipath/_cli/_utils/_parse_ast.py,sha256=3XVjnhJNnSfjXlitct91VOtqSl0l-sqDpoWww28m
40
40
  uipath/_cli/_utils/_processes.py,sha256=kcsMNlo8yvWwKSBxumAPFDPm67Od1ZpZglfNgvoIBso,1602
41
41
  uipath/_services/__init__.py,sha256=VPbwLDsvN26nWZgvR-8_-tc3i0rk5doqjTJbSrK0nN4,818
42
42
  uipath/_services/_base_service.py,sha256=3YClCoZBkVQGNJZGy-4NTk-HGsGA61XtwVQFYv9mwWk,7955
43
- uipath/_services/actions_service.py,sha256=tOu3EwzLrDGXHwqzUsgKI4tbhJHDlumleGywnKH1sAs,15839
43
+ uipath/_services/actions_service.py,sha256=RNrR6v42ivpSLtv1W4ctqittScMr9pFUHl9CKOn7tdU,15795
44
44
  uipath/_services/api_client.py,sha256=1hYLc_90dQzCGnqqirEHpPqvL3Gkv2sSKoeOV_iTmlk,2903
45
- uipath/_services/assets_service.py,sha256=UUWzQiYruNAWk3P8qPrccDDWRUD_ycfqf3eRM-E9N44,9080
46
- uipath/_services/buckets_service.py,sha256=h1Rx9H4XV2cxIZ1xIcYjNYFa1YZEHgIhQpQ10jZIinU,9154
47
- uipath/_services/connections_service.py,sha256=5impJ5O0Wj2n0-RYnwI1TfOPAp5JStFwTjn_yCGySE8,7154
45
+ uipath/_services/assets_service.py,sha256=nuaP-yzObUiB10VLeq4AsEcx75VJokbr3HC9EpW0iXA,9280
46
+ uipath/_services/buckets_service.py,sha256=m0HMWBkooUhjTtna_ZXcw4QOzKmaibuepWlC8wPGtlA,9330
47
+ uipath/_services/connections_service.py,sha256=bE-t-YS_C67bcyEA9xNwKqv5b0dN7qh0McZdGETcEAQ,7338
48
48
  uipath/_services/connections_service.pyi,sha256=6OOnh0aCfxhETL8n_JZ6Xoe2BE3ST_7Vz-FgLZc53lM,2465
49
- uipath/_services/context_grounding_service.py,sha256=ts5VhjWBkl7YFBBWk2Dr0otENikYVBYYtxcdW9FWtRo,19255
50
- uipath/_services/folder_service.py,sha256=CBrEPjHFg6zAaNBbpcdrqaoPZWbgpTzWtAVz04J39mY,1630
51
- uipath/_services/jobs_service.py,sha256=IpsqXo0QAjUK8AdA_pSMu2g9ncPccNxHh-yMF-Gy58I,8229
52
- uipath/_services/llm_gateway_service.py,sha256=I1WcpIVWAMkkkY7uT_EU8Mqc_53LbRlo40GvSxNfiXg,12062
53
- uipath/_services/processes_service.py,sha256=nzNlxJnTiM5NVtFxFX2WuWOxE0YrVb0WG6QE7f4Csg0,5679
54
- uipath/_services/queues_service.py,sha256=yIDLxFEmVTt39ISSL2AaBJYq2hQH4CXxUP4Zc2MVTRI,13054
49
+ uipath/_services/context_grounding_service.py,sha256=nZDntNcpPNHcEfgw-Aq-9t2YpVx1uPTphBnVwnztM6E,19287
50
+ uipath/_services/folder_service.py,sha256=HtsBoBejvMuIZ-9gocAG9B8uKOFsAAD4WUozta-isXk,1673
51
+ uipath/_services/jobs_service.py,sha256=MsJlu1egvHKZhHdammp4Xo9iJzceWquW4qIWT-nPBws,8214
52
+ uipath/_services/llm_gateway_service.py,sha256=ySg3sflIoXmY9K7txlSm7bkuI2qzBT0kAKmGlFBk5KA,12032
53
+ uipath/_services/processes_service.py,sha256=12tflrzTNvtA0xGteQwrIZ0s-jCTinTv7gktder5tRE,5659
54
+ uipath/_services/queues_service.py,sha256=4vohI1feTb6jL62mOq36xILXNBmvdkqRKFsVmHCrIIU,13058
55
55
  uipath/_utils/__init__.py,sha256=y8asYKjU5j3v72TbgShEpUafAAJXJ6bngqdzXIl-Lhk,481
56
56
  uipath/_utils/_endpoint.py,sha256=yYHwqbQuJIevpaTkdfYJS9CrtlFeEyfb5JQK5osTCog,2489
57
57
  uipath/_utils/_infer_bindings.py,sha256=ysAftopcCBj4ojYyeVwbSl20qYhCDmqyldCinj6sICM,905
58
58
  uipath/_utils/_logs.py,sha256=adfX_0UAn3YBeKJ8DQDeZs94rJyHGQO00uDfkaTpNWQ,510
59
59
  uipath/_utils/_request_override.py,sha256=_vibG78vEDWS3JKg2cJ5l6tpoBMLChUOauiqL1ozFPc,530
60
60
  uipath/_utils/_request_spec.py,sha256=iCtBLqtbWUpFG5g1wtIZBzSupKsfaRLiQFoFc_4B70Q,747
61
- uipath/_utils/_user_agent.py,sha256=AcyXwxzdg1Woi-TuFdHzDExC34AgwW4_i9W8JVj-VZI,470
61
+ uipath/_utils/_user_agent.py,sha256=pVJkFYacGwaQBomfwWVAvBQgdBUo62e4n3-fLIajWUU,563
62
62
  uipath/_utils/constants.py,sha256=xW-gbRasjdOwSj2rke4wfRCml69710oUaDNJcwFAZug,775
63
63
  uipath/models/__init__.py,sha256=zzGDvDaYt5HU7uGMY09dQ0Fi-wXhq0ZDCbokkb7AZGk,935
64
64
  uipath/models/action_schema.py,sha256=lKDhP7Eix23fFvfQrqqNmSOiPyyNF6tiRpUu0VZIn_M,714
@@ -75,10 +75,10 @@ uipath/models/processes.py,sha256=Atvfrt6X4TYST3iA62jpS_Uxc3hg6uah11p-RaKZ6dk,20
75
75
  uipath/models/queues.py,sha256=N_s0GKucbyjh0RnO8SxPk6wlRgvq8KIIYsfaoIY46tM,6446
76
76
  uipath/tracing/__init__.py,sha256=GimSzv6qkCOlHOG1WtjYKJsZqcXpA28IgoXfR33JhiA,139
77
77
  uipath/tracing/_otel_exporters.py,sha256=x0PDPmDKJcxashsuehVsSsqBCzRr6WsNFaq_3_HS5F0,3014
78
- uipath/tracing/_traced.py,sha256=9nEjFjGuxPlJ_4OXoClJ79xcbFK6C8iyI03kQQSDaJg,14834
78
+ uipath/tracing/_traced.py,sha256=GFxOp73jk0vGTN_H7YZOOsEl9rVLaEhXGztMiYKIA-8,16634
79
79
  uipath/tracing/_utils.py,sha256=5SwsTGpHkIouXBndw-u8eCLnN4p7LM8DsTCCuf2jJgs,10165
80
- uipath-2.0.23.dist-info/METADATA,sha256=999C2E6QgRBLnFsxTtDrY-Cmjrc_73GC99_LByCWobo,6106
81
- uipath-2.0.23.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
82
- uipath-2.0.23.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
83
- uipath-2.0.23.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
84
- uipath-2.0.23.dist-info/RECORD,,
80
+ uipath-2.0.25.dist-info/METADATA,sha256=-p87xxL7-fDDDqcP_0eR0XNoS49ehhL7j3tc-LDM-Gg,6106
81
+ uipath-2.0.25.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
82
+ uipath-2.0.25.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
83
+ uipath-2.0.25.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
84
+ uipath-2.0.25.dist-info/RECORD,,