1{ 2 "uid": "factory-search", 3 "title": "Factory — Search", 4 "tags": ["factory", "observability", "search"], 5 "timezone": "browser", 6 "schemaVersion": 39, 7 "version": 1, 8 "editable": true, 9 "refresh": "30s", 10 "time": { "from": "now-6h", "to": "now" }, 11 "panels": [ 12 { 13 "id": 1, 14 "type": "stat", 15 "title": "Query p95 (10 m, all types)", 16 "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, 17 "gridPos": { "h": 4, "w": 6, "x": 0, "y": 0 }, 18 "fieldConfig": { "defaults": { "unit": "s", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 0.5 } ] } }, "overrides": [] }, 19 "options": { "colorMode": "value", "graphMode": "area" }, 20 "targets": [ { "refId": "A", "expr": "max(factory_api:search_query_duration_seconds:p95)", "legendFormat": "p95" } ] 21 }, 22 { 23 "id": 2, 24 "type": "stat", 25 "title": "Index lag (SLO 30 s)", 26 "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, 27 "gridPos": { "h": 4, "w": 6, "x": 6, "y": 0 }, 28 "fieldConfig": { "defaults": { "unit": "s", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 30 } ] } }, "overrides": [] }, 29 "options": { "colorMode": "value", "graphMode": "area" }, 30 "targets": [ { "refId": "A", "expr": "search_index_lag_seconds{service_name=\"factory-worker\"}", "legendFormat": "lag" } ] 31 }, 32 { 33 "id": 3, 34 "type": "timeseries", 35 "title": "Query duration p95 by type (bm25 vs knn, 10 m)", 36 "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, 37 "gridPos": { "h": 9, "w": 12, "x": 0, "y": 4 }, 38 "fieldConfig": { "defaults": { "unit": "s", "custom": { "drawStyle": "line" } }, "overrides": [] }, 39 "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, 40 "targets": [ { "refId": "A", "expr": "factory_api:search_query_duration_seconds:p95", "legendFormat": "{{type}}" } ] 41 }, 42 { 43 "id": 4, 44 "type": "timeseries", 45 "title": "Query rate by type (5 m)", 46 "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, 47 "gridPos": { "h": 9, "w": 12, "x": 12, "y": 4 }, 48 "fieldConfig": { "defaults": { "unit": "ops", "custom": { "drawStyle": "line" } }, "overrides": [] }, 49 "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, 50 "targets": [ { "refId": "A", "expr": "sum by (type) (rate(search_query_duration_seconds_count{service_name=\"factory-api\"}[5m]))", "legendFormat": "{{type}}" } ] 51 }, 52 { 53 "id": 5, 54 "type": "timeseries", 55 "title": "Index consumer lag over time", 56 "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, 57 "gridPos": { "h": 9, "w": 12, "x": 0, "y": 13 }, 58 "fieldConfig": { "defaults": { "unit": "s", "custom": { "drawStyle": "line", "fillOpacity": 10 }, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 30 } ] } }, "overrides": [] }, 59 "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "thresholds": { "mode": "absolute" } }, 60 "targets": [ { "refId": "A", "expr": "search_index_lag_seconds{service_name=\"factory-worker\"}", "legendFormat": "lag (s)" } ] 61 }, 62 { 63 "id": 6, 64 "type": "timeseries", 65 "title": "search-index queue depth (the indexer's backlog)", 66 "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, 67 "gridPos": { "h": 9, "w": 12, "x": 12, "y": 13 }, 68 "fieldConfig": { "defaults": { "unit": "short", "custom": { "drawStyle": "line" } }, "overrides": [] }, 69 "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, 70 "targets": [ { "refId": "A", "expr": "queue_depth{service_name=\"factory-worker\", queue=\"search-index\"}", "legendFormat": "search-index backlog" } ] 71 } 72 ] 73} 74