@@ -290,7 +290,7 @@ def handler(event, context):
290290 )
291291
292292 @functools .wraps (lambda_handler )
293- def decorate (event , context ):
293+ def decorate (event , context , ** kwargs ):
294294 with self .provider .in_subsegment (name = f"## { lambda_handler_name } " ) as subsegment :
295295 global is_cold_start
296296 if is_cold_start :
@@ -300,7 +300,7 @@ def decorate(event, context):
300300
301301 try :
302302 logger .debug ("Calling lambda handler" )
303- response = lambda_handler (event , context )
303+ response = lambda_handler (event , context , ** kwargs )
304304 logger .debug ("Received lambda handler response successfully" )
305305 self ._add_response_as_metadata (
306306 method_name = lambda_handler_name ,
@@ -487,6 +487,7 @@ async def async_tasks():
487487 env = os .getenv (constants .TRACER_CAPTURE_ERROR_ENV , "true" ), choice = capture_error
488488 )
489489
490+ # Maintenance: Need a factory/builder here to simplify this now
490491 if inspect .iscoroutinefunction (method ):
491492 return self ._decorate_async_function (
492493 method = method , capture_response = capture_response , capture_error = capture_error , method_name = method_name
0 commit comments