{ "annotations": { "list": [] }, "description": "Product metrics of the Lincodex backend: API latency and errors, outbox lag, event consumers, scheduled jobs, mail deliveries and quota, and assessment answer saves.", "editable": false, "fiscalYearStartMonth": 0, "graphTooltip": 1, "panels": [ { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 1, "panels": [], "title": "API", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Requests per second by HTTP status. Labels are a route template, method, and status; never a raw path.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "reqps", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 1 }, "id": 2, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "sum by (status) (rate(lincodex_http_requests_total{job=\"backend\"}[5m]))", "legendFormat": "{{status}}", "refId": "A" } ], "title": "Request rate by status", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Share of requests that end with a server error (5xx) or a client error (4xx).", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "percentunit", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 1 }, "id": 3, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "sum(rate(lincodex_http_requests_total{job=\"backend\",status=~\"5..\"}[5m])) / sum(rate(lincodex_http_requests_total{job=\"backend\"}[5m]))", "legendFormat": "5xx", "refId": "A" }, { "editorMode": "code", "expr": "sum(rate(lincodex_http_requests_total{job=\"backend\",status=~\"4..\"}[5m])) / sum(rate(lincodex_http_requests_total{job=\"backend\"}[5m]))", "legendFormat": "4xx", "refId": "B" } ], "title": "Error ratio", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Quantiles of lincodex_http_request_duration_seconds for 2xx responses, by route template.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "s", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 9 }, "id": 4, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "histogram_quantile(0.95, sum by (le, route) (rate(lincodex_http_request_duration_seconds_bucket{job=\"backend\",status_class=\"2xx\"}[5m])))", "legendFormat": "p95 {{route}}", "refId": "A" }, { "editorMode": "code", "expr": "histogram_quantile(0.5, sum by (le, route) (rate(lincodex_http_request_duration_seconds_bucket{job=\"backend\",status_class=\"2xx\"}[5m])))", "legendFormat": "p50 {{route}}", "refId": "B" } ], "title": "Latency p50 and p95 of successful requests by route", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Error responses of the public API by RFC 9457 problem code and route template.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "reqps", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 9 }, "id": 5, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "sum by (code, route) (rate(lincodex_http_problems_total{job=\"backend\"}[5m]))", "legendFormat": "{{code}} {{route}}", "refId": "A" } ], "title": "Problem responses by code and route", "type": "timeseries" }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 17 }, "id": 6, "panels": [], "title": "Outbox and event consumers", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Unpublished outbox events at the last backlog read. Every instance reports the database-wide value, so the panel uses max.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "short", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 18 }, "id": 7, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "max(lincodex_outbox_relay_pending_events{job=\"backend\"})", "legendFormat": "pending events", "refId": "A" } ], "title": "Outbox backlog", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Age of the earliest unpublished outbox event. A growing age with a flat published rate means the relay is stuck.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "s", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 18 }, "id": 8, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "max(lincodex_outbox_relay_oldest_pending_age_seconds{job=\"backend\"})", "legendFormat": "oldest pending age", "refId": "A" } ], "title": "Outbox lag", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Outbox events published or failed per second; a failed event stays pending and is retried.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "ops", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 26 }, "id": 9, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "sum by (outcome) (rate(lincodex_outbox_relay_events_total{job=\"backend\"}[5m]))", "legendFormat": "{{outcome}}", "refId": "A" } ], "title": "Relay outcomes", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Records finished by each event consumer: applied, duplicate, ignored, or dead_lettered.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "ops", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 26 }, "id": 10, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "sum by (consumer, outcome) (rate(lincodex_event_consumer_records_total{job=\"backend\"}[5m]))", "legendFormat": "{{consumer}} {{outcome}}", "refId": "A" } ], "title": "Consumer records by outcome", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Failed consumer operations by stage: handler, store, poll, or commit.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "ops", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 34 }, "id": 11, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "sum by (consumer, stage) (rate(lincodex_event_consumer_failures_total{job=\"backend\"}[5m]))", "legendFormat": "{{consumer}} {{stage}}", "refId": "A" } ], "title": "Consumer failures by stage", "type": "timeseries" }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 42 }, "id": 12, "panels": [], "title": "Scheduled jobs", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Claimed scheduled jobs per second by kind and outcome.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "ops", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 43 }, "id": 13, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "sum by (kind, outcome) (rate(lincodex_scheduled_jobs_total{job=\"backend\"}[5m]))", "legendFormat": "{{kind}} {{outcome}}", "refId": "A" } ], "title": "Scheduled jobs by outcome", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Due jobs waiting for a worker, dead jobs, and how long the earliest due job has waited.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "short", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 43 }, "id": 14, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "max(lincodex_scheduled_jobs_due{job=\"backend\"})", "legendFormat": "due", "refId": "A" }, { "editorMode": "code", "expr": "max(lincodex_scheduled_jobs_dead{job=\"backend\"})", "legendFormat": "dead", "refId": "B" }, { "editorMode": "code", "expr": "max(lincodex_scheduled_jobs_oldest_due_age_seconds{job=\"backend\"})", "legendFormat": "oldest due age, s", "refId": "C" } ], "title": "Due and dead jobs", "type": "timeseries" }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 51 }, "id": 15, "panels": [], "title": "Mail deliveries and quota", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Stored deliveries by status at the last statistics read (every 30 seconds): pending, waiting_quota, unknown, accepted (by the provider, not delivered to a person), rejected, cancelled (not sent, with a reason).", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "short", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 52 }, "id": 16, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "sum by (status) (max by (kind, status) (lincodex_mail_deliveries{job=\"backend\"}))", "legendFormat": "{{status}}", "refId": "A" } ], "title": "Deliveries by status", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Stored deliveries by kind and status. Labels never carry a recipient, user, or delivery ID.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "short", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 52 }, "id": 17, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "max by (kind, status) (lincodex_mail_deliveries{job=\"backend\"})", "legendFormat": "{{kind}} {{status}}", "refId": "A" } ], "title": "Deliveries by kind and status", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "How long the earliest pending service mail (verification or password reset) has been due. Notifications are not counted: they wait until product notification sending is implemented. With EMAIL_PROVIDER=disabled nothing is sent and service mail waits.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "s", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 60 }, "id": 18, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "max(lincodex_mail_delivery_oldest_due_pending_age_seconds{job=\"backend\"})", "legendFormat": "oldest due pending age", "refId": "A" } ], "title": "Oldest due pending delivery", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Seconds since the last read in which every delivery and quota aggregate was read. The gauges are refreshed every 30 seconds; LincodexMailMetricsStale fires above 5 minutes.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "s", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 60 }, "id": 19, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "time() - max(lincodex_mail_metrics_last_success_timestamp_seconds{job=\"backend\"})", "legendFormat": "since last successful read", "refId": "A" } ], "title": "Delivery and quota gauge age", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Recipients counted against the current UTC day and month windows of the configured provider account, as a share of the configured limit. No series with EMAIL_PROVIDER=disabled.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "percentunit", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 68 }, "id": 20, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "max by (provider, window) (lincodex_mail_quota_used_recipients{job=\"backend\"}) / max by (provider, window) (lincodex_mail_quota_limit_recipients{job=\"backend\"})", "legendFormat": "{{provider}} {{window}}", "refId": "A" } ], "title": "Quota usage", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Used recipients and the configured limit per window, and whether the provider itself reported the window used up.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "short", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 68 }, "id": 21, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "max by (provider, window) (lincodex_mail_quota_used_recipients{job=\"backend\"})", "legendFormat": "used {{provider}} {{window}}", "refId": "A" }, { "editorMode": "code", "expr": "max by (provider, window) (lincodex_mail_quota_limit_recipients{job=\"backend\"})", "legendFormat": "limit {{provider}} {{window}}", "refId": "B" }, { "editorMode": "code", "expr": "max by (provider, window) (lincodex_mail_quota_provider_exhausted{job=\"backend\"})", "legendFormat": "provider exhausted {{provider}} {{window}}", "refId": "C" } ], "title": "Quota used and limit", "type": "timeseries" }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 76 }, "id": 22, "panels": [], "title": "Assessment answers", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Assessment answer save commands by format and outcome: stored, unchanged, rejected, or failed. The answer command is not implemented yet, so the panel has no data until it is; its HTTP latency and errors appear in the API panels under its route template.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never" }, "unit": "ops", "min": 0 }, "overrides": [] }, "gridPos": { "h": 8, "w": 24, "x": 0, "y": 77 }, "id": 23, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "editorMode": "code", "expr": "sum by (format, outcome) (rate(lincodex_assessment_answer_saves_total{job=\"backend\"}[5m]))", "legendFormat": "{{format}} {{outcome}}", "refId": "A" } ], "title": "Answer saves by outcome", "type": "timeseries" } ], "refresh": "30s", "schemaVersion": 41, "tags": [ "lincodex", "product" ], "templating": { "list": [] }, "time": { "from": "now-6h", "to": "now" }, "timezone": "browser", "title": "Lincodex product", "uid": "lincodex-product", "version": 1 }