https://github.com/richardarpanet/falcon-sentry
Sentry support for Falcon web framework.
https://github.com/richardarpanet/falcon-sentry
falcon library monitoring package python3 sentry
Last synced: about 2 months ago
JSON representation
Sentry support for Falcon web framework.
- Host: GitHub
- URL: https://github.com/richardarpanet/falcon-sentry
- Owner: richardARPANET
- License: apache-2.0
- Created: 2018-12-05T08:12:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-06T09:20:28.000Z (over 7 years ago)
- Last Synced: 2025-01-19T05:48:16.390Z (over 1 year ago)
- Topics: falcon, library, monitoring, package, python3, sentry
- Language: Python
- Homepage: https://pypi.org/project/falcon-sentry/
- Size: 18.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- License: LICENSE
Awesome Lists containing this project
README
falcon-sentry
--------------
Installation
------------
.. code:: bash
pip install falcon-sentry
How to use
------------
When creating your Falcon application/API instance.
Wrap it with falcon-sentry and pass in your Sentry DSN.
.. code:: python
application = falcon.API()
application.add_route('/items', MyResource())
dsn = 'https://00000000000000000000000000000000@sentry.io/0000000'
application = falcon_sentry(dsn=dsn, app=application)
return application
You can also use an environment variable to specify the DSN.
.. code:: python
os.environ['SENTRY_DSN'] = 'https://00000000000000000000000000000000@sentry.io/0000000'
application = falcon_sentry(app=application)
return application
You can specify the Sentry environment
.. code:: python
application = falcon_sentry(dsn=dsn, app=application, environment='prod')
return application
If both the ``dsn`` parameter and the environment variable are missing then falcon-sentry will do nothing and return the application instance.