Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

h_pyramid_sentry-1.0.20191017.140436.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file h_pyramid_sentry-1.0.20191017.140436.tar.gz.

File metadata

  • Download URL: h_pyramid_sentry-1.0.20191017.140436.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for h_pyramid_sentry-1.0.20191017.140436.tar.gz
Algorithm Hash digest
SHA256 c75ed9ecf0f0389bbcb050e3de4f002ef087c1a82f48f4add498de03ddf2b827
MD5 c1597a5209f6e762171bd4bfdbdfed50
BLAKE2b-256 5facefde888b86f337b9aee8d41299342c8709e06dd11286e20030ea2379b2c5

See more details on using hashes here.

File details

Details for the file h_pyramid_sentry-1.0.20191017.140436-py3-none-any.whl.

File metadata

  • Download URL: h_pyramid_sentry-1.0.20191017.140436-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for h_pyramid_sentry-1.0.20191017.140436-py3-none-any.whl
Algorithm Hash digest
SHA256 d9b78d706649314f6b445ac8c824dc360f1d0db21c4821414aab90d37af30452
MD5 02e1ccae60df491cdafad6d33054c2c1
BLAKE2b-256 bd00e6b3c7de7cdc1513d2f9fa5560e199d196c003aaf649b357c9b3ab18a2d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page