@@ -140,6 +140,7 @@ async def raise_from_exception_queue() -> NoReturn:
140140 headers = dict (task .request .header ),
141141 task_cancellation = task_cancellation ,
142142 request_deadline = request_deadline ,
143+ endpoint = nexus_task .endpoint ,
143144 )
144145 )
145146 self ._running_tasks [task .task_token ] = _RunningNexusTask (
@@ -154,6 +155,7 @@ async def raise_from_exception_queue() -> NoReturn:
154155 headers = dict (task .request .header ),
155156 task_cancellation = task_cancellation ,
156157 request_deadline = request_deadline ,
158+ endpoint = nexus_task .endpoint ,
157159 )
158160 )
159161 self ._running_tasks [task .task_token ] = _RunningNexusTask (
@@ -224,6 +226,7 @@ async def _handle_cancel_operation_task(
224226 headers : Mapping [str , str ],
225227 task_cancellation : nexusrpc .handler .OperationTaskCancellation ,
226228 request_deadline : datetime | None ,
229+ endpoint : str ,
227230 ) -> None :
228231 """Handle a cancel operation task.
229232
@@ -244,7 +247,11 @@ async def _handle_cancel_operation_task(
244247 request_deadline = request_deadline ,
245248 )
246249 temporalio .nexus ._operation_context ._TemporalCancelOperationContext (
247- info = lambda : Info (namespace = self ._namespace , task_queue = self ._task_queue ),
250+ info = lambda : Info (
251+ endpoint = endpoint ,
252+ namespace = self ._namespace ,
253+ task_queue = self ._task_queue ,
254+ ),
248255 nexus_context = ctx ,
249256 client = self ._client ,
250257 _runtime_metric_meter = self ._metric_meter ,
@@ -293,6 +300,7 @@ async def _handle_start_operation_task(
293300 headers : Mapping [str , str ],
294301 task_cancellation : nexusrpc .handler .OperationTaskCancellation ,
295302 request_deadline : datetime | None ,
303+ endpoint : str ,
296304 ) -> None :
297305 """Handle a start operation task.
298306
@@ -302,7 +310,11 @@ async def _handle_start_operation_task(
302310 try :
303311 try :
304312 start_response = await self ._start_operation (
305- start_request , headers , task_cancellation , request_deadline
313+ start_request ,
314+ headers ,
315+ task_cancellation ,
316+ request_deadline ,
317+ endpoint ,
306318 )
307319 except asyncio .CancelledError :
308320 completion = temporalio .bridge .proto .nexus .NexusTaskCompletion (
@@ -346,6 +358,7 @@ async def _start_operation(
346358 headers : Mapping [str , str ],
347359 cancellation : nexusrpc .handler .OperationTaskCancellation ,
348360 request_deadline : datetime | None ,
361+ endpoint : str ,
349362 ) -> temporalio .api .nexus .v1 .StartOperationResponse :
350363 """Invoke the Nexus handler's start_operation method and construct the StartOperationResponse.
351364
@@ -375,7 +388,11 @@ async def _start_operation(
375388 temporalio .nexus ._operation_context ._TemporalStartOperationContext (
376389 nexus_context = ctx ,
377390 client = self ._client ,
378- info = lambda : Info (namespace = self ._namespace , task_queue = self ._task_queue ),
391+ info = lambda : Info (
392+ endpoint = endpoint ,
393+ namespace = self ._namespace ,
394+ task_queue = self ._task_queue ,
395+ ),
379396 _runtime_metric_meter = self ._metric_meter ,
380397 _worker_shutdown_event = self ._worker_shutdown_event ,
381398 ).set ()
0 commit comments