@@ -55,12 +55,12 @@ def new_remote(f=None, *args, **kwargs):
5555 def wrapper (user_f ):
5656 # type: (Callable[..., Any]) -> Any
5757 @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 ):
5959 # type: (Any, Optional[dict[str, Any]], Any) -> Any
6060 _check_sentry_initialized ()
6161
6262 transaction = sentry_sdk .continue_trace (
63- _tracing or {},
63+ _sentry_tracing or {},
6464 op = OP .QUEUE_TASK_RAY ,
6565 name = qualname_from_function (user_f ),
6666 origin = RayIntegration .origin ,
@@ -79,18 +79,18 @@ def new_func(*f_args, _tracing=None, **f_kwargs):
7979
8080 return result
8181
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
8383 # Ray later inspects the signature and finds the unexpected parameter otherwise
8484 signature = inspect .signature (new_func )
8585 params = list (signature .parameters .values ())
8686 params .append (
8787 inspect .Parameter (
88- "_tracing " ,
88+ "_sentry_tracing " ,
8989 kind = inspect .Parameter .KEYWORD_ONLY ,
9090 default = None ,
9191 )
9292 )
93- new_func .__signature__ = signature .replace (parameters = params )
93+ new_func .__signature__ = signature .replace (parameters = params ) # type: ignore[attr-defined]
9494
9595 if f :
9696 rv = old_remote (new_func )
@@ -113,7 +113,9 @@ def _remote_method_with_header_propagation(*args, **kwargs):
113113 for k , v in sentry_sdk .get_current_scope ().iter_trace_propagation_headers ()
114114 }
115115 try :
116- result = old_remote_method (* args , ** kwargs , _tracing = tracing )
116+ result = old_remote_method (
117+ * args , ** kwargs , _sentry_tracing = tracing
118+ )
117119 span .set_status (SPANSTATUS .OK )
118120 except Exception :
119121 span .set_status (SPANSTATUS .INTERNAL_ERROR )
0 commit comments