Sentry weppy extension

weppy-Sentry provides the integration for the Sentry error reporting platform in weppy.

Installation

You can install weppy-Sentry using pip:

pip install weppy-Sentry

And add it to your weppy application:

fromweppy_sentryimportSentryapp.use_extension(Sentry)

Configuration

weppy-Sentry has 2 configuration options:

parameter

default value

description

dsn

''

the Sentry DSN for your application

auto_load

True

automatically send exceptions to Sentry

The dsn parameter is required or the extension won't do anything, and you should declare it before loading the exension:

app.config.Sentry.dsn='mysecretdsn'app.use_extension(Sentry)

You can obviously configure the extension using a YAML file:

dsn:mysecretdsn

and load it before using the extension:

app.config_from_yaml('sentry.yml','Sentry')app.use_extension(Sentry)

When the auto_load parameter is set to True, the extension will add a pipe into your application pipeline, that will log any uncaught exception in your application code and your templates.

If you want to manually set the pipe into your application pipeline, you should set the auto_load parameter to False, init the extension and then add the pipe to your application's ones. Mind that, using this configuration, Sentry won't be able to track errors in your templates: