You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The library doesn’t have access to the context object currently. Are you asking for a method on the logger that would allow you to add the context? Or are you wanting a lambda_metric_scope that wraps your handler and adds the request id automatically for you?
I’m not sure how much auto-magic we want to add just to eliminate a single call to set_property.
I guess it could be a separate lambda_metric_scope decorator, though it seems like in metric_scope if the environment says it's type AWS::Lambda::Function then you'd know to find the context in the arguments.
The
aws_request_id
field from the context object should get added to the default set of properties. https://docs.aws.amazon.com/lambda/latest/dg/python-context.htmlThe text was updated successfully, but these errors were encountered: