uipath 2.0.24__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.
- uipath/tracing/_traced.py +42 -4
- {uipath-2.0.24.dist-info → uipath-2.0.25.dist-info}/METADATA +1 -1
- {uipath-2.0.24.dist-info → uipath-2.0.25.dist-info}/RECORD +6 -6
- {uipath-2.0.24.dist-info → uipath-2.0.25.dist-info}/WHEEL +0 -0
- {uipath-2.0.24.dist-info → uipath-2.0.25.dist-info}/entry_points.txt +0 -0
- {uipath-2.0.24.dist-info → uipath-2.0.25.dist-info}/licenses/LICENSE +0 -0
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
|
-
|
|
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__}"
|
|
@@ -300,6 +304,36 @@ def _opentelemetry_traced(
|
|
|
300
304
|
return decorator
|
|
301
305
|
|
|
302
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
|
+
|
|
303
337
|
def traced(
|
|
304
338
|
name: Optional[str] = None,
|
|
305
339
|
run_type: Optional[str] = None,
|
|
@@ -343,8 +377,12 @@ def traced(
|
|
|
343
377
|
)
|
|
344
378
|
|
|
345
379
|
def decorator(func):
|
|
346
|
-
#
|
|
347
|
-
|
|
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
|
+
|
|
348
386
|
# Register both original and decorated function with parameters
|
|
349
387
|
TracingManager.register_traced_function(func, decorated_func, params)
|
|
350
388
|
return decorated_func
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uipath
|
|
3
|
-
Version: 2.0.
|
|
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
|
|
@@ -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=
|
|
78
|
+
uipath/tracing/_traced.py,sha256=GFxOp73jk0vGTN_H7YZOOsEl9rVLaEhXGztMiYKIA-8,16634
|
|
79
79
|
uipath/tracing/_utils.py,sha256=5SwsTGpHkIouXBndw-u8eCLnN4p7LM8DsTCCuf2jJgs,10165
|
|
80
|
-
uipath-2.0.
|
|
81
|
-
uipath-2.0.
|
|
82
|
-
uipath-2.0.
|
|
83
|
-
uipath-2.0.
|
|
84
|
-
uipath-2.0.
|
|
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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|