Monitoring and alerts

Scrape the metrics, send traces to a collector, and act on the alerts and the console's banners.

Synaxis follows OpenTelemetry. Each process serves Prometheus metrics at /metrics on its management port (8081), and can also send traces and metrics to an OTLP collector. Metrics carry no code, names or secrets, and no per-user or per-request labels.

Collect the metrics

Deployment How
Docker Compose The monitoring profile runs Prometheus, which scrapes the server, Qdrant and the PostgreSQL exporter and loads the Synaxis alert rules. With compose.scale.yaml, list api:8081 and worker:8081 instead of server:8081 in monitoring/prometheus/prometheus.yml
Helm metrics.serviceMonitor.enabled: true adds a ServiceMonitor for the API and worker pods (and the evaluation Qdrant), for the Prometheus Operator. alerts.enabled: true adds the PrometheusRule
Any SYNAXIS_Telemetry__OtlpEndpoint (Helm: telemetry.otlpEndpoint) sends traces and metrics to an OTLP collector

Gauges read from the database (job counts, lag, budgets, license days, purges) describe the whole installation, and every replica reports them: aggregate them with max, not sum.

The main metrics

Metric Tells
synaxis_jobs_queued, synaxis_jobs_running, synaxis_jobs_held, synaxis_jobs_failed_total, synaxis_job_duration_seconds Work flowing, by job kind and shard
synaxis_index_lag_seconds How long in-scope refs have waited to be indexed, by connection
synaxis_webhooks_total, synaxis_webhook_last_received_timestamp_seconds, synaxis_reconcile_pushes_found_total Webhook delivery, and pushes the nightly reconcile caught that webhooks missed
synaxis_upstream_requests_total, synaxis_upstream_ratelimit_remaining, synaxis_upstream_auth_failures_total GitHub and Azure DevOps health and rate limits
synaxis_model_tokens_total, synaxis_model_cost_total, synaxis_budget_spend_ratio Model usage, cost and budgets
synaxis_query_duration_seconds, synaxis_queries_total Query speed and outcomes, by tool
synaxis_mirror_bytes, synaxis_mirror_volume_used_ratio Mirror size and volume use, by shard
synaxis_purge_oldest_pending_seconds, synaxis_license_days_left, synaxis_access_refresh_failures_total Purges, the license, access refreshes
gen_ai_client_operation_duration_seconds, gen_ai_client_token_usage Each model call's duration and tokens, by job kind (synaxis_job_kind), model and error

The Grafana dashboards chart all of them.

Model calls in traces

Each model call is a span named chat <model> that follows the OpenTelemetry generative-AI semantic conventions, version 1.41.0: the provider, the model asked and the model that answered, the tokens used, an error's type, and what the call was recorded as in model usage (job kind, cost, repository). Prompts and answers are never in a span. Send traces to an OTLP collector to see them; any GenAI-aware viewer reads them as model calls.

Alerts

The same alert rules ship for Compose and Helm. On Helm, alerts.thresholds overrides any threshold (jobFailures30m, indexLagSeconds, webhookGapHours, upstreamAuthMinutes, budgetWarningRatio, mirrorDiskRatio, purgeLateMinutes, licenseWarningDays, licenseCriticalDays).

Alert Fires when (default) Severity First look
SynaxisJobFailuresHigh More than 10 failures of one job kind in 30 minutes warning Jobs, filtered to Failed and the kind
SynaxisIndexStale The 95th percentile of index lag is over 2 hours for 30 minutes warning Repositories, Freshness; Jobs
SynaxisWebhookGap No webhooks from a connection for 6 hours although the reconcile found pushes warning The App's webhook or the service hooks
SynaxisUpstreamAuthFailing GitHub or Azure DevOps refuses the connection's credentials for 15 minutes critical Connections, Credentials and Test
SynaxisBudget80, SynaxisBudget100 A job kind has spent 80% or all of its monthly budget warning, critical Budgets and usage
SynaxisMirrorDiskHigh A worker's data volume is more than 85% full warning Grow the volume, or add workers
SynaxisPurgeLate A purge has waited more than 45 minutes (purges must finish within an hour) critical Jobs, kind repo.purge
SynaxisLicenseExpiring, SynaxisLicenseExpiringSoon The license expires in under 30 days, or under 7 warning, critical License

Troubleshooting gives the causes and fixes for each.

Without Prometheus: the console's banners

Overview checks the same conditions with the same thresholds and shows them to administrators under Needs attention, for installations without Prometheus:

Banner Alert
"kind jobs keep failing: n failures in the last 30 minutes." SynaxisJobFailuresHigh
"Indexes lag their upstreams: 95% of waiting refs within n hours, more than allowed." SynaxisIndexStale
"No webhooks from connection for hours although its repositories were pushed: check its webhook or service hooks." SynaxisWebhookGap
"connection refuses Synaxis's credentials: check the connection's key, token or certificate." SynaxisUpstreamAuthFailing
"The kind budget is n% spent." and "The kind budget is spent: …" SynaxisBudget80, SynaxisBudget100
"Worker n's data volume is n% full." SynaxisMirrorDiskHigh
"A purge has waited n minutes (purges must finish within an hour)." SynaxisPurgeLate
"The license expires in n days." SynaxisLicenseExpiring

It also shows how many jobs are held, each connection's last error, and any license problem.

See also