Observability And Alerts
Use OpenTelemetry, Grafana, Prometheus, Loki, Tempo, and alert runbooks.
Observability And Alerts
The current implementation emits OpenTelemetry signals to the collector. The reference stack routes metrics to Prometheus, logs to Loki, traces to Tempo, and dashboards/alerts to Grafana.
The backend does not expose a Prometheus /metrics endpoint by default.
Prometheus scrapes the OpenTelemetry Collector Prometheus exporter.
Local URLs
| Component | URL |
|---|---|
| Grafana | http://localhost:3000 |
| Prometheus | http://localhost:9090 |
| Loki | http://localhost:3100 |
| Tempo | http://localhost:3200 |
| OTLP gRPC | localhost:4317 |
| OTLP HTTP | localhost:4318 |
Signal Fields
HTTP logs include:
| Field | Meaning |
|---|---|
method, path, status, duration_ms | Request summary. |
request_id | Generated or client-supplied request ID. |
trace_id | Trace link when OTel span exists. |
tenant_id, user_id | Present when a principal is authenticated. |
Use request_id for support tickets and trace_id for cross-service triage.
Alerts
For every alert, follow this common flow before the alert-specific steps:
- Confirm
/readyzand dependency container/pod health. - Open Grafana
Wipe Backend Overview. - Filter Loki by
service_nameand therequest_idortrace_idfrom the failing request. - Follow the trace into Tempo when present.
- Inspect the relevant queue and DLQ rows.
- Fix dependency or configuration before replaying jobs.
WipeAPITelemetryMissing
- Check
Process Heartbeatsforcomponent="wipe-api". - Confirm the API container is running and can reach the OpenTelemetry Collector.
- Check API startup logs for observability initialization errors and verify
OBSERVABILITY_OTLP_ENDPOINT. - If
/readyzis healthy but telemetry is absent, restart only after confirming collector health and network routing.
WipeWorkerTelemetryMissing
- Check
Process Heartbeatsforwipe-proof-workerand eachwipe-worker-*component. - Confirm the missing worker container/pod is running and has
OBSERVABILITY_ENABLED=true. - Check the worker logs for startup/configuration errors before restarting.
- If every worker is healthy but one heartbeat is missing, verify the OpenTelemetry Collector and Prometheus scrape target before changing worker scale.
WipeHTTP5xxRate
- In Grafana
Wipe Backend Overview, checkHTTP Request Rateby route and status. - Filter Loki logs by
service_name="wipe-api"and the failinghttp_route. - Follow
trace_idinto Tempo when present. - Cross-check dependency readiness with
/readyz, then Keycloak, PostgreSQL, MinIO, and signer configuration.
WipeQueueBacklogHigh
- Check
Queue Depth And In-Flight Jobsby queue and status. - Verify the corresponding worker container is running and exporting logs.
- Inspect
wipe_queue_jobs_totalby outcome for retry or dead-letter growth. - Drain or replay DLQ entries only after the root error in worker logs is understood.
WipeQueueJobFailures
- Check
Queue Job Outcomesforretry,retry_error,complete_error, ordead_letter_errorby queue. - Inspect logs for the affected worker component and queue.
- Map the failing queue to its dependency: object storage for proof/report jobs, signer for proof jobs, SMTP/webhook targets for notification jobs, chain provider for anchor jobs.
- Confirm the retry rate drops before replaying or creating replacement jobs.
WipeQueueDeadLetters / WipeQueueDLQNotEmpty
Check
Queue DLQ Entriesby queue.Inspect the newest DLQ rows:
SELECT id, original_job_id, queue, reason, created_at FROM jobs_dlq ORDER BY created_at DESC LIMIT 20;Apply the replay rules from Workers and queues. Do not mutate a dead job back to
pending.Leave retained DLQ rows in place for audit unless the incident process explicitly approves archival.
WipeProofProcessingStalled
- Check
Pending Proofsfor whichever status is accumulating. - Check
Proof Processing Rateforretry,dead_letter,awaiting_license, andterminaloutcomes. - For
AWAITING_LICENSE, validate license grants and allocation state before retrying. - For
VALIDATING,GENERATING_PDF,SIGNING, orANCHORING, inspect proof-worker logs and traces.
WipeProofsFailed / WipeProofsAwaitingLicense
Check
Pending Proofsgrouped byFAILEDandAWAITING_LICENSE.For
FAILED, inspect the proof worker logs andrejection_reason:SELECT id, tenant_id, organization_id, status, attempt_count, next_retry_at, rejection_reason, received_at FROM proofs WHERE status IN ('FAILED', 'AWAITING_LICENSE') ORDER BY received_at DESC LIMIT 50;For
AWAITING_LICENSE, check license grants, allocation scope, user quotas, and revocation state before retrying.For
FAILED, fix the dependency or malformed configuration first, then use the retry flow from Workers and queues.
WipeSignerFailures
- Check
Signer Operation Errorsby operation:decrypt,hmac,hmac_verify,pades_sign, orreceipt_sign. - Inspect proof-worker and API logs for signer errors around the same time window.
- Confirm signer mode, endpoint reachability, mTLS material, bearer token, key IDs, and TSA configuration when PAdES signing fails. See Signer boundary.
- After recovery, run a proof upload smoke test and a public verification check to exercise decrypt, HMAC, PAdES, and HMAC verification paths.
WipeAnchorFailures
- Check
Anchor p95 Durationbychain_idandoutcome. - Inspect anchor-worker logs for submit or confirmation errors.
- Confirm chain configuration, authorized sender/key configuration, and provider endpoint health.
- With the local
noopchain, this alert should stay silent because no real submit/confirmation is attempted.
WipeDBConnectionsSaturated
- Check
Database Connectionsbyservice_name. - Look for slow routes or workers with high in-flight jobs.
- Check PostgreSQL health and active queries.
- Scale the saturated component or tune pool limits only after identifying the workload causing pressure.
WipeVerificationAnomalyCritical
- Check
Verification Anomaliesbyanomalyandscope. - Filter
verification_logfor the same time window and anomaly type. - For
UNAUTHORIZED_ANCHOR_SENDER, treat the event as a potential trust-boundary incident and verify chain registry / authorized sender state before dismissing it. - Preserve logs and verification rows for incident response; do not purge requester metadata during active triage.
WipeHashChainIntegrityBreak
- Check
Hash Chain Integrityfor the affectedchain(audit_logorconsumption_receipts). - Inspect maintenance-worker logs around the alert time.
- Stop any manual data repair until the incident owner confirms the expected previous/current hashes.
- Restore from backup or apply a signed corrective migration only through the incident process.
Production Settings
| Variable | Expectation |
|---|---|
OBSERVABILITY_ENABLED=true | Enable telemetry on API and workers. |
OBSERVABILITY_OTLP_ENDPOINT | Collector or managed OTel endpoint reachable from all services. |
OBSERVABILITY_ENVIRONMENT | Stable environment label such as prod, staging, or site name. |
OBSERVABILITY_OTLP_HEADERS | Required only when the collector/backend needs auth headers. |
OBSERVABILITY_METRICS_INTERVAL | Balance signal freshness and overhead. |
Keep logs free of secrets, raw proof payloads, canonical certificate JSON, API key secrets, JWTs, and private tenant data.