GithubHelp home page GithubHelp logo

zappa-sentry's Introduction

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

zappa-sentry's People

Contributors

jneves avatar giovannibelzoni avatar

Stargazers

 avatar Justin Crafford avatar LEE Jaeyoung avatar Tisham Dhar avatar  avatar Steve Gilroy avatar Shujon Mollah avatar Nikola Jankovic avatar monkut avatar Andrew Kurin avatar Benoit Brayer avatar  avatar  avatar einSelbst avatar Chris Gough avatar Matt Jackson avatar Romary Dupuis avatar Rich Jones avatar Jacques Kvam avatar  avatar Ben Fitzhardinge avatar Edgar Roman avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

ikonitas kingtut

zappa-sentry's Issues

compared to netflix raven library

Hey it's great to see stuff like this that make it easier to use serverless with other services. Wondering if you have tried this project from netflix? I like that this one specifically calls out zappa :)

Exception handler shou;dn

Or maybe we should have 2 handlers, where one explicitly eats the exceptions and the default one doesn't, so retries work and tracing is correctly informed of failures..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.