Application error tracking SDK for the Watchdock platform
Project description
watchdock-errors
Python SDK for application-level error tracking on the Watchdock platform.
Installation
pip install watchdock-errors
With framework extras:
pip install "watchdock-errors[django]"
pip install "watchdock-errors[fastapi]"
Quickstart
import watchdock_errors
watchdock_errors.init(
api_key="wdk_xxx",
environment="production",
release="1.0.0",
)
Django
# settings.py
MIDDLEWARE = [
...
"watchdock_errors.integrations.django.DjangoErrorMiddleware",
]
Or via INSTALLED_APPS for automatic registration:
INSTALLED_APPS = [
...
"watchdock_errors.integrations.django",
]
FastAPI
from watchdock_errors.integrations.fastapi import setup_watchdock
setup_watchdock(app)
Manual capture
# Capture the current exception
try:
process_payment()
except Exception:
watchdock_errors.capture_exception()
# Capture a specific exception
watchdock_errors.capture_exception(exc)
# Capture a message
watchdock_errors.capture_message("Stripe webhook signature invalid")
PII scrubbing
By default, Authorization, Cookie, and X-Api-Key headers are stripped and the request body is not sent. Set send_pii=True to disable scrubbing.
Use the before_send hook for custom scrubbing:
def scrub(event):
event["request"]["headers"].pop("X-Internal-Token", None)
return event # return None to drop the event entirely
watchdock_errors.init(api_key="wdk_xxx", before_send=scrub)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file watchdock_errors-0.1.2.tar.gz.
File metadata
- Download URL: watchdock_errors-0.1.2.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c2f10abe0fe518125e97b31768437096a8417dbb78dc6a944be7ce7143a4f50
|
|
| MD5 |
5e996a917650225fa8abd6ca1d28c70f
|
|
| BLAKE2b-256 |
21422d57996521f3c09ebb1639ca2694991c66778f97d1ad753e0cd8b4e65344
|
File details
Details for the file watchdock_errors-0.1.2-py3-none-any.whl.
File metadata
- Download URL: watchdock_errors-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69290a5f7c4683015f0babc425721ccd0b7277276f97965d5da3b8e0dc4b3588
|
|
| MD5 |
0733c915b29d10a351d34097e333de4b
|
|
| BLAKE2b-256 |
c1c86b87611b438e06ad3609e3a15c35c566ba703c9cd3433d7a80d5c16a8065
|