@@ -55,12 +55,12 @@ def new_remote(f=None, *args, **kwargs):
55
55
def wrapper (user_f ):
56
56
# type: (Callable[..., Any]) -> Any
57
57
@functools .wraps (user_f )
58
- def new_func (* f_args , _tracing = None , ** f_kwargs ):
58
+ def new_func (* f_args , _sentry_tracing = None , ** f_kwargs ):
59
59
# type: (Any, Optional[dict[str, Any]], Any) -> Any
60
60
_check_sentry_initialized ()
61
61
62
62
transaction = sentry_sdk .continue_trace (
63
- _tracing or {},
63
+ _sentry_tracing or {},
64
64
op = OP .QUEUE_TASK_RAY ,
65
65
name = qualname_from_function (user_f ),
66
66
origin = RayIntegration .origin ,
@@ -79,18 +79,18 @@ def new_func(*f_args, _tracing=None, **f_kwargs):
79
79
80
80
return result
81
81
82
- # Patching new_func signature to add the _tracing parameter to it
82
+ # Patching new_func signature to add the _sentry_tracing parameter to it
83
83
# Ray later inspects the signature and finds the unexpected parameter otherwise
84
84
signature = inspect .signature (new_func )
85
85
params = list (signature .parameters .values ())
86
86
params .append (
87
87
inspect .Parameter (
88
- "_tracing " ,
88
+ "_sentry_tracing " ,
89
89
kind = inspect .Parameter .KEYWORD_ONLY ,
90
90
default = None ,
91
91
)
92
92
)
93
- new_func .__signature__ = signature .replace (parameters = params )
93
+ new_func .__signature__ = signature .replace (parameters = params ) # type: ignore[attr-defined]
94
94
95
95
if f :
96
96
rv = old_remote (new_func )
@@ -113,7 +113,9 @@ def _remote_method_with_header_propagation(*args, **kwargs):
113
113
for k , v in sentry_sdk .get_current_scope ().iter_trace_propagation_headers ()
114
114
}
115
115
try :
116
- result = old_remote_method (* args , ** kwargs , _tracing = tracing )
116
+ result = old_remote_method (
117
+ * args , ** kwargs , _sentry_tracing = tracing
118
+ )
117
119
span .set_status (SPANSTATUS .OK )
118
120
except Exception :
119
121
span .set_status (SPANSTATUS .INTERNAL_ERROR )
0 commit comments