Metadata-Version: 2.1
Name: sentry-wrapper
Version: 2.4.0
Summary: Forward exceptions raised by a setuptools entrypoint to sentry
Home-page: http://scaleway.com/
Author: Julien Castets
Author-email: castets.j@gmail.com
License: WTFPL
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: POSIX
Classifier: Operating System :: MacOS
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Internet
Classifier: Topic :: System :: Distributed Computing
Requires-Dist: sentry-sdk

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.4.0 (2019-07-05)
------------------

* Replace raven (deprecated) by sentry-sdk

2.3.0 (2018-11-16)
------------------

I messed up release 2.2.0 and pushed a package on pypi with the wrong version.
2.3.0 is the correct version to use.


2.2.0 (never released)
----------------------

* Add a script which send message to sentry::

        sentry-msg --dsn https://... "my message to send"


2.1.1 (unreleased)
------------------

* Under very active development.

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.


