Skip to main content

zappa-sentry

Sentry handler configuration with defaults for zappa lambdas.

Installation

pip install zappa_sentry

Zappa configuration

Setup your sentry DSN as the value of environment variable SENTRY_DSN, either on the zappa_setting.json file or in any of the other methods on https://github.com/miserlou/zappa/#setting-environment-variables

Then you can setup the zappa_sentry.unhandled_exceptions handler.

Example:

{
    "dev": {
        ...
        "environment_variables": {
            "SENTRY_DSN": "https://*key*:*pass*@sentry.io/*project*",
            ...
        },
        "exception_handler": "zappa_sentry.unhandled_exceptions",
        ...
    },
    ...
}

And that's all. Deploy your zappa function and you should see any errors appearing on sentry.

If you want the exception handler to capture the exception and capture it, just replace zappa_sentry.unhandled_exceptions by zappa_sentry.capture_exceptions. This version won't let the exceptions propagate.

Adding extra information

Just add it to the scope as normal for the new sentry-sdk: https://docs.sentry.io/enriching-error-data/context/?platform=python

Metadata

Release files for zappa-sentry 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zappa-sentry 0.4.1
File Size Uploaded
zappa_sentry-0.4.1.tar.gz 2.3 kB Details

Release files / zappa_sentry-0.4.1.tar.gz

Download URL zappa_sentry-0.4.1.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f41f954c903584aa729974bacfd033d293661268cd890ae044555dd0dd582e32
BLAKE2b-256 checksum
How to use checksums
5ec66f2b6395306a94691a0323f31738c5842aeed04d915f1896d8252de5cbab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.4.1 This release

1 release file

0.4.0

2 release files

0.3.1

1 release file

0.3.0

2 release files

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page