Skip to main content

Sentry integration to sanic web server

Project description

Sanic-Sentry – Sentry integration to sanic web server.

Requirements

  • python >= 3.5

Installation

Sanic-Sentry should be installed using pip:

pip install sanic-sentry

Usage

To initialize plugin you can pass ‘app’ to __init__:

>>> from sanic import Sanic
>>> from sanic_sentry import SanicSentry
>>> app = Sanic(__name__)
>>> plugin = SanicSentry(app)

Or use init_app to reverse dependency:

>>> plugin = SanicSentry()
>>> plugin.init_app(app)

Optional parameters:

SENTRY_DSN - Sentry DSN for your application:

If not set raven will fallback to SENTRY_DSN environment variable. Not setting either will disable raven.

>>> app.config['SENTRY_DSN'] = 'http://public:secret@example.com/1'

SENTRY_PARAMS - Configure advanced parameters for sentry:

Explained in https://docs.sentry.io/clients/python/advanced/

>>> app.config['SENTRY_PARAMS'] = {
...     "release": "myapp_v0.4",
...     "environment": "production",
... }

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

sanic-sentry-0.1.6.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file sanic-sentry-0.1.6.tar.gz.

File metadata

File hashes

Hashes for sanic-sentry-0.1.6.tar.gz
Algorithm Hash digest
SHA256 8127cb2bb70c4033d9089518dad4a594d0d216b02ccf8ceef07d1d781e05038e
MD5 f845034fbdbdf726b4803379e049abb4
BLAKE2b-256 8dd4b2f0dce6d6e5c1b46d15c64a5da602061cd7a12ea3e96889fba395c6349b

See more details on using hashes here.

Supported by

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