Skip to main content

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
============

* `Bastien Chatelard <https://github.com/bchatelard/>`_
* `Julien Castets <https://github.com/brmzkw/>`_

sentry-wrapper Changelog
========================

2.1.0 (2018-05-23)
------------------

* Add flag `-t` or `--timeout`. After the specified amount of time,
sentry-wrapper exits and raises an error to Sentry.
This is implemented by raising SIGALARM. If the wrapped application catches
the signal, timeout won't work.

2.0.0 (2015-08-20)
------------------

* Accept extra arguments that are given to the wrapped command, like::

sentry-wrapper entrypoint -- arg1 arg2 arg3

1.0.0 (2015-04-20)
------------------

* Initial version.

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

sentry-wrapper-2.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distributions

sentry_wrapper-2.1.0-py2.7.egg (5.3 kB view details)

Uploaded Source

sentry_wrapper-2.1.0-py2-none-any.whl (5.9 kB view details)

Uploaded Python 2

File details

Details for the file sentry-wrapper-2.1.0.tar.gz.

File metadata

File hashes

Hashes for sentry-wrapper-2.1.0.tar.gz
Algorithm Hash digest
SHA256 3b486dc68d37cdfc0f72d8d1029ee0625f6e0c24cf7af9b5dc934bd6002c2538
MD5 8fd64174133c0adbbae52866b1d7a14a
BLAKE2b-256 8a6ca77e601eb51c812b405679616c778574cd9f9bb4d4f9b5bf5285ee0f466b

See more details on using hashes here.

File details

Details for the file sentry_wrapper-2.1.0-py2.7.egg.

File metadata

File hashes

Hashes for sentry_wrapper-2.1.0-py2.7.egg
Algorithm Hash digest
SHA256 d9f0396a45f30676090a119b8867e0eac6f0bcf87d6188131907eaa67d2d5963
MD5 292623094b6b302697adcd846e11e81c
BLAKE2b-256 54ab6520eb8de66e124700693ec44c3281112ab1313dbce177649e69cd46ce08

See more details on using hashes here.

File details

Details for the file sentry_wrapper-2.1.0-py2-none-any.whl.

File metadata

File hashes

Hashes for sentry_wrapper-2.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 46d0b590c3a627e81f81549a02b5c84c404f7b9ee98dff0fbaf19df37b1c0b50
MD5 1a0e24758ee566dae2172b3f7ca09654
BLAKE2b-256 05596e42c1e171ddb2b918fbd4ca1c0c2ae5ca9b45e7db54cff17e275d134a18

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page