watchdog-sdk (Python)
Python SDK for Watchdog, the open-source, self-hosted error tracker. It reports unhandled exceptions, logged errors, performance traces and custom metrics to your own Watchdog server.
It has no dependencies, sends in a background thread so it never blocks your code, and works with asyncio, threads and multi-process workers.
pip install watchdog-sdk
# or
uv add watchdog-sdk
import watchdog_sdk as watchdog
watchdog.init(
dsn="https://<key>@your-watchdog-host/<project-id>",
release="1.0.0",
environment="production",
)
Call init once, as early as possible. If the DSN is missing or invalid, the SDK logs a warning and stays off. It never raises.
What is captured
- Unhandled exceptions, including in threads, with the failing line of code and the lines around it. Local variables are never sent.
- Errors you log with
logging(logger.error(...),logger.exception(...)), plus lower-level logs as breadcrumbs. - Exceptions you report yourself with
watchdog.capture_exception(error). - Asyncio errors that nobody awaited, after
watchdog.install_asyncio_handler().
Tracing and metrics
with watchdog.start_transaction("handle_call", op="job") as transaction:
transaction.set_tag("org", "acme")
with watchdog.span("db", "load agent config"):
...
@watchdog.trace(op="task")
async def transcribe(audio): ...
watchdog.increment("calls.completed")
watchdog.gauge("calls.active", 3)
watchdog.distribution("call.duration", 184.2, unit="s")
Transactions you do not sample cost almost nothing: the with blocks become no-ops.
Options
| Option | Default | Meaning |
|---|---|---|
release, environment |
none | Group and filter events |
sample_rate |
1.0 |
Share of errors to send |
traces_sample_rate |
1.0 |
Share of transactions to send. Use a lower value on busy workers |
max_events_per_minute |
60 |
Hard cap on errors sent per minute |
max_transactions_per_minute |
300 |
Hard cap on transactions sent per minute |
ignore_errors |
none | Messages (text or regex) or exception classes to skip |
before_send |
none | Edit an event, or return None to drop it |
uncaught_exceptions |
True |
Hook sys.excepthook and threading.excepthook |
logging_integration_enabled |
True |
Report logged errors and keep breadcrumbs |
debug |
False |
Log why events are dropped |
Documentation: https://yassinos-coder.github.io/watchdog/python
Metadata
Release files for watchdog-sdk 0.8.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 | Provenance | Actions |
|---|---|---|---|---|
| watchdog_sdk-0.8.0.tar.gz | 16.8 kB | With provenance | Details for watchdog_sdk-0.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| watchdog_sdk-0.8.0-py3-none-any.whl | Python 3 | none | any | Details for watchdog_sdk-0.8.0-py3-none-any.whl |
Total release size: 33.8 kB
Release files / watchdog_sdk-0.8.0.tar.gz
| Download URL | watchdog_sdk-0.8.0.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
681c84816c86264f77794576297ad06ededbaaa3c8ffae4ceadcce53c599f580
|
|
BLAKE2b-256 checksum How to use checksums |
30294f9f288e656f610d8e53599ebacfe5bf35f115ed11b5aa8d7dccc86f22a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / watchdog_sdk-0.8.0-py3-none-any.whl
| Download URL | watchdog_sdk-0.8.0-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e266112b16bbb3e88d7c8204773afc23eebcf9ac4b1c1b9082a6b7e6f74d720f
|
|
BLAKE2b-256 checksum How to use checksums |
30b42f9984ffb1bdc91d24ce71267de01f1a732edd0b169e7897321874e0a84e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logSecurity for watchdog-sdk 0.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for watchdog_sdk-0.8.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.