Skip to content

Commit 83d20c1

Browse files
authored
[grafana] SpiceDB: add graph for request consistency (#18904)
1 parent 9bde303 commit 83d20c1

File tree

1 file changed

+94
-20
lines changed
  • operations/observability/mixins/meta/dashboards/components

1 file changed

+94
-20
lines changed

operations/observability/mixins/meta/dashboards/components/spicedb.json

Lines changed: 94 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,8 @@
623623
"value": 80
624624
}
625625
]
626-
}
626+
},
627+
"unit": "opm"
627628
},
628629
"overrides": [
629630
{
@@ -687,7 +688,7 @@
687688
"uid": "P4169E866C3094E38"
688689
},
689690
"editorMode": "code",
690-
"expr": "rate (sum (spicedb_cache_hits_total[$__rate_interval]))",
691+
"expr": "sum (increase (spicedb_cache_hits_total[$__rate_interval]))",
691692
"legendFormat": "Hit",
692693
"range": true,
693694
"refId": "A"
@@ -698,23 +699,11 @@
698699
"uid": "P4169E866C3094E38"
699700
},
700701
"editorMode": "code",
701-
"expr": "rate (sum (spicedb_cache_misses_total[$__rate_interval]))",
702+
"expr": "sum (increase (spicedb_cache_misses_total[$__rate_interval]))",
702703
"hide": false,
703704
"legendFormat": "Miss",
704705
"range": true,
705706
"refId": "B"
706-
},
707-
{
708-
"datasource": {
709-
"type": "prometheus",
710-
"uid": "P4169E866C3094E38"
711-
},
712-
"editorMode": "code",
713-
"expr": "spicedb",
714-
"hide": false,
715-
"legendFormat": "__auto",
716-
"range": true,
717-
"refId": "C"
718707
}
719708
],
720709
"title": "Cache Hit & Miss Rates [1m]",
@@ -802,21 +791,106 @@
802791
"uid": "P4169E866C3094E38"
803792
},
804793
"editorMode": "code",
805-
"expr": "rate (sum (spicedb_cache_hits_total[$__rate_interval])) / rate (sum (spicedb_cache_misses_total[$__rate_interval]))",
794+
"expr": "sum (increase (spicedb_cache_hits_total[$__rate_interval])) / sum (increase (spicedb_cache_misses_total[$__rate_interval]))",
806795
"legendFormat": "Ratio",
807796
"range": true,
808797
"refId": "A"
798+
}
799+
],
800+
"title": "Cache Hit/Miss Ratio [1m]",
801+
"type": "timeseries"
802+
},
803+
{
804+
"datasource": {
805+
"type": "prometheus",
806+
"uid": "P4169E866C3094E38"
807+
},
808+
"fieldConfig": {
809+
"defaults": {
810+
"color": {
811+
"mode": "palette-classic"
812+
},
813+
"custom": {
814+
"axisCenteredZero": false,
815+
"axisColorMode": "text",
816+
"axisLabel": "",
817+
"axisPlacement": "auto",
818+
"barAlignment": 0,
819+
"drawStyle": "line",
820+
"fillOpacity": 0,
821+
"gradientMode": "none",
822+
"hideFrom": {
823+
"legend": false,
824+
"tooltip": false,
825+
"viz": false
826+
},
827+
"lineInterpolation": "linear",
828+
"lineWidth": 1,
829+
"pointSize": 5,
830+
"scaleDistribution": {
831+
"type": "linear"
832+
},
833+
"showPoints": "auto",
834+
"spanNulls": false,
835+
"stacking": {
836+
"group": "A",
837+
"mode": "none"
838+
},
839+
"thresholdsStyle": {
840+
"mode": "off"
841+
}
842+
},
843+
"mappings": [],
844+
"thresholds": {
845+
"mode": "absolute",
846+
"steps": [
847+
{
848+
"color": "green",
849+
"value": null
850+
},
851+
{
852+
"color": "red",
853+
"value": 80
854+
}
855+
]
856+
},
857+
"unit": "opm"
809858
},
859+
"overrides": []
860+
},
861+
"gridPos": {
862+
"h": 8,
863+
"w": 12,
864+
"x": 0,
865+
"y": 37
866+
},
867+
"id": 17,
868+
"options": {
869+
"legend": {
870+
"calcs": [],
871+
"displayMode": "list",
872+
"placement": "bottom",
873+
"showLegend": true
874+
},
875+
"tooltip": {
876+
"mode": "single",
877+
"sort": "none"
878+
}
879+
},
880+
"targets": [
810881
{
811882
"datasource": {
812883
"type": "prometheus",
813884
"uid": "P4169E866C3094E38"
814885
},
815-
"hide": false,
816-
"refId": "C"
886+
"editorMode": "code",
887+
"expr": "sum(increase (gitpod_spicedb_requests_check_total[$__rate_interval])) by (consistency)",
888+
"legendFormat": "__auto",
889+
"range": true,
890+
"refId": "A"
817891
}
818892
],
819-
"title": "Cache Hit/Miss Ratio[1m]",
893+
"title": "Check Request Consistency [1m] (client reported)",
820894
"type": "timeseries"
821895
}
822896
],
@@ -846,6 +920,6 @@
846920
"timezone": "utc",
847921
"title": "Gitpod / Components / spicedb",
848922
"uid": "tw0BBk-Vz",
849-
"version": 1,
923+
"version": 2,
850924
"weekStart": "monday"
851925
}

0 commit comments

Comments
 (0)