# Log an event
$ curl -X POST https://watch.prim.sh/v1/logs \
-H "X-402-Payment: $TOKEN" \
-d '{"level": "error", "message": "Rate limit exceeded", "service": "scraper"}'
# Record a metric
$ curl -X POST https://watch.prim.sh/v1/metrics \
-H "X-402-Payment: $TOKEN" \
-d '{"name": "pages_scraped", "value": 1, "tags": ["region:us"]}'
Before a VPS is destroyed, agents flush logs to watch.sh so post-mortems survive ephemeral infrastructure.
Track infer.sh spend and trigger alerts when token usage or error rates spike unexpectedly.
Aggregate metrics from spawn.sh, relay.sh, pay.sh, and more into a single health signal per workflow.
Agents poll watch.sh for their own error budget and automatically scale down or reconfigure when they cross thresholds.
POST /v1/logs # Ingest logs
POST /v1/metrics # Ingest metrics
GET /v1/query # Search logs/metrics
POST /v1/alerts # Define alert rules
GET /v1/alerts/history # Alert history
| Action | Cost | Notes |
|---|---|---|
| Log ingest | $0.50/GB | 7 day retention |
| Metric ingest | $0.10/1M | Points |
| Alert rule | $0.01/day | Per active rule |