From 895c0702393f1ba1fd78367ab2a97326a5379053 Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar Date: Wed, 11 Mar 2026 09:49:45 +0100 Subject: [PATCH] fix: rewrite SigNoz dashboards using correct v4 widget schema Previous JSON used an incorrect format. Rewrote both dashboards using the actual SigNoz v4 schema (widgets array, builder queryData, proper layout entries, aggregateOperator/aggregateAttribute structure). Co-Authored-By: Claude Opus 4.6 --- dashboards/compliance-agent.json | 1486 ++++++++++++++++++++------ dashboards/compliance-dashboard.json | 880 +++++++++++---- 2 files changed, 1874 insertions(+), 492 deletions(-) diff --git a/dashboards/compliance-agent.json b/dashboards/compliance-agent.json index 344f4e8..23e0a62 100644 --- a/dashboards/compliance-agent.json +++ b/dashboards/compliance-agent.json @@ -1,388 +1,1274 @@ { "title": "Compliance Agent", - "description": "Monitoring dashboard for the compliance-agent service — API handlers, scan pipeline stages, and error tracking", - "tags": ["compliance", "agent", "api"], + "description": "API handlers, scan pipeline stages, and error tracking for compliance-agent", + "tags": ["compliance", "agent"], + "version": "v4", + "panelMap": {}, + "uploadedGrafana": false, + "variables": { + "svc-var": { + "id": "svc-var", + "name": "service_name", + "type": "CUSTOM", + "customValue": "compliance-agent", + "multiSelect": false, + "showALLOption": false, + "allSelected": false, + "sort": "DISABLED", + "order": 0, + "textboxValue": "", + "description": "Service name", + "modificationUUID": "" + } + }, "layout": [ + { "i": "row-overview", "x": 0, "y": 0, "w": 24, "h": 1, "moved": false, "static": false }, + { "i": "request-rate", "x": 0, "y": 1, "w": 8, "h": 8, "moved": false, "static": false }, + { "i": "error-rate", "x": 8, "y": 1, "w": 8, "h": 8, "moved": false, "static": false }, + { "i": "p95-latency", "x": 16, "y": 1, "w": 8, "h": 8, "moved": false, "static": false }, + { "i": "row-handlers", "x": 0, "y": 9, "w": 24, "h": 1, "moved": false, "static": false }, + { "i": "handler-latency", "x": 0, "y": 10, "w": 12, "h": 9, "moved": false, "static": false }, + { "i": "handler-calls", "x": 12, "y": 10, "w": 12, "h": 9, "moved": false, "static": false }, + { "i": "handler-errors", "x": 0, "y": 19, "w": 12, "h": 8, "moved": false, "static": false }, + { "i": "slow-requests", "x": 12, "y": 19, "w": 12, "h": 8, "moved": false, "static": false }, + { "i": "row-pipeline", "x": 0, "y": 27, "w": 24, "h": 1, "moved": false, "static": false }, + { "i": "pipeline-duration", "x": 0, "y": 28, "w": 16, "h": 9, "moved": false, "static": false }, + { "i": "scan-count", "x": 16, "y": 28, "w": 4, "h": 9, "moved": false, "static": false }, + { "i": "scan-errors", "x": 20, "y": 28, "w": 4, "h": 9, "moved": false, "static": false }, + { "i": "pipeline-runs", "x": 0, "y": 37, "w": 24, "h": 8, "moved": false, "static": false }, + { "i": "row-subapis", "x": 0, "y": 45, "w": 24, "h": 1, "moved": false, "static": false }, + { "i": "graph-latency", "x": 0, "y": 46, "w": 8, "h": 8, "moved": false, "static": false }, + { "i": "dast-latency", "x": 8, "y": 46, "w": 8, "h": 8, "moved": false, "static": false }, + { "i": "chat-latency", "x": 16, "y": 46, "w": 8, "h": 8, "moved": false, "static": false }, + { "i": "row-logs", "x": 0, "y": 54, "w": 24, "h": 1, "moved": false, "static": false }, + { "i": "log-rate", "x": 0, "y": 55, "w": 12, "h": 8, "moved": false, "static": false }, + { "i": "error-logs", "x": 12, "y": 55, "w": 12, "h": 8, "moved": false, "static": false } + ], + "widgets": [ { "id": "row-overview", - "type": "row", "title": "Overview", - "collapsed": false + "panelTypes": "row", + "description": "", + "query": { "queryType": "builder", "builder": { "queryData": [], "queryFormulas": [] }, "promql": [], "clickhouse_sql": [] } }, { - "id": "panel-request-rate", - "type": "graph", - "title": "API Request Rate", + "id": "request-rate", + "title": "Request Rate (ops/s)", + "panelTypes": "graph", "description": "Requests per second across all compliance-agent endpoints", - "gridPos": { "x": 0, "y": 1, "w": 8, "h": 8 }, + "opacity": "1", + "yAxisUnit": "none", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { "queryType": "builder", "builder": { "queryData": [ { - "dataSource": "traces", "queryName": "A", + "expression": "A", + "dataSource": "traces", "aggregateOperator": "rate", - "aggregateAttribute": { - "key": "signoz_calls_total", - "dataType": "float64", - "type": "Sum", - "isMonotonic": true - }, + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, "filters": { + "op": "AND", "items": [ { - "key": { "key": "service.name", "dataType": "string", "type": "resource" }, + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, "op": "=", "value": "compliance-agent" } - ], - "op": "AND" + ] }, + "functions": [], "groupBy": [], + "having": [], + "legend": "Requests/s", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [], + "limit": null + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } + }, + { + "id": "error-rate", + "title": "Error Rate (%)", + "panelTypes": "graph", + "description": "Percentage of spans with errors", + "opacity": "1", + "yAxisUnit": "percent", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": true, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], + "query": { + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", "expression": "A", + "dataSource": "traces", + "aggregateOperator": "count", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + }, + { + "id": "f-err", + "key": { "id": "hasError--bool--tag--true", "key": "hasError", "dataType": "bool", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "true" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "Errors", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [], + "limit": null + }, + { + "queryName": "B", + "expression": "B", + "dataSource": "traces", + "aggregateOperator": "count", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc2", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "Total", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [], + "limit": null + } + ], + "queryFormulas": [ + { + "queryName": "F1", + "expression": "A * 100 / B", + "legend": "Error %", "disabled": false } ] }, - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 1 MINUTE) AS ts, count() / 60 AS rps FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-agent' AND timestamp >= now() - INTERVAL 1 HOUR GROUP BY ts ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "ops/s" + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-error-rate", - "type": "graph", - "title": "Error Rate", - "description": "Rate of errors (status_code >= 400 or hasError = true) per minute", - "gridPos": { "x": 8, "y": 1, "w": 8, "h": 8 }, + "id": "p95-latency", + "title": "Latency p50 / p95 / p99", + "panelTypes": "graph", + "description": "Response time percentiles for root spans", + "opacity": "1", + "yAxisUnit": "ns", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 1 MINUTE) AS ts, countIf(hasError = true) AS errors, count() AS total, if(total > 0, errors * 100.0 / total, 0) AS error_pct FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-agent' AND timestamp >= now() - INTERVAL 1 HOUR GROUP BY ts ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "%" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "p50", + "aggregateAttribute": { "id": "durationNano--float64--tag--true", "key": "durationNano", "dataType": "float64", "type": "tag", "isColumn": true, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "p50", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "avg", + "orderBy": [], + "limit": null + }, + { + "queryName": "B", + "expression": "B", + "dataSource": "traces", + "aggregateOperator": "p95", + "aggregateAttribute": { "id": "durationNano--float64--tag--true", "key": "durationNano", "dataType": "float64", "type": "tag", "isColumn": true, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "p95", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "avg", + "orderBy": [], + "limit": null + }, + { + "queryName": "C", + "expression": "C", + "dataSource": "traces", + "aggregateOperator": "p99", + "aggregateAttribute": { "id": "durationNano--float64--tag--true", "key": "durationNano", "dataType": "float64", "type": "tag", "isColumn": true, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "p99", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "avg", + "orderBy": [], + "limit": null + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-p99-latency", - "type": "graph", - "title": "API Latency (p50 / p95 / p99)", - "description": "Response time percentiles for compliance-agent API handlers", - "gridPos": { "x": 16, "y": 1, "w": 8, "h": 8 }, - "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 1 MINUTE) AS ts, quantile(0.5)(durationNano) / 1e6 AS p50_ms, quantile(0.95)(durationNano) / 1e6 AS p95_ms, quantile(0.99)(durationNano) / 1e6 AS p99_ms FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-agent' AND parentSpanID = '' AND timestamp >= now() - INTERVAL 1 HOUR GROUP BY ts ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "ms" - }, - { - "id": "row-api-handlers", - "type": "row", + "id": "row-handlers", "title": "API Handlers", - "collapsed": false + "panelTypes": "row", + "description": "", + "query": { "queryType": "builder", "builder": { "queryData": [], "queryFormulas": [] }, "promql": [], "clickhouse_sql": [] } }, { - "id": "panel-handler-latency", - "type": "graph", - "title": "Handler Latency by Operation", - "description": "p95 latency per handler function name", - "gridPos": { "x": 0, "y": 10, "w": 12, "h": 10 }, + "id": "handler-latency", + "title": "Handler p95 Latency by Operation", + "panelTypes": "graph", + "description": "p95 latency grouped by span name (handler function)", + "opacity": "1", + "yAxisUnit": "ns", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 5 MINUTE) AS ts, name AS handler, quantile(0.95)(durationNano) / 1e6 AS p95_ms FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-agent' AND name IN ('health', 'stats_overview', 'list_repositories', 'add_repository', 'trigger_scan', 'delete_repository', 'list_findings', 'get_finding', 'update_finding_status', 'bulk_update_finding_status', 'update_finding_feedback', 'list_sbom', 'sbom_filters', 'export_sbom', 'license_summary', 'sbom_diff', 'list_issues', 'list_scan_runs', 'get_ssh_public_key') AND timestamp >= now() - INTERVAL 3 HOUR GROUP BY ts, handler ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "ms" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "p95", + "aggregateAttribute": { "id": "durationNano--float64--tag--true", "key": "durationNano", "dataType": "float64", "type": "tag", "isColumn": true, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + }, + { + "id": "f-name", + "key": { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "nin", + "value": ["run", "run_pipeline", "stage_sast", "stage_sbom_generation", "stage_cve_scanning", "stage_pattern_scanning", "stage_secret_detection", "stage_lint_scanning", "stage_code_review", "stage_graph_building", "clone_or_fetch", "clone_repo", "scan", "generate_lockfiles", "run_syft", "enrich_cargo_licenses", "run_cargo_audit"] + } + ] + }, + "functions": [], + "groupBy": [ + { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false } + ], + "having": [], + "legend": "{{name}}", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "avg", + "orderBy": [], + "limit": 20 + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-handler-calls", - "type": "graph", - "title": "Handler Call Count by Operation", + "id": "handler-calls", + "title": "Handler Call Volume", + "panelTypes": "graph", "description": "Number of calls per handler over time", - "gridPos": { "x": 12, "y": 10, "w": 12, "h": 10 }, + "opacity": "1", + "yAxisUnit": "none", + "isStacked": true, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 5 MINUTE) AS ts, name AS handler, count() AS calls FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-agent' AND name IN ('health', 'stats_overview', 'list_repositories', 'add_repository', 'trigger_scan', 'delete_repository', 'list_findings', 'get_finding', 'update_finding_status', 'list_sbom', 'sbom_filters', 'list_issues', 'list_scan_runs', 'get_ssh_public_key') AND timestamp >= now() - INTERVAL 3 HOUR GROUP BY ts, handler ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "count", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + }, + { + "id": "f-name", + "key": { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "nin", + "value": ["run", "run_pipeline", "stage_sast", "stage_sbom_generation", "stage_cve_scanning", "stage_pattern_scanning", "stage_secret_detection", "stage_lint_scanning", "stage_code_review", "stage_graph_building", "clone_or_fetch", "clone_repo", "scan", "generate_lockfiles", "run_syft", "enrich_cargo_licenses", "run_cargo_audit"] + } + ] + }, + "functions": [], + "groupBy": [ + { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false } + ], + "having": [], + "legend": "{{name}}", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [{ "columnName": "#SIGNOZ_VALUE", "order": "desc" }], + "limit": 15 + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-handler-errors-table", - "type": "table", - "title": "Handler Errors (Last 24h)", - "description": "Handlers with the most errors in the last 24 hours", - "gridPos": { "x": 0, "y": 20, "w": 12, "h": 8 }, + "id": "handler-errors", + "title": "Top Operations by Error Count", + "panelTypes": "table", + "description": "Operations with the most errors", + "opacity": "1", + "yAxisUnit": "none", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT name AS handler, count() AS total_calls, countIf(hasError = true) AS errors, round(errors * 100.0 / total_calls, 2) AS error_pct, quantile(0.95)(durationNano) / 1e6 AS p95_ms FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-agent' AND timestamp >= now() - INTERVAL 24 HOUR GROUP BY handler ORDER BY errors DESC LIMIT 20" - } - ] - }, - "panelType": "table" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "count", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + }, + { + "id": "f-err", + "key": { "id": "hasError--bool--tag--true", "key": "hasError", "dataType": "bool", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "true" + } + ] + }, + "functions": [], + "groupBy": [ + { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false } + ], + "having": [], + "legend": "Errors", + "disabled": false, + "stepInterval": 60, + "reduceTo": "sum", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [{ "columnName": "#SIGNOZ_VALUE", "order": "desc" }], + "limit": 20 + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-slow-requests", - "type": "table", - "title": "Slowest Requests (Last 1h)", - "description": "Top 20 slowest individual requests", - "gridPos": { "x": 12, "y": 20, "w": 12, "h": 8 }, + "id": "slow-requests", + "title": "Slowest Traces", + "panelTypes": "list", + "description": "Individual traces ordered by duration (slowest first)", + "opacity": "1", + "yAxisUnit": "none", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [ + { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + { "id": "durationNano--float64--tag--true", "key": "durationNano", "dataType": "float64", "type": "tag", "isColumn": true, "isJSON": false }, + { "id": "hasError--bool--tag--true", "key": "hasError", "dataType": "bool", "type": "tag", "isColumn": true, "isJSON": false } + ], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT name AS handler, traceID, durationNano / 1e6 AS duration_ms, toString(timestamp) AS time, hasError FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-agent' AND parentSpanID = '' AND timestamp >= now() - INTERVAL 1 HOUR ORDER BY durationNano DESC LIMIT 20" - } - ] - }, - "panelType": "table" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "noop", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [{ "columnName": "durationNano", "order": "desc" }], + "limit": null, + "offset": 0, + "pageSize": 10 + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "row-scan-pipeline", - "type": "row", + "id": "row-pipeline", "title": "Scan Pipeline", - "collapsed": false + "panelTypes": "row", + "description": "", + "query": { "queryType": "builder", "builder": { "queryData": [], "queryFormulas": [] }, "promql": [], "clickhouse_sql": [] } }, { - "id": "panel-scan-pipeline-duration", - "type": "graph", - "title": "Scan Pipeline Stage Duration", - "description": "Time spent in each pipeline stage (SAST, SBOM, CVE, secrets, lint, graph, etc.)", - "gridPos": { "x": 0, "y": 29, "w": 16, "h": 10 }, + "id": "pipeline-duration", + "title": "Pipeline Stage Duration (p95)", + "panelTypes": "graph", + "description": "Time spent in each scan pipeline stage", + "opacity": "1", + "yAxisUnit": "ns", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 5 MINUTE) AS ts, name AS stage, quantile(0.95)(durationNano) / 1e9 AS p95_seconds FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-agent' AND name IN ('run_pipeline', 'stage_sast', 'stage_sbom_generation', 'stage_cve_scanning', 'stage_pattern_scanning', 'stage_secret_detection', 'stage_lint_scanning', 'stage_code_review', 'stage_graph_building') AND timestamp >= now() - INTERVAL 6 HOUR GROUP BY ts, stage ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "s" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "p95", + "aggregateAttribute": { "id": "durationNano--float64--tag--true", "key": "durationNano", "dataType": "float64", "type": "tag", "isColumn": true, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + }, + { + "id": "f-stage", + "key": { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "in", + "value": ["run_pipeline", "stage_sast", "stage_sbom_generation", "stage_cve_scanning", "stage_pattern_scanning", "stage_secret_detection", "stage_lint_scanning", "stage_code_review", "stage_graph_building"] + } + ] + }, + "functions": [], + "groupBy": [ + { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false } + ], + "having": [], + "legend": "{{name}}", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "avg", + "orderBy": [], + "limit": null + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-scan-count", - "type": "value", - "title": "Scans (24h)", - "description": "Total scan pipeline runs in the last 24 hours", - "gridPos": { "x": 16, "y": 29, "w": 4, "h": 5 }, + "id": "scan-count", + "title": "Total Scans", + "panelTypes": "value", + "description": "Total pipeline runs in selected time range", + "opacity": "1", + "yAxisUnit": "none", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT count() AS scans FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-agent' AND name = 'run' AND timestamp >= now() - INTERVAL 24 HOUR" - } - ] - }, - "panelType": "value" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "count", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + }, + { + "id": "f-run", + "key": { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "run" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "Scans", + "disabled": false, + "stepInterval": 60, + "reduceTo": "sum", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [], + "limit": null + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-scan-errors", - "type": "value", - "title": "Failed Scans (24h)", - "description": "Scans that had errors", - "gridPos": { "x": 20, "y": 29, "w": 4, "h": 5 }, + "id": "scan-errors", + "title": "Failed Scans", + "panelTypes": "value", + "description": "Pipeline runs that errored", + "opacity": "1", + "yAxisUnit": "none", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT count() AS failed FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-agent' AND name = 'run' AND hasError = true AND timestamp >= now() - INTERVAL 24 HOUR" - } - ] - }, - "panelType": "value" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "count", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + }, + { + "id": "f-run", + "key": { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "run" + }, + { + "id": "f-err", + "key": { "id": "hasError--bool--tag--true", "key": "hasError", "dataType": "bool", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "true" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "Failed", + "disabled": false, + "stepInterval": 60, + "reduceTo": "sum", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [], + "limit": null + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-pipeline-runs-table", - "type": "table", - "title": "Recent Pipeline Runs", - "description": "Last 20 scan pipeline executions with duration and status", - "gridPos": { "x": 16, "y": 34, "w": 8, "h": 5 }, + "id": "pipeline-runs", + "title": "Recent Pipeline Traces", + "panelTypes": "list", + "description": "Individual scan pipeline traces, most recent first", + "opacity": "1", + "yAxisUnit": "none", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": { "A": "ns" }, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [ + { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + { "id": "durationNano--float64--tag--true", "key": "durationNano", "dataType": "float64", "type": "tag", "isColumn": true, "isJSON": false }, + { "id": "hasError--bool--tag--true", "key": "hasError", "dataType": "bool", "type": "tag", "isColumn": true, "isJSON": false } + ], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT traceID, toString(timestamp) AS started, durationNano / 1e9 AS duration_sec, hasError, stringTagMap['repo_id'] AS repo_id, stringTagMap['trigger'] AS trigger FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-agent' AND name = 'run' AND timestamp >= now() - INTERVAL 7 DAY ORDER BY timestamp DESC LIMIT 20" - } - ] - }, - "panelType": "table" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "noop", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + }, + { + "id": "f-run", + "key": { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "in", + "value": ["run", "run_pipeline"] + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [{ "columnName": "timestamp", "order": "desc" }], + "limit": null, + "offset": 0, + "pageSize": 10 + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-stage-breakdown", - "type": "graph", - "title": "Pipeline Stage Error Rate", - "description": "Error rate per pipeline stage", - "gridPos": { "x": 0, "y": 39, "w": 12, "h": 8 }, - "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT name AS stage, count() AS total, countIf(hasError = true) AS errors, round(errors * 100.0 / total, 2) AS error_pct FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-agent' AND name LIKE 'stage_%' AND timestamp >= now() - INTERVAL 24 HOUR GROUP BY stage ORDER BY error_pct DESC" - } - ] - }, - "panelType": "bar" - }, - { - "id": "panel-stage-avg-duration", - "type": "graph", - "title": "Avg Stage Duration (Last 24h)", - "description": "Average time per pipeline stage", - "gridPos": { "x": 12, "y": 39, "w": 12, "h": 8 }, - "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT name AS stage, round(avg(durationNano) / 1e9, 2) AS avg_sec, round(quantile(0.95)(durationNano) / 1e9, 2) AS p95_sec, count() AS runs FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-agent' AND name LIKE 'stage_%' AND timestamp >= now() - INTERVAL 24 HOUR GROUP BY stage ORDER BY avg_sec DESC" - } - ] - }, - "panelType": "bar" - }, - { - "id": "row-graph-dast-chat", - "type": "row", + "id": "row-subapis", "title": "Graph / DAST / Chat APIs", - "collapsed": true + "panelTypes": "row", + "description": "", + "query": { "queryType": "builder", "builder": { "queryData": [], "queryFormulas": [] }, "promql": [], "clickhouse_sql": [] } }, { - "id": "panel-graph-api", - "type": "graph", - "title": "Graph API Latency", - "description": "p95 latency for graph endpoints", - "gridPos": { "x": 0, "y": 48, "w": 8, "h": 8 }, + "id": "graph-latency", + "title": "Graph API p95 Latency", + "panelTypes": "graph", + "description": "Graph endpoint latency by operation", + "opacity": "1", + "yAxisUnit": "ns", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 5 MINUTE) AS ts, name AS handler, quantile(0.95)(durationNano) / 1e6 AS p95_ms FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-agent' AND name IN ('get_graph', 'get_nodes', 'get_communities', 'get_impact', 'search_symbols', 'get_file_content', 'trigger_build') AND timestamp >= now() - INTERVAL 3 HOUR GROUP BY ts, handler ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "ms" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "p95", + "aggregateAttribute": { "id": "durationNano--float64--tag--true", "key": "durationNano", "dataType": "float64", "type": "tag", "isColumn": true, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + }, + { + "id": "f-name", + "key": { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "in", + "value": ["get_graph", "get_nodes", "get_communities", "get_impact", "search_symbols", "get_file_content", "trigger_build"] + } + ] + }, + "functions": [], + "groupBy": [ + { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false } + ], + "having": [], + "legend": "{{name}}", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "avg", + "orderBy": [], + "limit": null + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-dast-api", - "type": "graph", - "title": "DAST API Latency", - "description": "p95 latency for DAST endpoints", - "gridPos": { "x": 8, "y": 48, "w": 8, "h": 8 }, + "id": "dast-latency", + "title": "DAST API p95 Latency", + "panelTypes": "graph", + "description": "DAST endpoint latency by operation", + "opacity": "1", + "yAxisUnit": "ns", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 5 MINUTE) AS ts, name AS handler, quantile(0.95)(durationNano) / 1e6 AS p95_ms FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-agent' AND name IN ('list_targets', 'add_target', 'trigger_scan', 'list_scan_runs', 'list_findings', 'get_finding') AND stringTagMap['target_id'] != '' AND timestamp >= now() - INTERVAL 3 HOUR GROUP BY ts, handler ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "ms" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "p95", + "aggregateAttribute": { "id": "durationNano--float64--tag--true", "key": "durationNano", "dataType": "float64", "type": "tag", "isColumn": true, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + }, + { + "id": "f-name", + "key": { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "in", + "value": ["list_targets", "add_target", "list_scan_runs", "list_findings", "get_finding"] + } + ] + }, + "functions": [], + "groupBy": [ + { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false } + ], + "having": [], + "legend": "{{name}}", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "avg", + "orderBy": [], + "limit": null + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-chat-api", - "type": "graph", - "title": "Chat / RAG API Latency", - "description": "p95 latency for chat and embedding endpoints", - "gridPos": { "x": 16, "y": 48, "w": 8, "h": 8 }, + "id": "chat-latency", + "title": "Chat / RAG API p95 Latency", + "panelTypes": "graph", + "description": "Chat and embedding endpoint latency", + "opacity": "1", + "yAxisUnit": "ns", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 5 MINUTE) AS ts, name AS handler, quantile(0.95)(durationNano) / 1e6 AS p95_ms FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-agent' AND name IN ('chat', 'build_embeddings', 'embedding_status') AND timestamp >= now() - INTERVAL 3 HOUR GROUP BY ts, handler ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "ms" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "p95", + "aggregateAttribute": { "id": "durationNano--float64--tag--true", "key": "durationNano", "dataType": "float64", "type": "tag", "isColumn": true, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + }, + { + "id": "f-name", + "key": { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "in", + "value": ["chat", "build_embeddings", "embedding_status"] + } + ] + }, + "functions": [], + "groupBy": [ + { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false } + ], + "having": [], + "legend": "{{name}}", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "avg", + "orderBy": [], + "limit": null + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { "id": "row-logs", - "type": "row", "title": "Logs & Warnings", - "collapsed": false + "panelTypes": "row", + "description": "", + "query": { "queryType": "builder", "builder": { "queryData": [], "queryFormulas": [] }, "promql": [], "clickhouse_sql": [] } }, { - "id": "panel-warn-errors-log", - "type": "graph", - "title": "Warn / Error Log Rate", - "description": "Rate of WARN and ERROR level logs over time", - "gridPos": { "x": 0, "y": 57, "w": 12, "h": 8 }, + "id": "log-rate", + "title": "WARN / ERROR Log Rate", + "panelTypes": "graph", + "description": "Warn and error log entries over time", + "opacity": "1", + "yAxisUnit": "none", + "isStacked": true, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 5 MINUTE) AS ts, severity_text AS level, count() AS cnt FROM signoz_logs.distributed_logs_v2 WHERE resources_string['service.name'] = 'compliance-agent' AND severity_text IN ('WARN', 'ERROR') AND timestamp >= now() - INTERVAL 6 HOUR GROUP BY ts, level ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "logs", + "aggregateOperator": "count", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "service.name--string--resource--false", "key": "service.name", "dataType": "string", "type": "resource", "isColumn": false, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + }, + { + "id": "f-level", + "key": { "id": "severity_text--string--tag--true", "key": "severity_text", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "in", + "value": ["WARN", "ERROR"] + } + ] + }, + "functions": [], + "groupBy": [ + { "id": "severity_text--string--tag--true", "key": "severity_text", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false } + ], + "having": [], + "legend": "{{severity_text}}", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [], + "limit": null + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-recent-errors", - "type": "list", + "id": "error-logs", "title": "Recent Error Logs", - "description": "Last 50 ERROR-level log entries", - "gridPos": { "x": 12, "y": 57, "w": 12, "h": 8 }, + "panelTypes": "list", + "description": "Latest ERROR-level log entries", + "opacity": "1", + "yAxisUnit": "none", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [ + { "dataType": "string", "name": "body", "type": "" }, + { "dataType": "string", "name": "timestamp", "type": "" }, + { "dataType": "string", "name": "severity_text", "type": "" } + ], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toString(timestamp) AS time, body AS message, trace_id FROM signoz_logs.distributed_logs_v2 WHERE resources_string['service.name'] = 'compliance-agent' AND severity_text = 'ERROR' AND timestamp >= now() - INTERVAL 24 HOUR ORDER BY timestamp DESC LIMIT 50" - } - ] - }, - "panelType": "list" - }, - { - "id": "panel-warn-messages", - "type": "table", - "title": "Top Warning Messages (24h)", - "description": "Most frequent WARN messages — useful for spotting recurring DB or deserialization issues", - "gridPos": { "x": 0, "y": 65, "w": 24, "h": 8 }, - "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT body AS message, count() AS occurrences, max(toString(timestamp)) AS last_seen FROM signoz_logs.distributed_logs_v2 WHERE resources_string['service.name'] = 'compliance-agent' AND severity_text = 'WARN' AND timestamp >= now() - INTERVAL 24 HOUR GROUP BY message ORDER BY occurrences DESC LIMIT 30" - } - ] - }, - "panelType": "table" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "logs", + "aggregateOperator": "noop", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "service.name--string--resource--false", "key": "service.name", "dataType": "string", "type": "resource", "isColumn": false, "isJSON": false }, + "op": "=", + "value": "compliance-agent" + }, + { + "id": "f-level", + "key": { "id": "severity_text--string--tag--true", "key": "severity_text", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "ERROR" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [{ "columnName": "timestamp", "order": "desc" }], + "limit": null, + "offset": 0, + "pageSize": 10 + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } } - ], - "variables": { - "time_range": { - "type": "custom", - "label": "Time Range", - "default": "1h", - "options": ["15m", "30m", "1h", "3h", "6h", "12h", "24h", "7d"] - } - } + ] } diff --git a/dashboards/compliance-dashboard.json b/dashboards/compliance-dashboard.json index 36b8221..db2638f 100644 --- a/dashboards/compliance-dashboard.json +++ b/dashboards/compliance-dashboard.json @@ -1,238 +1,734 @@ { "title": "Compliance Dashboard (Frontend)", - "description": "Monitoring dashboard for the compliance-dashboard Dioxus SSR/WASM service — page loads, server functions, and error tracking", + "description": "Server functions, page loads, and error tracking for the compliance-dashboard Dioxus SSR service", "tags": ["compliance", "dashboard", "frontend"], + "version": "v4", + "panelMap": {}, + "uploadedGrafana": false, + "variables": {}, "layout": [ + { "i": "row-overview", "x": 0, "y": 0, "w": 24, "h": 1, "moved": false, "static": false }, + { "i": "request-rate", "x": 0, "y": 1, "w": 8, "h": 8, "moved": false, "static": false }, + { "i": "error-rate", "x": 8, "y": 1, "w": 8, "h": 8, "moved": false, "static": false }, + { "i": "latency", "x": 16, "y": 1, "w": 8, "h": 8, "moved": false, "static": false }, + { "i": "row-serverfn", "x": 0, "y": 9, "w": 24, "h": 1, "moved": false, "static": false }, + { "i": "serverfn-latency", "x": 0, "y": 10, "w": 12, "h": 9, "moved": false, "static": false }, + { "i": "serverfn-calls", "x": 12, "y": 10, "w": 12, "h": 9, "moved": false, "static": false }, + { "i": "serverfn-errors", "x": 0, "y": 19, "w": 12, "h": 8, "moved": false, "static": false }, + { "i": "slow-requests", "x": 12, "y": 19, "w": 12, "h": 8, "moved": false, "static": false }, + { "i": "row-logs", "x": 0, "y": 27, "w": 24, "h": 1, "moved": false, "static": false }, + { "i": "log-rate", "x": 0, "y": 28, "w": 12, "h": 8, "moved": false, "static": false }, + { "i": "error-logs", "x": 12, "y": 28, "w": 12, "h": 8, "moved": false, "static": false } + ], + "widgets": [ { "id": "row-overview", - "type": "row", "title": "Overview", - "collapsed": false + "panelTypes": "row", + "description": "", + "query": { "queryType": "builder", "builder": { "queryData": [], "queryFormulas": [] }, "promql": [], "clickhouse_sql": [] } }, { - "id": "panel-request-rate", - "type": "graph", - "title": "Request Rate", - "description": "Requests per second to the compliance-dashboard service", - "gridPos": { "x": 0, "y": 1, "w": 8, "h": 8 }, + "id": "request-rate", + "title": "Request Rate (ops/s)", + "panelTypes": "graph", + "description": "Requests per second to the dashboard service", + "opacity": "1", + "yAxisUnit": "none", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 1 MINUTE) AS ts, count() / 60 AS rps FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND parentSpanID = '' AND timestamp >= now() - INTERVAL 1 HOUR GROUP BY ts ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "ops/s" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "rate", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-dashboard" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "Requests/s", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [], + "limit": null + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-error-rate", - "type": "graph", - "title": "Error Rate", - "description": "Percentage of requests with errors", - "gridPos": { "x": 8, "y": 1, "w": 8, "h": 8 }, + "id": "error-rate", + "title": "Error Rate (%)", + "panelTypes": "graph", + "description": "Percentage of spans with errors", + "opacity": "1", + "yAxisUnit": "percent", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": true, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 1 MINUTE) AS ts, countIf(hasError = true) AS errors, count() AS total, if(total > 0, errors * 100.0 / total, 0) AS error_pct FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND timestamp >= now() - INTERVAL 1 HOUR GROUP BY ts ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "%" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "count", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-dashboard" + }, + { + "id": "f-err", + "key": { "id": "hasError--bool--tag--true", "key": "hasError", "dataType": "bool", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "true" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "Errors", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [], + "limit": null + }, + { + "queryName": "B", + "expression": "B", + "dataSource": "traces", + "aggregateOperator": "count", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc2", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-dashboard" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "Total", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [], + "limit": null + } + ], + "queryFormulas": [ + { + "queryName": "F1", + "expression": "A * 100 / B", + "legend": "Error %", + "disabled": false + } + ] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-latency", - "type": "graph", - "title": "Response Latency (p50 / p95 / p99)", - "description": "Response time percentiles for the dashboard service", - "gridPos": { "x": 16, "y": 1, "w": 8, "h": 8 }, + "id": "latency", + "title": "Latency p50 / p95 / p99", + "panelTypes": "graph", + "description": "Response time percentiles", + "opacity": "1", + "yAxisUnit": "ns", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 1 MINUTE) AS ts, quantile(0.5)(durationNano) / 1e6 AS p50_ms, quantile(0.95)(durationNano) / 1e6 AS p95_ms, quantile(0.99)(durationNano) / 1e6 AS p99_ms FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND parentSpanID = '' AND timestamp >= now() - INTERVAL 1 HOUR GROUP BY ts ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "ms" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "p50", + "aggregateAttribute": { "id": "durationNano--float64--tag--true", "key": "durationNano", "dataType": "float64", "type": "tag", "isColumn": true, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-dashboard" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "p50", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "avg", + "orderBy": [], + "limit": null + }, + { + "queryName": "B", + "expression": "B", + "dataSource": "traces", + "aggregateOperator": "p95", + "aggregateAttribute": { "id": "durationNano--float64--tag--true", "key": "durationNano", "dataType": "float64", "type": "tag", "isColumn": true, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-dashboard" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "p95", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "avg", + "orderBy": [], + "limit": null + }, + { + "queryName": "C", + "expression": "C", + "dataSource": "traces", + "aggregateOperator": "p99", + "aggregateAttribute": { "id": "durationNano--float64--tag--true", "key": "durationNano", "dataType": "float64", "type": "tag", "isColumn": true, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-dashboard" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "p99", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "avg", + "orderBy": [], + "limit": null + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "row-server-functions", - "type": "row", + "id": "row-serverfn", "title": "Server Functions", - "collapsed": false + "panelTypes": "row", + "description": "", + "query": { "queryType": "builder", "builder": { "queryData": [], "queryFormulas": [] }, "promql": [], "clickhouse_sql": [] } }, { - "id": "panel-server-fn-latency", - "type": "graph", - "title": "Server Function Latency by Name", - "description": "p95 latency for each Dioxus server function (fetch_repositories, fetch_findings, fetch_sbom, etc.)", - "gridPos": { "x": 0, "y": 10, "w": 12, "h": 10 }, + "id": "serverfn-latency", + "title": "Server Function p95 Latency", + "panelTypes": "graph", + "description": "p95 latency by operation name", + "opacity": "1", + "yAxisUnit": "ns", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 5 MINUTE) AS ts, name AS server_fn, quantile(0.95)(durationNano) / 1e6 AS p95_ms FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND timestamp >= now() - INTERVAL 3 HOUR GROUP BY ts, server_fn ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "ms" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "p95", + "aggregateAttribute": { "id": "durationNano--float64--tag--true", "key": "durationNano", "dataType": "float64", "type": "tag", "isColumn": true, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-dashboard" + } + ] + }, + "functions": [], + "groupBy": [ + { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false } + ], + "having": [], + "legend": "{{name}}", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "avg", + "orderBy": [], + "limit": 15 + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-server-fn-calls", - "type": "graph", + "id": "serverfn-calls", "title": "Server Function Call Volume", + "panelTypes": "graph", "description": "Number of calls per server function over time", - "gridPos": { "x": 12, "y": 10, "w": 12, "h": 10 }, + "opacity": "1", + "yAxisUnit": "none", + "isStacked": true, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 5 MINUTE) AS ts, name AS server_fn, count() AS calls FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND timestamp >= now() - INTERVAL 3 HOUR GROUP BY ts, server_fn ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "count", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-dashboard" + } + ] + }, + "functions": [], + "groupBy": [ + { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false } + ], + "having": [], + "legend": "{{name}}", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [{ "columnName": "#SIGNOZ_VALUE", "order": "desc" }], + "limit": 15 + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-server-fn-errors", - "type": "table", - "title": "Server Function Errors (Last 24h)", - "description": "Server functions with the most errors", - "gridPos": { "x": 0, "y": 20, "w": 12, "h": 8 }, + "id": "serverfn-errors", + "title": "Top Operations by Error Count", + "panelTypes": "table", + "description": "Operations with the most errors", + "opacity": "1", + "yAxisUnit": "none", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT name AS server_fn, count() AS total_calls, countIf(hasError = true) AS errors, round(errors * 100.0 / total_calls, 2) AS error_pct, quantile(0.95)(durationNano) / 1e6 AS p95_ms FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND timestamp >= now() - INTERVAL 24 HOUR GROUP BY server_fn HAVING total_calls > 0 ORDER BY errors DESC LIMIT 20" - } - ] - }, - "panelType": "table" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "count", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-dashboard" + }, + { + "id": "f-err", + "key": { "id": "hasError--bool--tag--true", "key": "hasError", "dataType": "bool", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "true" + } + ] + }, + "functions": [], + "groupBy": [ + { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false } + ], + "having": [], + "legend": "Errors", + "disabled": false, + "stepInterval": 60, + "reduceTo": "sum", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [{ "columnName": "#SIGNOZ_VALUE", "order": "desc" }], + "limit": 20 + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-slow-requests", - "type": "table", - "title": "Slowest Requests (Last 1h)", - "description": "Top 20 slowest individual requests", - "gridPos": { "x": 12, "y": 20, "w": 12, "h": 8 }, + "id": "slow-requests", + "title": "Slowest Traces", + "panelTypes": "list", + "description": "Individual traces ordered by duration", + "opacity": "1", + "yAxisUnit": "none", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [ + { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + { "id": "name--string--tag--true", "key": "name", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + { "id": "durationNano--float64--tag--true", "key": "durationNano", "dataType": "float64", "type": "tag", "isColumn": true, "isJSON": false }, + { "id": "hasError--bool--tag--true", "key": "hasError", "dataType": "bool", "type": "tag", "isColumn": true, "isJSON": false } + ], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT name AS operation, traceID, durationNano / 1e6 AS duration_ms, toString(timestamp) AS time, hasError FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND parentSpanID = '' AND timestamp >= now() - INTERVAL 1 HOUR ORDER BY durationNano DESC LIMIT 20" - } - ] - }, - "panelType": "table" - }, - { - "id": "row-page-navigation", - "type": "row", - "title": "Page Navigation Patterns", - "collapsed": true - }, - { - "id": "panel-page-hits", - "type": "graph", - "title": "Page Load Distribution", - "description": "Which dashboard pages are hit most frequently (by server function patterns)", - "gridPos": { "x": 0, "y": 29, "w": 12, "h": 8 }, - "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT CASE WHEN name LIKE '%repositor%' THEN 'Repositories' WHEN name LIKE '%finding%' THEN 'Findings' WHEN name LIKE '%sbom%' THEN 'SBOM' WHEN name LIKE '%dast%' THEN 'DAST' WHEN name LIKE '%graph%' THEN 'Graph' WHEN name LIKE '%chat%' THEN 'Chat' WHEN name LIKE '%scan%' THEN 'Scan Runs' WHEN name LIKE '%overview%' OR name LIKE '%stats%' THEN 'Overview' ELSE 'Other' END AS page, count() AS hits FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND timestamp >= now() - INTERVAL 24 HOUR GROUP BY page ORDER BY hits DESC" - } - ] - }, - "panelType": "bar" - }, - { - "id": "panel-agent-connectivity", - "type": "graph", - "title": "Agent API Connectivity", - "description": "Success vs failure rate of dashboard→agent API calls", - "gridPos": { "x": 12, "y": 29, "w": 12, "h": 8 }, - "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 5 MINUTE) AS ts, countIf(hasError = false) AS success, countIf(hasError = true) AS failed FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND timestamp >= now() - INTERVAL 6 HOUR GROUP BY ts ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "traces", + "aggregateOperator": "noop", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "serviceName--string--tag--true", "key": "serviceName", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "compliance-dashboard" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [{ "columnName": "durationNano", "order": "desc" }], + "limit": null, + "offset": 0, + "pageSize": 10 + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { "id": "row-logs", - "type": "row", "title": "Logs", - "collapsed": false + "panelTypes": "row", + "description": "", + "query": { "queryType": "builder", "builder": { "queryData": [], "queryFormulas": [] }, "promql": [], "clickhouse_sql": [] } }, { - "id": "panel-log-rate", - "type": "graph", - "title": "Log Volume by Severity", - "description": "Log entries per severity level over time", - "gridPos": { "x": 0, "y": 38, "w": 12, "h": 8 }, + "id": "log-rate", + "title": "WARN / ERROR Log Rate", + "panelTypes": "graph", + "description": "Warn and error log entries over time", + "opacity": "1", + "yAxisUnit": "none", + "isStacked": true, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toStartOfInterval(timestamp, INTERVAL 5 MINUTE) AS ts, severity_text AS level, count() AS cnt FROM signoz_logs.distributed_logs_v2 WHERE resources_string['service.name'] = 'compliance-dashboard' AND timestamp >= now() - INTERVAL 6 HOUR GROUP BY ts, level ORDER BY ts" - } - ] - }, - "panelType": "time_series", - "unit": "" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "logs", + "aggregateOperator": "count", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "service.name--string--resource--false", "key": "service.name", "dataType": "string", "type": "resource", "isColumn": false, "isJSON": false }, + "op": "=", + "value": "compliance-dashboard" + }, + { + "id": "f-level", + "key": { "id": "severity_text--string--tag--true", "key": "severity_text", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "in", + "value": ["WARN", "ERROR"] + } + ] + }, + "functions": [], + "groupBy": [ + { "id": "severity_text--string--tag--true", "key": "severity_text", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false } + ], + "having": [], + "legend": "{{severity_text}}", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [], + "limit": null + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } }, { - "id": "panel-recent-errors", - "type": "list", + "id": "error-logs", "title": "Recent Error Logs", - "description": "Last 50 ERROR-level log entries from the dashboard service", - "gridPos": { "x": 12, "y": 38, "w": 12, "h": 8 }, + "panelTypes": "list", + "description": "Latest ERROR-level log entries", + "opacity": "1", + "yAxisUnit": "none", + "isStacked": false, + "nullZeroValues": "zero", + "fillSpans": false, + "mergeAllActiveQueries": false, + "timePreferance": "GLOBAL_TIME", + "columnUnits": {}, + "thresholds": [], + "softMin": 0, + "softMax": 0, + "bucketCount": 30, + "bucketWidth": 0, + "stackedBarChart": false, + "selectedLogFields": [ + { "dataType": "string", "name": "body", "type": "" }, + { "dataType": "string", "name": "timestamp", "type": "" }, + { "dataType": "string", "name": "severity_text", "type": "" } + ], + "selectedTracesFields": [], "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT toString(timestamp) AS time, body AS message, trace_id FROM signoz_logs.distributed_logs_v2 WHERE resources_string['service.name'] = 'compliance-dashboard' AND severity_text = 'ERROR' AND timestamp >= now() - INTERVAL 24 HOUR ORDER BY timestamp DESC LIMIT 50" - } - ] - }, - "panelType": "list" - }, - { - "id": "panel-warn-messages", - "type": "table", - "title": "Top Warning Messages (24h)", - "description": "Most frequent WARN messages — catches connectivity issues, deserialization failures, etc.", - "gridPos": { "x": 0, "y": 46, "w": 24, "h": 8 }, - "query": { - "clickhouse_sql": [ - { - "name": "A", - "query": "SELECT body AS message, count() AS occurrences, max(toString(timestamp)) AS last_seen FROM signoz_logs.distributed_logs_v2 WHERE resources_string['service.name'] = 'compliance-dashboard' AND severity_text = 'WARN' AND timestamp >= now() - INTERVAL 24 HOUR GROUP BY message ORDER BY occurrences DESC LIMIT 30" - } - ] - }, - "panelType": "table" + "queryType": "builder", + "builder": { + "queryData": [ + { + "queryName": "A", + "expression": "A", + "dataSource": "logs", + "aggregateOperator": "noop", + "aggregateAttribute": { "id": "------false", "key": "", "dataType": "", "type": "", "isColumn": false, "isJSON": false }, + "filters": { + "op": "AND", + "items": [ + { + "id": "f-svc", + "key": { "id": "service.name--string--resource--false", "key": "service.name", "dataType": "string", "type": "resource", "isColumn": false, "isJSON": false }, + "op": "=", + "value": "compliance-dashboard" + }, + { + "id": "f-level", + "key": { "id": "severity_text--string--tag--true", "key": "severity_text", "dataType": "string", "type": "tag", "isColumn": true, "isJSON": false }, + "op": "=", + "value": "ERROR" + } + ] + }, + "functions": [], + "groupBy": [], + "having": [], + "legend": "", + "disabled": false, + "stepInterval": 60, + "reduceTo": "avg", + "spaceAggregation": "sum", + "timeAggregation": "rate", + "orderBy": [{ "columnName": "timestamp", "order": "desc" }], + "limit": null, + "offset": 0, + "pageSize": 10 + } + ], + "queryFormulas": [] + }, + "promql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }], + "clickhouse_sql": [{ "name": "A", "query": "", "disabled": false, "legend": "" }] + } } - ], - "variables": { - "time_range": { - "type": "custom", - "label": "Time Range", - "default": "1h", - "options": ["15m", "30m", "1h", "3h", "6h", "12h", "24h", "7d"] - } - } + ] }