dj-cloud-error: Django Google Cloud Error Reporting
Report exceptions from any Django site to Google Cloud Stackdriver Error Reporting
Free software: MIT license
Features
Report exceptions from any Django site to Google Cloud Stackdriver Error Reporting
Optional dependency on django-ipware for logging of IP addresses
Quickstart
Configure your app to user Google Cloud project:
Enabled the Error Reporting api as per https://cloud.google.com/error-reporting/docs/setup/python
Set up the required Google IAM credentials - eg set the environment variable GOOGLE_APPLICATION_CREDENTIALS as the path to a service account JSON file, for an account that has the “Errors Writer” permission.
Install the package:
pip install dj_cloud_error
Enable the provided exception handler by setting handler500 in your Django project’s root urls.py:
# in myproject/urls.py import dj_cloud_error handler500 = dj_cloud_error.handler500
Note: handler500 is only used if DEBUG = False in django settings.
Settings
To disable error reporting (eg in your CI/CD environment), add this to your django settings:
# in myproject/settings/test.py CLOUD_ERROR_REPORTING_DISABLED = True
To configure the name under which the errors appear in add this to your django settings:
CLOUD_ERROR_REPORTING_SERVICE_NAME = "myservice" # defaults to "python"
Optional Extras
If django-ipware is installed it’s used to log the client IP address, it can be installed as follows:
pip install dj_cloud_error[ip]
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2019-10-01)
First release on PyPI.
Metadata
Release files for dj-cloud-error 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dj-cloud-error-0.1.0.tar.gz | 11.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dj_cloud_error-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.8 kB
Release files / dj-cloud-error-0.1.0.tar.gz
| Download URL | dj-cloud-error-0.1.0.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5da0e4f39330dd003d85e85137850f5aff28c477ca16170f3cc4f3995d70ff6a
|
|
BLAKE2b-256 checksum How to use checksums |
cd44e52edd5a23afe056a582740d60c3b0d773c7f900e4f1fb518f7e67bed6cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
|
Release files / dj_cloud_error-0.1.0-py3-none-any.whl
| Download URL | dj_cloud_error-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e8db38c9f6868f56527a6578581e55cb1f79dab33e39ccbb5663bbe7cdccacb0
|
|
BLAKE2b-256 checksum How to use checksums |
04ce5e89e97cd7f3392f824a87d61c5346840e332f03cdd79ae0afb3d96afeed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
|