From b0510d8d6e9e6300a25298179b09c65647086113 Mon Sep 17 00:00:00 2001 From: Matin Tamizi Date: Wed, 5 Aug 2020 18:02:57 -0500 Subject: [PATCH] include AwsLambdaIntegration (#8) * include AwsLambdaIntegration * with comments * fix-lint Co-authored-by: Glen --- sentry_chalice/sentry_chalice.py | 4 ++++ sentry_chalice/version.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sentry_chalice/sentry_chalice.py b/sentry_chalice/sentry_chalice.py index 13c6fed..0f721eb 100644 --- a/sentry_chalice/sentry_chalice.py +++ b/sentry_chalice/sentry_chalice.py @@ -8,6 +8,7 @@ from sentry_sdk.hub import Hub, _should_send_default_pii from sentry_sdk.integrations import Integration from sentry_sdk.integrations._wsgi_common import _filter_headers +from sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration from sentry_sdk.utils import ( AnnotatedValue, capture_internal_exceptions, @@ -79,7 +80,10 @@ class ChaliceIntegration(Integration): @staticmethod def setup_once(): + # for @app.route() Chalice._get_view_function_response = _get_view_function_response + # for everything else (like events) + AwsLambdaIntegration.setup_once() def _make_request_event_processor(current_request, lambda_context): diff --git a/sentry_chalice/version.py b/sentry_chalice/version.py index df9144c..7fd229a 100644 --- a/sentry_chalice/version.py +++ b/sentry_chalice/version.py @@ -1 +1 @@ -__version__ = '0.1.1' +__version__ = '0.2.0'