Sentry extension for Emmett framework
Project description
Emmett-Sentry
Emmett-Sentry is an Emmett framework extension integrating Sentry monitoring platform.
Installation
You can install Emmett-Sentry using pip:
pip install emmett-sentry
And add it to your Emmett application:
from emmett_sentry import Sentry
sentry = app.use_extension(Sentry)
Configuration
Here is the complete list of parameters of the extension configuration:
param | default | description |
---|---|---|
dsn | Sentry project's DSN | |
environment | development | Application environment |
release | Application release | |
auto_load | True |
Automatically inject extension on routes |
enable_tracing | False |
Enable tracing on routes |
sample_rate | 1 | Error sampling rate |
traces_sample_rate | Traces sampling rate | |
trace_websockets | False |
Enable tracing on websocket routes |
tracing_exclude_routes | List of specific routes to exclude from tracing |
Usage
The extension exposes two methods to manually track events:
- exception
- message
You call these methods directly within your code:
# track an error
try:
1 / 0
except Exception:
sentry.exception()
# track a message
sentry.message("some event", level="info")
License
Emmett-Sentry is released under BSD license.
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
emmett_sentry-0.4.0.tar.gz
(5.4 kB
view hashes)
Built Distribution
Close
Hashes for emmett_sentry-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97bfc5d7f9d8ce62ca5404ed8d48b0f99809d7d689d617ae10029fb950e24738 |
|
MD5 | 6ac7899503d0c0947f258066d20c2cc9 |
|
BLAKE2b-256 | 83973468e707e62e5917ce859cb349c92d8f8f249f1322ef63f93833eb3a5546 |