Logs and log drains
Request, function, database and audit logs in the console, and log drains that forward request and function logs to Datadog, Grafana Loki or your own HTTPS endpoint.
Where to look
| Log | Console | What it shows |
|---|---|---|
| API requests | API logs | Every request to your project: method, path, status, latency, service. |
| Edge functions | Edge logs and each function's logs | Each run: status, duration, error, output preview. |
| Postgres | Postgres logs | Your database's own log: errors, slow statements, connections. |
| Audit trail | Audit Trail | Sign-ins, key and policy changes, deploys, migrations — tamper-evident. |
sov logs requests
sov logs apiMetrics and the live request log
Observability shows, for the chosen time range, requests, 4xx/5xx errors and error rate, response time (average, p50, p95, p99) and data transferred — for the whole project and per product (Data API, Auth, Storage, Edge Functions, Realtime). API Gateway breaks it down per service, so a slow or failing service stands out.
Observability → Request logs lists the latest 1,000 requests (method, path, status, service, duration) and updates live. Only the path is stored, never the query string, so tokens in URLs don't end up in logs.
| Free | Pro | Ultra | Team | Enterprise | |
|---|---|---|---|---|---|
| Metrics history | 1 day | 7 days | 14 days | 28 days | 90 days |
| Request log history | 30 minutes | 7 days | 14 days | 28 days | 90 days |
Log drains
A log drain forwards your project's logs to a tool you already use: every API request and every function run. Each line has a source of request or function. New lines are sent in batches within about 10 seconds, oldest first, and never twice. Add drains under Observability → Log drains.
| Destination | You provide | Notes |
|---|---|---|
| HTTPS endpoint | URL, optional auth header | Body { "project_id", "drain_id", "logs": [...] }, signed with X-Sovaria-Signature: sha256=<hex> |
| Datadog | Site and API key | Function runs arrive as service sovaria-functions |
| Grafana Loki | URL, user and token | One stream per source (log_type) |
Destinations must be public HTTPS hosts. After repeated failed deliveries (about 20 minutes) a drain pauses itself; fix the destination and resume it. Send test delivers one sample line.
import crypto from 'node:crypto'
export function verify(rawBody: Buffer, header: string | undefined, secret: string): boolean {
const expected = 'sha256=' + crypto.createHmac('sha256', secret).update(rawBody).digest('hex')
return !!header && header.length === expected.length && crypto.timingSafeEqual(Buffer.from(header), Buffer.from(expected))
}Plans
| Free | Pro | Ultra | Team | Enterprise | |
|---|---|---|---|---|---|
| Log drains per project | — | 1 | 3 | 10 | 50 |
Every limit is in Plan limits.