This library integrates your applications with Errplane, a cloud-based tool for handling exceptions, custom metrics, uptime monitoring, and alerting.
Running into any issues? Get in touch with us at email@example.com.
You can install the library using pip:
pip install errplane
Then, import it into your app:
from errplane import Errplane
And instantiate it with your API Key and the target Application ID:
errplane = Errplane("YOUR_API_KEY", "APPLICATION_ID")
The environment will automatically default to development, but you can easily override it at initialization:
errplane = Errplane("YOUR_API_KEY", "APPLICATION_ID", environment="production")
Sending Custom Metrics
You can easily send a custom metric (with a default value of 1):
Or, you can provide a different value and optionally, additional context:
errplane.report("file_uploaded", value=file.bytes, context=file.name)
You can also start a heartbeat, which could be useful for monitoring background workers. This will start a thread which reports to the "background_worker" time series every 30 seconds:
We love contributions. Want to add support for something you don't already see here? Fork this repository and send us a pull request.
Copyright (c) 2012 Errplane, Inc.