Sentry integration to sanic web server
Project description
Sanic-Sentry
============
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:
.. code:: python
>>> 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__:
.. code:: python
>>> plugin = SanicSentry(app)
Or use `init_app` to reverse dependency:
.. code:: python
>>> plugin = SanicSentry()
>>> plugin.init_app(app)
*Optional parameters:*
**SENTRY_RELEASE** - Configure a custom release for sentry
Explained in https://docs.sentry.io/learn/releases/
.. code:: python
>>> app.config['SENTRY_RELEASE'] = 'myapp_v0.4'
============
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:
.. code:: python
>>> 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__:
.. code:: python
>>> plugin = SanicSentry(app)
Or use `init_app` to reverse dependency:
.. code:: python
>>> plugin = SanicSentry()
>>> plugin.init_app(app)
*Optional parameters:*
**SENTRY_RELEASE** - Configure a custom release for sentry
Explained in https://docs.sentry.io/learn/releases/
.. code:: python
>>> app.config['SENTRY_RELEASE'] = 'myapp_v0.4'
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.3.tar.gz
(2.9 kB
view details)
File details
Details for the file sanic-sentry-0.1.3.tar.gz
.
File metadata
- Download URL: sanic-sentry-0.1.3.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6ca5f1f7a3afa584094322a4a79503fd331ff9aaf6b6dff4703048336913fcd |
|
MD5 | d737b6ff697930ad5e566cba56828012 |
|
BLAKE2b-256 | 31a35e4619652416c603004c067e576842527fcc56c6c893f479f56a4fce6acf |