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
SENTRY_DSN - Sentry DSN for your application
To begin we’ll set up a Sanic app:
>>> from sanic import Sanic
>>> from sanic_sentry import SanicSentry
>>> app = Sanic(__name__)
>>> app.config['SENTRY_DSN'] = 'http://public:secret@example.com/1'
To initialize plugin you can pass ‘app’ to __init__:
>>> plugin = SanicSentry(app)
Or use init_app to reverse dependency:
>>> plugin = SanicSentry()
>>> plugin.init_app(app)
Optional parameters:
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.5.tar.gz
(3.0 kB
view details)
File details
Details for the file sanic-sentry-0.1.5.tar.gz
.
File metadata
- Download URL: sanic-sentry-0.1.5.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23b2a6c5d6ff38d89d5f5c3d3922d18b978e6a56e6bca2ebb47b0cc78bf98d5f |
|
MD5 | 4558fe3e4161fd0a1ac22eac53a1ab39 |
|
BLAKE2b-256 | cb820a1c031e240a4d0550a52aacd869305436e12a1abec10e6c989dbabc19d4 |