uipath-core 0.1.6__py3-none-any.whl → 0.1.7__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.
- uipath/core/tracing/decorators.py +14 -0
- {uipath_core-0.1.6.dist-info → uipath_core-0.1.7.dist-info}/METADATA +1 -1
- {uipath_core-0.1.6.dist-info → uipath_core-0.1.7.dist-info}/RECORD +5 -5
- {uipath_core-0.1.6.dist-info → uipath_core-0.1.7.dist-info}/WHEEL +0 -0
- {uipath_core-0.1.6.dist-info → uipath_core-0.1.7.dist-info}/licenses/LICENSE +0 -0
|
@@ -6,7 +6,9 @@ import random
|
|
|
6
6
|
from functools import wraps
|
|
7
7
|
from typing import Any, Callable, Optional
|
|
8
8
|
|
|
9
|
+
from opentelemetry import context as context_api
|
|
9
10
|
from opentelemetry import trace
|
|
11
|
+
from opentelemetry.context import _SUPPRESS_INSTRUMENTATION_KEY
|
|
10
12
|
from opentelemetry.trace import NonRecordingSpan, SpanContext, TraceFlags
|
|
11
13
|
from opentelemetry.trace.status import StatusCode
|
|
12
14
|
|
|
@@ -78,6 +80,8 @@ def _opentelemetry_traced(
|
|
|
78
80
|
# --------- Sync wrapper ---------
|
|
79
81
|
@wraps(func)
|
|
80
82
|
def sync_wrapper(*args: Any, **kwargs: Any) -> Any:
|
|
83
|
+
if context_api.get_value(_SUPPRESS_INSTRUMENTATION_KEY):
|
|
84
|
+
return func(*args, **kwargs)
|
|
81
85
|
span_cm, span = get_span()
|
|
82
86
|
try:
|
|
83
87
|
# Set input attributes BEFORE execution
|
|
@@ -113,6 +117,8 @@ def _opentelemetry_traced(
|
|
|
113
117
|
# --------- Async wrapper ---------
|
|
114
118
|
@wraps(func)
|
|
115
119
|
async def async_wrapper(*args: Any, **kwargs: Any) -> Any:
|
|
120
|
+
if context_api.get_value(_SUPPRESS_INSTRUMENTATION_KEY):
|
|
121
|
+
return await func(*args, **kwargs)
|
|
116
122
|
span_cm, span = get_span()
|
|
117
123
|
try:
|
|
118
124
|
# Set input attributes BEFORE execution
|
|
@@ -148,6 +154,10 @@ def _opentelemetry_traced(
|
|
|
148
154
|
# --------- Generator wrapper ---------
|
|
149
155
|
@wraps(func)
|
|
150
156
|
def generator_wrapper(*args: Any, **kwargs: Any) -> Any:
|
|
157
|
+
if context_api.get_value(_SUPPRESS_INSTRUMENTATION_KEY):
|
|
158
|
+
for item in func(*args, **kwargs):
|
|
159
|
+
yield item
|
|
160
|
+
return
|
|
151
161
|
span_cm, span = get_span()
|
|
152
162
|
try:
|
|
153
163
|
# Set input attributes BEFORE execution
|
|
@@ -186,6 +196,10 @@ def _opentelemetry_traced(
|
|
|
186
196
|
# --------- Async generator wrapper ---------
|
|
187
197
|
@wraps(func)
|
|
188
198
|
async def async_generator_wrapper(*args: Any, **kwargs: Any) -> Any:
|
|
199
|
+
if context_api.get_value(_SUPPRESS_INSTRUMENTATION_KEY):
|
|
200
|
+
async for item in func(*args, **kwargs):
|
|
201
|
+
yield item
|
|
202
|
+
return
|
|
189
203
|
span_cm, span = get_span()
|
|
190
204
|
try:
|
|
191
205
|
# Set input attributes BEFORE execution
|
|
@@ -20,12 +20,12 @@ uipath/core/guardrails/_evaluators.py,sha256=ovmVm-8iB8Pm9arjG7mHM9-GIRkrG3V6oHR
|
|
|
20
20
|
uipath/core/guardrails/guardrails.py,sha256=DraeFkoDKVDnc0EKdFYYP29lQu7U2hneTsj1dxveHU4,4935
|
|
21
21
|
uipath/core/tracing/__init__.py,sha256=1XNLYZ4J76XkRrizGO486mS6yxzVXUbrldpvxTyJe3E,483
|
|
22
22
|
uipath/core/tracing/_utils.py,sha256=FiCFGOFa4czruhlSF87Q5Q4jX9KKPHZiw8k14K7W5v4,6636
|
|
23
|
-
uipath/core/tracing/decorators.py,sha256=
|
|
23
|
+
uipath/core/tracing/decorators.py,sha256=nE57gAb5Ul6c3ep2Nkkqr40SO_eiCoJL8_4VQ0AiHjY,11643
|
|
24
24
|
uipath/core/tracing/exporters.py,sha256=FClouEEQfk3F8J7G_NFoarDJM3R0-gA5jUxA5xRHx5s,1562
|
|
25
25
|
uipath/core/tracing/processors.py,sha256=R_652rtjPmfpUtaXoIcmfZrRZylVXFRNwjOmJUUxOQw,1408
|
|
26
26
|
uipath/core/tracing/span_utils.py,sha256=WYBrd6ZbawAs7r1Js-Zvo9_8GzkD9LhHNOls00bK_xI,12235
|
|
27
27
|
uipath/core/tracing/trace_manager.py,sha256=51rscJcepkTK4bWoCZdE-DFc9wt2F-aSuFBaSXmkHl0,3130
|
|
28
|
-
uipath_core-0.1.
|
|
29
|
-
uipath_core-0.1.
|
|
30
|
-
uipath_core-0.1.
|
|
31
|
-
uipath_core-0.1.
|
|
28
|
+
uipath_core-0.1.7.dist-info/METADATA,sha256=vpXcfigfRmjzvhsyAm8fFs8dEu7BAJ6yAmv_ltKxhzY,938
|
|
29
|
+
uipath_core-0.1.7.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
30
|
+
uipath_core-0.1.7.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
|
|
31
|
+
uipath_core-0.1.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|