Skip to content

Commit 8a5ac7d

Browse files
liqian1834twou12031
authored andcommitted
Add a trend analysis chart to the dashboard for continuous profiling.
1 parent c155b18 commit 8a5ac7d

File tree

1 file changed

+117
-5
lines changed

1 file changed

+117
-5
lines changed

dashboards/DeepFlow-Templates/Continuous-Profiling.json

Lines changed: 117 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"editable": true,
2525
"fiscalYearStartMonth": 0,
2626
"graphTooltip": 0,
27-
"id": 123,
2827
"links": [],
2928
"liveNow": false,
3029
"panels": [
@@ -45,7 +44,7 @@
4544
"h": 7,
4645
"w": 23,
4746
"x": 0,
48-
"y": 1
47+
"y": 9
4948
},
5049
"id": 15,
5150
"options": {
@@ -83,12 +82,126 @@
8382
"type": "deepflowio-deepflow-datasource",
8483
"uid": "${datasource}"
8584
},
85+
"fieldConfig": {
86+
"defaults": {
87+
"color": {
88+
"mode": "palette-classic"
89+
},
90+
"custom": {
91+
"axisBorderShow": false,
92+
"axisCenteredZero": false,
93+
"axisColorMode": "text",
94+
"axisLabel": "",
95+
"axisPlacement": "auto",
96+
"barAlignment": 0,
97+
"drawStyle": "bars",
98+
"fillOpacity": 0,
99+
"gradientMode": "none",
100+
"hideFrom": {
101+
"legend": false,
102+
"tooltip": false,
103+
"viz": false
104+
},
105+
"insertNulls": false,
106+
"lineInterpolation": "linear",
107+
"lineWidth": 1,
108+
"pointSize": 5,
109+
"scaleDistribution": {
110+
"type": "linear"
111+
},
112+
"showPoints": "auto",
113+
"spanNulls": false,
114+
"stacking": {
115+
"group": "A",
116+
"mode": "none"
117+
},
118+
"thresholdsStyle": {
119+
"mode": "off"
120+
}
121+
},
122+
"mappings": [],
123+
"thresholds": {
124+
"mode": "absolute",
125+
"steps": [
126+
{
127+
"color": "green",
128+
"value": null
129+
},
130+
{
131+
"color": "red",
132+
"value": 80
133+
}
134+
]
135+
},
136+
"unit": "µs"
137+
},
138+
"overrides": []
139+
},
86140
"gridPos": {
87-
"h": 27,
141+
"h": 8,
88142
"w": 24,
89143
"x": 0,
90144
"y": 2
91145
},
146+
"id": 19,
147+
"options": {
148+
"legend": {
149+
"calcs": [],
150+
"displayMode": "list",
151+
"placement": "bottom",
152+
"showLegend": true
153+
},
154+
"tooltip": {
155+
"mode": "single",
156+
"sort": "none"
157+
}
158+
},
159+
"targets": [
160+
{
161+
"datasource": {
162+
"type": "deepflowio-deepflow-datasource",
163+
"uid": "${datasource}"
164+
},
165+
"debug": false,
166+
"metaExtra": {},
167+
"queryText": "{\"appType\":\"trafficQuery\",\"db\":\"profile\",\"sources\":\"\",\"from\":\"in_process\",\"select\":[{\"key\":\"profile_value\",\"func\":\"Sum\",\"op\":\"\",\"val\":\"\",\"as\":\"\",\"params\":[],\"uuid\":\"16003ce5-61b8-f842-f019-f9dfe2a6c254\",\"type\":\"metric\",\"subFuncs\":[],\"whereOnly\":false,\"isResourceType\":false,\"isIpType\":false,\"cache\":{\"func\":\"Sum\",\"params\":[]}}],\"where\":[{\"key\":\"app_service\",\"func\":\"\",\"op\":\"LIKE\",\"val\":[{\"label\":\"$app_service\",\"value\":\"app_service\",\"isVariable\":true,\"variableType\":\"query\"}],\"as\":\"\",\"params\":[],\"uuid\":\"b4701039-2e0b-54d3-6de0-8dc8b8d8ed9a\",\"type\":\"tag\",\"subFuncs\":[],\"whereOnly\":false,\"isResourceType\":false,\"isIpType\":false},{\"type\":\"tag\",\"key\":\"pod_cluster\",\"func\":\"\",\"op\":\"LIKE\",\"val\":[{\"label\":\"$cluster\",\"value\":\"cluster\",\"isVariable\":true,\"variableType\":\"query\"}],\"as\":\"\",\"params\":[],\"uuid\":\"1c32c5eb-15e4-4043-63cd-b10f29746b6f\",\"subFuncs\":[],\"whereOnly\":false,\"isResourceType\":true,\"isIpType\":false},{\"type\":\"tag\",\"key\":\"pod_ns\",\"func\":\"\",\"op\":\"LIKE\",\"val\":[{\"label\":\"$namespace\",\"value\":\"namespace\",\"isVariable\":true,\"variableType\":\"query\"}],\"as\":\"\",\"params\":[],\"uuid\":\"24c12fb6-5847-0efe-3198-98ab6d18d7aa\",\"subFuncs\":[],\"whereOnly\":false,\"isResourceType\":true,\"isIpType\":false},{\"type\":\"tag\",\"key\":\"auto_service\",\"func\":\"\",\"op\":\"LIKE\",\"val\":[{\"label\":\"$auto_service\",\"value\":\"auto_service\",\"isVariable\":true,\"variableType\":\"query\"}],\"as\":\"\",\"params\":[],\"uuid\":\"e0b8122c-30ca-d3d7-97b5-a6959822f5df\",\"subFuncs\":[],\"whereOnly\":false,\"isResourceType\":true,\"isIpType\":false},{\"type\":\"tag\",\"key\":\"auto_instance\",\"func\":\"\",\"op\":\"LIKE\",\"val\":[{\"label\":\"$auto_instance\",\"value\":\"auto_instance\",\"isVariable\":true,\"variableType\":\"query\"}],\"as\":\"\",\"params\":[],\"uuid\":\"614e1cca-61e1-eb87-d034-1f9bc90be562\",\"subFuncs\":[],\"whereOnly\":false,\"isResourceType\":true,\"isIpType\":false}],\"having\":[{\"key\":\"\",\"func\":\"\",\"op\":\"\",\"val\":\"\",\"as\":\"\",\"params\":[],\"uuid\":\"4652f639-8e9d-fd91-5cbe-ddb381c0119b\",\"type\":\"metric\"}],\"groupBy\":[{\"key\":\"profile_event_type\",\"func\":\"\",\"op\":\"\",\"val\":\"\",\"as\":\"\",\"params\":[],\"uuid\":\"7175a4cc-873a-61f5-dbd5-09cf9a42cd84\",\"type\":\"tag\",\"subFuncs\":[],\"whereOnly\":false,\"isResourceType\":false,\"isIpType\":false}],\"orderBy\":[{\"key\":\"\",\"func\":\"\",\"op\":\"\",\"val\":\"\",\"as\":\"\",\"params\":[],\"uuid\":\"ce565b85-e930-a4af-79fd-f185c30029b2\",\"type\":\"metric\",\"sort\":\"asc\"}],\"interval\":\"$__interval\",\"slimit\":\"\",\"limit\":\"10000\",\"offset\":\"\",\"formatAs\":\"timeSeries\",\"alias\":\"\",\"showMetrics\":-1,\"tracingId\":null}",
168+
"refId": "A",
169+
"returnMetrics": [
170+
{
171+
"displayName": "Sum(profile_value)",
172+
"name": "Sum(profile_value)",
173+
"type": 1,
174+
"unit": ""
175+
}
176+
],
177+
"returnTags": [
178+
{
179+
"displayName": "time_value",
180+
"isResource": false,
181+
"name": "`time_value`"
182+
},
183+
{
184+
"displayName": "剖析类型",
185+
"isResource": false,
186+
"name": "profile_event_type"
187+
}
188+
],
189+
"sql": "SELECT Sum(`profile_value`) AS `Sum(profile_value)`, time(time, $__interval) AS `time_value`, profile_event_type FROM in_process WHERE Enum(`app_service`) = 'greptime' AND `pod_cluster` = 'k8s-d-ErYTIDu3A3' AND `pod_ns` = 'greptimedb-cluster' AND `auto_service` = 'greptimedb-datanode' AND time>=1723698606 AND time<=1723709406 GROUP BY `time_value`, profile_event_type SLIMIT 20 LIMIT 10000"
190+
}
191+
],
192+
"type": "timeseries"
193+
},
194+
{
195+
"datasource": {
196+
"type": "deepflowio-deepflow-datasource",
197+
"uid": "${datasource}"
198+
},
199+
"gridPos": {
200+
"h": 27,
201+
"w": 24,
202+
"x": 0,
203+
"y": 10
204+
},
92205
"id": 17,
93206
"targets": [
94207
{
@@ -105,7 +218,6 @@
105218
"sql": "SELECT * FROM in_process WHERE `app_service` IN ('Total') AND `profile_language_type` IN ('eBPF') AND `profile_event_type` IN ('on-cpu') AND `auto_service` = '10.233.90.201' AND time>=1723443316 AND time<=1723444216 LIMIT 100"
106219
}
107220
],
108-
"title": "Panel Title",
109221
"type": "flamegraph"
110222
}
111223
],
@@ -276,6 +388,6 @@
276388
"timezone": "",
277389
"title": "Continuous Profiling",
278390
"uid": "Continuous_Profiling",
279-
"version": 2,
391+
"version": 1,
280392
"weekStart": ""
281393
}

0 commit comments

Comments
 (0)