Forward exceptions raised by a setuptools entrypoint to sentry
Project description
DESCRIPTION
sentry-wrapper calls a setuptools entrypoint and sends exceptions to sentry. It is useful to log the exceptions of a correctly packaged but not sentry-capable program.
Usage:
usage: sentry-wrapper [options] [-- entrypoint options] positional arguments: name Entry point name (eg. my-entrypoint) dist Distribution name (eg. my-project==1.2.4, default: same value than name) group Entry point group (default: console_scripts) optional arguments: -h, --help show this help message and exit --dsn SENTRY_DSN Sentry DSN -t timeout, --timeout timeout Timeout. After this value, TimeoutError is raised to Sentry.
For example, if the setup.py file of the package mypackage contains:
... name='my-package', entry_points={ 'console_scripts': [ 'my-entrypoint = mypackage:main', ], }, ...
Call my-entrypoint with:
sentry-wrapper --dsn SENTRY_DSN my-entrypoint my-package console_scripts
INSTALLATION
To install in a virtualenv:
$> virtualenv myenv $> source myenv/bin/activate $> pip install sentry-wrapper $> pip install path/to/your/project $> sentry-wrapper -h
DEVELOP
To start hacking on sentry-wrapper using Docker:
$> make
Then:
Visit http://localhost:9000 with the credentials test/test
Create a project and copy the DSN
Test sentry-wrapper against the test project of this repository:
sentry-wrapper --dsn [...] whatever_ok whatever console_scripts sentry-wrapper --dsn [...] whatever_exception whatever console_scripts
CONTRIBUTORS
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
Built Distribution
File details
Details for the file sentry_wrapper-3.0.0.tar.gz
.
File metadata
- Download URL: sentry_wrapper-3.0.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.5 Darwin/24.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fcc5cb59af96245feccff2f3f68199988d2721de28df7997d69b3ad9212fa42 |
|
MD5 | 8b3619adf570fd6d7de416048a1f3b80 |
|
BLAKE2b-256 | d04c130a5d533d867b904c12fd66add8a8981546891ab920d7264720363e955b |
File details
Details for the file sentry_wrapper-3.0.0-py3-none-any.whl
.
File metadata
- Download URL: sentry_wrapper-3.0.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.5 Darwin/24.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecd7c7d4e2c2feae01e4eb459a0093b84d2b158de12934db52f3bc2add8e0b34 |
|
MD5 | 11abc31faba028b4d515a4a1b980ca94 |
|
BLAKE2b-256 | 52f0c920553d2b3e965802c121273cfc4c84b86ccd902408af1a075032471ab0 |