# Monitors with the official Sentry SDKs

> Python, Node.js and other Sentry SDKs send check-ins to Belvador with their own crons API; which ones are tested and which are not.

The official Sentry SDKs have a crons API that sends the same check-ins Belvador understands. Point the SDK at your Belvador DSN and use that API as documented by Sentry; no Belvador package is needed.

## Which SDKs are tested

| SDK | Status |
|---|---|
| Python `sentry-sdk` | Tested: a test in this repository runs it against a local Belvador edge and node |
| Node.js `@sentry/node` | Tested the same way |
| Go, PHP, Ruby, Java, .NET | Same protocol, **not tested** by Belvador. They should work; tell us at hello@belvador.dev if one does not |

The full table, generated from the same source as the tests, is in [Capabilities by runtime](https://belvador.dev/en/docs/reference/capabilities).

## Python

Set up the SDK as in [Python](https://belvador.dev/en/docs/sdk/python), then decorate the job:

```python
from sentry_sdk.crons import monitor

@monitor(monitor_slug="nightly-invoices", monitor_config={"schedule": {"type": "crontab", "value": "0 2 * * *"}, "timezone": "UTC"})
def nightly_invoices():
    ...  # your job
```

`monitor_config` creates the monitor from code on the first check-in (see [creating from code](https://belvador.dev/en/docs/monitors/setup)). Leave it out to use a monitor created in Belvador. Celery beat tasks can use Sentry's Celery integration with `monitor_beat_tasks=True`; the check-ins are the same.

## Node.js

Set up the SDK as in [Node.js](https://belvador.dev/en/docs/sdk/node), then wrap the job:

```js
import * as Sentry from "@sentry/node";

await Sentry.withMonitor("nightly-invoices", async () => {
  // Your job.
}, { schedule: { type: "crontab", value: "0 2 * * *" }, timezone: "UTC" });
```

## Other languages

Use your SDK's "crons" or "check-in" function with the monitor slug. Two rules keep it working with Belvador:

- Send `in_progress` at the start and `ok` or `error` with the **same check-in id** at the end. A single `ok` without a start works as a heartbeat.
- Keep `monitor_config` within Belvador's limits: schedule `crontab` (5 fields) or `interval`, `checkin_margin` 1–1440, `max_runtime` 1–10080, thresholds 1–720. A `max_runtime` above 7 days is cut to 7 days like Sentry does; any other value outside these ranges makes Belvador ignore that `monitor_config` — the check-in itself is still recorded.

Without any SDK, use [HTTP check-ins](https://belvador.dev/en/docs/monitors/http).

## What Sentry features do not apply

Belvador receives errors and check-ins only. Performance traces, profiles, replays and logs that a Sentry SDK may send are not stored: your node counts them as unsupported and drops them. Turn them off in the SDK to save bandwidth (`traces_sample_rate=0` in Python, `tracesSampleRate: 0` in Node.js).
