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 support@errplane.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")
You can easily send a custom metric (with a default value of 1):
errplane.report("metric_name")
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:
errplane.heartbeat("background_worker", 30)
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.