Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emmett-framework/sentry
Sentry extension for Emmett framework
https://github.com/emmett-framework/sentry
emmett monitoring python sentry
Last synced: about 1 month ago
JSON representation
Sentry extension for Emmett framework
- Host: GitHub
- URL: https://github.com/emmett-framework/sentry
- Owner: emmett-framework
- License: bsd-3-clause
- Created: 2020-09-01T15:48:29.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-13T21:35:40.000Z (2 months ago)
- Last Synced: 2024-10-13T21:53:33.955Z (2 months ago)
- Topics: emmett, monitoring, python, sentry
- Language: Python
- Homepage:
- Size: 40 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Emmett-Sentry
Emmett-Sentry is an [Emmett framework](https://emmett.sh) extension integrating [Sentry](https://sentry.io) monitoring platform.
Emmett-Sentry is compatible both with Emmett and Emmett55.
## Installation
You can install Emmett-Sentry using pip:
pip install emmett-sentry
And add it to your Emmett application:
```python
from emmett_sentry import Sentrysentry = 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 |
| sample\_rate | 1 | Error sampling rate |
| integrations | | List of integrations to pass to the SDK |
| enable\_tracing | `False` | Enable tracing on routes |
| tracing\_sample\_rate | | Traces sampling rate |
| tracing\_exclude\_routes | | List of specific routes to exclude from tracing |
| trace\_websockets | `False` | Enable tracing on websocket routes |
| trace\_orm | `True` | Enable tracing on ORM queries |
| trace\_templates | `True` | Enable tracing on templates rendering |
| trace\_sessions | `True` | Enable tracing on sessions load/store |
| trace\_cache | `True` | Enable tracing on cache get/set |
| trace\_pipes | `False` | Enable tracing on pipes |
| sdk\_opts | `{}` | Additional configuration for the Sentry SDK |## Usage
The extension exposes two methods to manually track events:
- exception
- messageYou call these methods directly within your code:
```python
# 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.