@@ -290,7 +290,7 @@ def handler(event, context):
290
290
)
291
291
292
292
@functools .wraps (lambda_handler )
293
- def decorate (event , context ):
293
+ def decorate (event , context , ** kwargs ):
294
294
with self .provider .in_subsegment (name = f"## { lambda_handler_name } " ) as subsegment :
295
295
global is_cold_start
296
296
if is_cold_start :
@@ -300,7 +300,7 @@ def decorate(event, context):
300
300
301
301
try :
302
302
logger .debug ("Calling lambda handler" )
303
- response = lambda_handler (event , context )
303
+ response = lambda_handler (event , context , ** kwargs )
304
304
logger .debug ("Received lambda handler response successfully" )
305
305
self ._add_response_as_metadata (
306
306
method_name = lambda_handler_name ,
@@ -487,6 +487,7 @@ async def async_tasks():
487
487
env = os .getenv (constants .TRACER_CAPTURE_ERROR_ENV , "true" ), choice = capture_error
488
488
)
489
489
490
+ # Maintenance: Need a factory/builder here to simplify this now
490
491
if inspect .iscoroutinefunction (method ):
491
492
return self ._decorate_async_function (
492
493
method = method , capture_response = capture_response , capture_error = capture_error , method_name = method_name
0 commit comments