Ratchet.io notifier plugin for Pyramid
pyramid_ratchet is a simple middleware for reporting errors from Pyramid apps to Ratchet.io.
If pyramid_debugtoolbar is available, it will be monkey-patched so that exception pages show a link to the relevant item in Ratchet.io.
- Python 2.6 or 2.7
- Pyramid 1.2+
- requests 0.12+
- a Ratchet.io error reporting account
Install using pip:
pip install pyramid_ratchet
Add pyramid_ratchet to the end of your pyramid.includes:
[app:main] pyramid.includes = pyramid_debugtoolbar pyramid_ratchet
Add the bare minimum configuration variables:
[app:main] ratchet.access_token = 32charactertoken
Most users will want a few extra settings to take advantage of more features:
[app:main] ratchet.access_token = 32charactertoken ratchet.environment = production ratchet.branch = master ratchet.root = %(here)s
Here’s the full list of configuration variables:
- Access token from your Ratchet.io project
- blocking – runs in main thread
- thread – spawns a new thread
- agent – writes messages to a log file for consumption by ratchet-agent
- Environment name. Any string up to 255 chars is OK. For best results, use “production” for your production environment.
- Absolute path to the root of your application, not including the final /. %(here)s is probably what you want.
Name of the checked-out branch.
- If handler is agent, the path to the log file. Filename must end in .ratchet
When true, adds a hook to send a test error report (but not interrupt the request in any other way) whenever the query string contains pyramid_ratchet_test=true.
URL items are posted to.
Base URL of the Ratchet.io web interface (used for links on the exception debug page)
If true, pyramid_debugtoolbar will be monkeypatched so that exception debug pages include a link to the item in Ratchet.io
Contributions are welcome. The project is hosted on github at http://github.com/ratchetio/pyramid_ratchet
If you have any questions, feedback, etc., drop me a line at firstname.lastname@example.org