Skip to content

Commit e80bc4b

Browse files
Distinguish all vs local events being persisted in the "Event Send Time Quantiles" graph (#18510)
(Applies to the Grafana graphs) As discovered by @devonh, we use `synapse_storage_events_persisted_events_total` (which tracks *all* persisted events) for the "Events" rate in the "Event Send Time Quantiles" graph. This is pretty misleading as I would expect it to be the rate of events being sent given the graph title, "Event Send Time Quantiles". Since the event persistence queues are shared for local and remote events from federation and will block local events being sent, I think it does still make sense to have the event persist rate. I've updated the graph to include the rate of "Local events being persisted" and the rate of "All events being persisted". I think this properly disambiguates and clarifies what the graph is trying to show.
1 parent 865d43b commit e80bc4b

File tree

2 files changed

+66
-31
lines changed

2 files changed

+66
-31
lines changed

changelog.d/18510.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Distinguish all vs local events being persisted in the "Event Send Time Quantiles" graph (Grafana).

contrib/grafana/synapse.json

Lines changed: 65 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -220,29 +220,24 @@
220220
"yBucketBound": "auto"
221221
},
222222
{
223-
"aliasColors": {},
224-
"bars": false,
225-
"dashLength": 10,
226-
"dashes": false,
227223
"datasource": {
228-
"uid": "${DS_PROMETHEUS}"
224+
"uid": "${DS_PROMETHEUS}",
225+
"type": "prometheus"
229226
},
230-
"description": "",
227+
"aliasColors": {},
228+
"dashLength": 10,
231229
"fieldConfig": {
232230
"defaults": {
233231
"links": []
234232
},
235233
"overrides": []
236234
},
237-
"fill": 0,
238-
"fillGradient": 0,
239235
"gridPos": {
240236
"h": 9,
241237
"w": 12,
242238
"x": 12,
243239
"y": 1
244240
},
245-
"hiddenSeries": false,
246241
"id": 152,
247242
"legend": {
248243
"avg": false,
@@ -255,71 +250,81 @@
255250
"values": false
256251
},
257252
"lines": true,
258-
"linewidth": 0,
259-
"links": [],
260253
"nullPointMode": "connected",
261254
"options": {
262255
"alertThreshold": true
263256
},
264257
"paceLength": 10,
265-
"percentage": false,
266-
"pluginVersion": "9.2.2",
258+
"pluginVersion": "10.4.3",
267259
"pointradius": 5,
268-
"points": false,
269260
"renderer": "flot",
270261
"seriesOverrides": [
271262
{
272263
"alias": "Avg",
273264
"fill": 0,
274-
"linewidth": 3
265+
"linewidth": 3,
266+
"$$hashKey": "object:48"
275267
},
276268
{
277269
"alias": "99%",
278270
"color": "#C4162A",
279-
"fillBelowTo": "90%"
271+
"fillBelowTo": "90%",
272+
"$$hashKey": "object:49"
280273
},
281274
{
282275
"alias": "90%",
283276
"color": "#FF7383",
284-
"fillBelowTo": "75%"
277+
"fillBelowTo": "75%",
278+
"$$hashKey": "object:50"
285279
},
286280
{
287281
"alias": "75%",
288282
"color": "#FFEE52",
289-
"fillBelowTo": "50%"
283+
"fillBelowTo": "50%",
284+
"$$hashKey": "object:51"
290285
},
291286
{
292287
"alias": "50%",
293288
"color": "#73BF69",
294-
"fillBelowTo": "25%"
289+
"fillBelowTo": "25%",
290+
"$$hashKey": "object:52"
295291
},
296292
{
297293
"alias": "25%",
298294
"color": "#1F60C4",
299-
"fillBelowTo": "5%"
295+
"fillBelowTo": "5%",
296+
"$$hashKey": "object:53"
300297
},
301298
{
302299
"alias": "5%",
303-
"lines": false
300+
"lines": false,
301+
"$$hashKey": "object:54"
304302
},
305303
{
306304
"alias": "Average",
307305
"color": "rgb(255, 255, 255)",
308306
"lines": true,
309-
"linewidth": 3
307+
"linewidth": 3,
308+
"$$hashKey": "object:55"
310309
},
311310
{
312-
"alias": "Events",
311+
"alias": "Local events being persisted",
312+
"color": "#96d98D",
313+
"points": true,
314+
"yaxis": 2,
315+
"zindex": -3,
316+
"$$hashKey": "object:56"
317+
},
318+
{
319+
"$$hashKey": "object:329",
313320
"color": "#B877D9",
314-
"hideTooltip": true,
321+
"alias": "All events being persisted",
315322
"points": true,
316323
"yaxis": 2,
317324
"zindex": -3
318325
}
319326
],
320327
"spaceLength": 10,
321-
"stack": false,
322-
"steppedLine": false,
323328
"targets": [
324329
{
325330
"datasource": {
@@ -384,7 +389,20 @@
384389
},
385390
"expr": "sum(rate(synapse_http_server_response_time_seconds_sum{servlet='RoomSendEventRestServlet',index=~\"$index\",instance=\"$instance\",code=~\"2..\"}[$bucket_size])) / sum(rate(synapse_http_server_response_time_seconds_count{servlet='RoomSendEventRestServlet',index=~\"$index\",instance=\"$instance\",code=~\"2..\"}[$bucket_size]))",
386391
"legendFormat": "Average",
387-
"refId": "H"
392+
"refId": "H",
393+
"editorMode": "code",
394+
"range": true
395+
},
396+
{
397+
"datasource": {
398+
"uid": "${DS_PROMETHEUS}"
399+
},
400+
"expr": "sum(rate(synapse_http_server_response_time_seconds_count{servlet='RoomSendEventRestServlet',index=~\"$index\",instance=\"$instance\",code=~\"2..\"}[$bucket_size]))",
401+
"hide": false,
402+
"instant": false,
403+
"legendFormat": "Local events being persisted",
404+
"refId": "E",
405+
"editorMode": "code"
388406
},
389407
{
390408
"datasource": {
@@ -393,8 +411,9 @@
393411
"expr": "sum(rate(synapse_storage_events_persisted_events_total{instance=\"$instance\"}[$bucket_size]))",
394412
"hide": false,
395413
"instant": false,
396-
"legendFormat": "Events",
397-
"refId": "E"
414+
"legendFormat": "All events being persisted",
415+
"refId": "I",
416+
"editorMode": "code"
398417
}
399418
],
400419
"thresholds": [
@@ -428,7 +447,9 @@
428447
"xaxis": {
429448
"mode": "time",
430449
"show": true,
431-
"values": []
450+
"values": [],
451+
"name": null,
452+
"buckets": null
432453
},
433454
"yaxes": [
434455
{
@@ -450,7 +471,20 @@
450471
],
451472
"yaxis": {
452473
"align": false
453-
}
474+
},
475+
"bars": false,
476+
"dashes": false,
477+
"description": "",
478+
"fill": 0,
479+
"fillGradient": 0,
480+
"hiddenSeries": false,
481+
"linewidth": 0,
482+
"percentage": false,
483+
"points": false,
484+
"stack": false,
485+
"steppedLine": false,
486+
"timeFrom": null,
487+
"timeShift": null
454488
},
455489
{
456490
"aliasColors": {},

0 commit comments

Comments
 (0)