- GET /api/error-monitoring/stats: 24h ingestion volume, severity distribution, per-project metrics with resolution rates, hourly trend - Prometheus /metrics on both api (port 3200) and ingest-api (port 3041) with HTTP request duration histograms, ingest SLO latency (p50/p95/p99), event throughput counters, domain gauges - Grafana dashboard JSON (deploy/grafana/) with SLO panels, error volume, severity/state distribution, per-project charts, Node.js process metrics - SLO runbook (docs/RUNBOOK_SLO.md): alert rules, scrape config, triage procedures for latency, error rate, and availability breaches Paperclip-Agent: Peter Spark (urlKey peter-spark; id 49ce66f8-6be6-4644-afd3-eb6d8d0d4b3e) Paperclip-Issue: BIT-734 Paperclip-Run: f45bcdc4-4757-4829-8e75-b60a8f9a7be4
368 lines
10 KiB
JSON
368 lines
10 KiB
JSON
{
|
|
"__inputs": [
|
|
{
|
|
"name": "DS_PROMETHEUS",
|
|
"label": "Prometheus",
|
|
"description": "Prometheus data source for error monitoring metrics",
|
|
"type": "datasource",
|
|
"pluginId": "prometheus",
|
|
"pluginName": "Prometheus"
|
|
}
|
|
],
|
|
"annotations": {
|
|
"list": []
|
|
},
|
|
"editable": true,
|
|
"fiscalYearStartMonth": 0,
|
|
"graphTooltip": 1,
|
|
"id": null,
|
|
"links": [],
|
|
"panels": [
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 },
|
|
"id": 100,
|
|
"title": "Ingestion SLO",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null },
|
|
{ "color": "yellow", "value": 0.3 },
|
|
{ "color": "red", "value": 0.5 }
|
|
]
|
|
},
|
|
"unit": "s"
|
|
}
|
|
},
|
|
"gridPos": { "h": 6, "w": 8, "x": 0, "y": 1 },
|
|
"id": 1,
|
|
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
|
|
"title": "Ingest p50 Latency",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "histogram_quantile(0.50, sum(rate(er_ingest_request_duration_seconds_bucket[5m])) by (le))",
|
|
"legendFormat": "p50"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null },
|
|
{ "color": "yellow", "value": 0.3 },
|
|
{ "color": "red", "value": 0.5 }
|
|
]
|
|
},
|
|
"unit": "s"
|
|
}
|
|
},
|
|
"gridPos": { "h": 6, "w": 8, "x": 8, "y": 1 },
|
|
"id": 2,
|
|
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
|
|
"title": "Ingest p95 Latency (SLO < 500ms)",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "histogram_quantile(0.95, sum(rate(er_ingest_request_duration_seconds_bucket[5m])) by (le))",
|
|
"legendFormat": "p95"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null },
|
|
{ "color": "yellow", "value": 0.75 },
|
|
{ "color": "red", "value": 1.0 }
|
|
]
|
|
},
|
|
"unit": "s"
|
|
}
|
|
},
|
|
"gridPos": { "h": 6, "w": 8, "x": 16, "y": 1 },
|
|
"id": 3,
|
|
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
|
|
"title": "Ingest p99 Latency (SLO < 1s)",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "histogram_quantile(0.99, sum(rate(er_ingest_request_duration_seconds_bucket[5m])) by (le))",
|
|
"legendFormat": "p99"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
|
|
"fieldConfig": {
|
|
"defaults": { "unit": "s" }
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 7 },
|
|
"id": 4,
|
|
"title": "Ingest Latency Over Time",
|
|
"type": "timeseries",
|
|
"targets": [
|
|
{
|
|
"expr": "histogram_quantile(0.50, sum(rate(er_ingest_request_duration_seconds_bucket[5m])) by (le))",
|
|
"legendFormat": "p50"
|
|
},
|
|
{
|
|
"expr": "histogram_quantile(0.95, sum(rate(er_ingest_request_duration_seconds_bucket[5m])) by (le))",
|
|
"legendFormat": "p95"
|
|
},
|
|
{
|
|
"expr": "histogram_quantile(0.99, sum(rate(er_ingest_request_duration_seconds_bucket[5m])) by (le))",
|
|
"legendFormat": "p99"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
|
|
"fieldConfig": {
|
|
"defaults": { "unit": "reqps" }
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 7 },
|
|
"id": 5,
|
|
"title": "Ingest Request Rate",
|
|
"type": "timeseries",
|
|
"targets": [
|
|
{
|
|
"expr": "sum(rate(er_ingest_requests_total[5m])) by (status_code)",
|
|
"legendFormat": "{{status_code}}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 15 },
|
|
"id": 101,
|
|
"title": "Error Volume",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "blue", "value": null }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"gridPos": { "h": 4, "w": 6, "x": 0, "y": 16 },
|
|
"id": 6,
|
|
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
|
|
"title": "Occurrences (24h)",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "er_occurrences_last_24h",
|
|
"legendFormat": "24h"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"gridPos": { "h": 4, "w": 6, "x": 6, "y": 16 },
|
|
"id": 7,
|
|
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
|
|
"title": "Resolved (24h)",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "er_resolved_last_24h",
|
|
"legendFormat": "resolved"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
|
|
"fieldConfig": {
|
|
"defaults": { "unit": "short" }
|
|
},
|
|
"gridPos": { "h": 4, "w": 12, "x": 12, "y": 16 },
|
|
"id": 8,
|
|
"title": "Events Ingested (rate)",
|
|
"type": "timeseries",
|
|
"targets": [
|
|
{
|
|
"expr": "sum(rate(er_ingest_events_total[5m])) by (outcome)",
|
|
"legendFormat": "{{outcome}}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 20 },
|
|
"id": 102,
|
|
"title": "Severity & State Distribution",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
|
|
"fieldConfig": {
|
|
"defaults": { "unit": "short" }
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 21 },
|
|
"id": 9,
|
|
"title": "Incidents by Severity",
|
|
"type": "piechart",
|
|
"targets": [
|
|
{
|
|
"expr": "er_incidents_by_severity",
|
|
"legendFormat": "{{severity}}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
|
|
"fieldConfig": {
|
|
"defaults": { "unit": "short" }
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 21 },
|
|
"id": 10,
|
|
"title": "Incidents by State",
|
|
"type": "piechart",
|
|
"targets": [
|
|
{
|
|
"expr": "er_incidents_total",
|
|
"legendFormat": "{{state}}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 29 },
|
|
"id": 103,
|
|
"title": "Per-Project",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
|
|
"fieldConfig": {
|
|
"defaults": { "unit": "short" }
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 30 },
|
|
"id": 11,
|
|
"title": "Incidents per Project by State",
|
|
"type": "barchart",
|
|
"options": { "stacking": "normal" },
|
|
"targets": [
|
|
{
|
|
"expr": "er_project_incidents_total",
|
|
"legendFormat": "{{project}} / {{state}}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percentunit",
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "red", "value": null },
|
|
{ "color": "yellow", "value": 0.5 },
|
|
{ "color": "green", "value": 0.8 }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 30 },
|
|
"id": 12,
|
|
"title": "Resolution Rate by Project",
|
|
"type": "bargauge",
|
|
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
|
|
"targets": [
|
|
{
|
|
"expr": "er_project_resolution_rate",
|
|
"legendFormat": "{{project}}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 38 },
|
|
"id": 104,
|
|
"title": "Node.js Process (API)",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
|
|
"fieldConfig": {
|
|
"defaults": { "unit": "bytes" }
|
|
},
|
|
"gridPos": { "h": 6, "w": 12, "x": 0, "y": 39 },
|
|
"id": 13,
|
|
"title": "API Heap Usage",
|
|
"type": "timeseries",
|
|
"targets": [
|
|
{
|
|
"expr": "er_api_nodejs_heap_size_used_bytes",
|
|
"legendFormat": "heap used"
|
|
},
|
|
{
|
|
"expr": "er_api_nodejs_heap_size_total_bytes",
|
|
"legendFormat": "heap total"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
|
|
"fieldConfig": {
|
|
"defaults": { "unit": "bytes" }
|
|
},
|
|
"gridPos": { "h": 6, "w": 12, "x": 12, "y": 39 },
|
|
"id": 14,
|
|
"title": "Ingest-API Heap Usage",
|
|
"type": "timeseries",
|
|
"targets": [
|
|
{
|
|
"expr": "er_ingest_nodejs_heap_size_used_bytes",
|
|
"legendFormat": "heap used"
|
|
},
|
|
{
|
|
"expr": "er_ingest_nodejs_heap_size_total_bytes",
|
|
"legendFormat": "heap total"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"schemaVersion": 39,
|
|
"tags": ["bitreport", "error-monitoring", "slo"],
|
|
"templating": { "list": [] },
|
|
"time": { "from": "now-6h", "to": "now" },
|
|
"timepicker": {},
|
|
"timezone": "utc",
|
|
"title": "BitReport Error Monitoring — Operational SLO",
|
|
"uid": "er-ops-slo",
|
|
"version": 1
|
|
}
|