A Pyramid plugin for integrating Sentry monitoring and error tracking
Project description
Hypothesis Pyramid Sentry Extension
A library which integrates Sentry logging into Pyramid with the ability to filter out unwanted messages.
What should I use this for?
At the moment the library is mostly being used as an experimental testing ground and therefore is not recommended for general use.
How it works
In your Pyramid configuration you need to provide a list of filter functions
in the parameter h_pyramid_sentry.filters
.
These functions are passed Event objects which
they can inspect. If the function returns True
, then the event is logged
locally, but not sent to Sentry
Usage
# Hook into Pyramid
config.add_settings({
# Any options supported by sentry_sdk.init
"h_pyramid_sentry.init.environment": "<my_sentry_env>",
"h_pyramid_sentry.filters": [
lambda event: instanceof(event.exception, ValueError)
],
"h_pyramid_sentry.retry_support": True
})
config.include("h_pyramid_sentry")
Sentry configuration
The Sentry integration will listen to the following Pyramid deployment settings:
Pyramid setting | Effect |
---|---|
h_pyramid_sentry.init |
A dict of any options understood by sentry_sdk.init() |
h_pyramid_sentry.filters |
A list of functions to apply as filters |
h_pyramid_sentry.retry_support |
Enable retry detection and filtering |
As per the Sentry docs, the
environment variable SENTRY_DSN
will be automatically read if set, although this can
also be passed along with any other Sentry SDK options via h_pyramid_sentry.init
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for h_pyramid_sentry-1.0.20191017.162724.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b708ada4243035dd4e4da752ddba83db774ffaa9ef3f042d77f6f738074086c9 |
|
MD5 | c0757bfbf1119d079e96da8ff841bc99 |
|
BLAKE2b-256 | 196e39830c6d3f2bec0613239d10321e4f3b082440df3c65ac81dc90a3703fa2 |
Hashes for h_pyramid_sentry-1.0.20191017.162724-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 524eda926dd7b1369c665bf814b21a2eb2f02a4d4bac1468b54076ab022c37f8 |
|
MD5 | 16dd4af0b1cd4cdc9b885d314086dc7e |
|
BLAKE2b-256 | ee283d6e3d3862b855aaad38706fc9c7c9f7d9d989d238e7342dfb42e075f3eb |