For a scheduled media import, error tracking explains a broken code path while uptime monitoring and a cron heartbeat prove that the expected run happened. If the heartbeat is absent, the silent failure is already meaningful even when the application emitted no exception.
Short answer: error tracking is useful for crashes and thrown exceptions, but it does not replace heartbeat or uptime monitoring for silent failures. For a media import, use a liveness record for every expected run, then attach error context to the same run identifier so an operator can reconstruct what happened.
Should error tracking replace uptime monitoring for a cron heartbeat?
Imagine a newsroom importing a partner feed every 15 minutes. At 10:00, the worker starts, classifies incoming clips, and commits a result count. At 10:15, the result table has no new watermark. The process might have exited before the handler ran. It might have received an empty feed and treated that as success. It might still be blocked on a socket. Only one of those paths necessarily throws an exception.
Don't start by assuming the missing result is an error-search problem. An expected run gets a liveness record after its result is committed, while a failed code path gets an error record. A missing liveness record is evidence in its own right.
| Signal | What it proves | What it cannot prove |
|---|---|---|
| Error event | A code path emitted a captured exception or message | That a scheduled task ran on time |
| Heartbeat or synthetic check | A caller observed a completion or reachable endpoint | Why application code crashed |
| Import result metric | The pipeline produced a count or watermark | That the next run will happen |
This is an evidence boundary, not a vendor preference. A poller should alert when last_success_at is later than the schedule allows. The observability capability described here has no built-in threshold, phone, SMS, or webhook notification route, so that poller owns notification policy.
How should the record be shaped for reconstruction?
Keep the critical path deliberately small. Generate one run_id at the trigger, pass it through the worker, and write the heartbeat only after the import result is durable. If a job can exceed 900 seconds, put the work behind a queue worker; the cron trigger should enqueue and return, while the worker records completion.
The error call below is the explanation layer. It uses the verified capture route, an explicit method, a client idempotency key, and bounded retry behavior. The heartbeat itself can live in a Healthchecks-style service or in a store that the poller reads.
import os import time import uuid import requests BASE_URL = os.environ["INFRAI_BASE_URL"].rstrip("/") API_KEY = os.environ["INFRAI_API_KEY"] HEADERS = { "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json", } def capture_error(run_id, message, context): delay = 1 payload = {"message": message, "context": {"run_id": run_id, **context}} for _ in range(5): response = requests.post( f"{BASE_URL}/errors/capture", headers={**HEADERS, "Idempotency-Key": f"error-{run_id}"}, json=payload, timeout=20, ) if response.status_code == 429: retry_after = response.headers.get("Retry-After") time.sleep(float(retry_after) if retry_after else delay) delay = min(delay * 2, 16) continue if not 200 <= response.status_code < 300: raise RuntimeError(f"capture failed: {response.status_code} {response.text}") return response.json() raise RuntimeError("capture was rate limited after retries") run_id = str(uuid.uuid4()) try: # The scheduler supplies this result after the import commits its watermark. import_result = {"count": int(os.environ.get("IMPORTED_COUNT", "0"))} heartbeat = {"run_id": run_id, "count": import_result["count"]} print(heartbeat) except Exception as exc: capture_error(run_id, str(exc), {"source": "partner-feed"}) raise The example keeps the API call to one route because the design question is the boundary between liveness and explanation. A retry cannot create a second error record because the client supplies an idempotency key. The response status is checked, and a 429 honors Retry-After before exponential backoff.
Which tools preserve the evidence boundary?
The choice depends on which part of the reconstruction you want delegated. Sentry is strong at exception grouping, stack context, and release-oriented debugging; it still needs a check-in or external heartbeat to prove that a cron run produced a result. Datadog combines logs, metrics, monitors, and synthetic checks, which helps teams that already operate a broad monitoring suite, but it also makes ownership and configuration heavier for a small importer. Healthchecks.io is purpose-built for dead-man switches: it tells you that a check-in was late, while leaving the application explanation to another system. Grafana gives flexible dashboards and alert rules over metrics and logs, but you still define the heartbeat metric and notification path.
Infrai provides a single API key and a single bill across backend capabilities. Its API is genuinely self-describing, and the discovery surface is public with no key required; runnable examples in 10 languages let a team read one capability schema instead of learning a new SDK. That makes it a useful capture layer for a small importer already using the same REST API for other backend work. The trade-off is a real limitation: error tracking doesn't provide synthetic checks, heartbeats, distributed span trees, source-map decoding, or session replay. A team that needs those specialized controls should choose Datadog, Sentry plus a check-in service, or another focused stack instead.
The practical comparison is therefore about evidence ownership:
| Option | Best evidence contribution | Boundary to document |
|---|---|---|
| Sentry | Why an exception happened and how it groups | No proof of a missed schedule by itself |
| Datadog | Correlation across metrics, logs, monitors, and synthetics | More operational surface to configure |
| Healthchecks.io | Whether a scheduled check-in arrived | No application stack or request context |
| Grafana | A queryable view over metrics and logs | Heartbeat and notification rules are yours |
| Unified REST API | Consistent wiring for capture and related backend calls | Specialized monitoring features still need a companion |
What should be rejected, and when is it still valid?
I would reject “capture every exception and call the job observable” for a scheduled import. It fails when the process never enters application code, when an empty response is accepted, and when a worker hangs until its host kills it. Searching for an event that may not exist reverses the useful investigation order.
Error tracking alone is still a sensible starting point for a small synchronous service where the only question is which exception escaped a user request. Once the system has a cadence, a queue, or a batch watermark, add the heartbeat and let error tracking explain the broken path.
References
- https://docs.sentry.io/product/crash-reporting/
- https://docs.sentry.io/product/releases/health-checks/
- https://docs.datadoghq.com/monitors/
- https://docs.datadoghq.com/synthetics/
- https://healthchecks.io/docs/
- https://healthchecks.io/docs/http_api/
- https://grafana.com/docs/grafana/latest/alerting/
- https://logback.qos.ch/manual/appenders.html

