Commit 5106818
authored
Refactor
Refactor `GaugeBucketCollector` metrics to be homeserver-scoped
Part of #18592
### Testing strategy
1. Add the `metrics` listener in your `homeserver.yaml`
```yaml
listeners:
# This is just showing how to configure metrics either way
#
# `http` `metrics` resource
- port: 9322
type: http
bind_addresses: ['127.0.0.1']
resources:
- names: [metrics]
compress: false
# `metrics` listener
- port: 9323
type: metrics
bind_addresses: ['127.0.0.1']
```
1. Start the homeserver: `poetry run synapse_homeserver --config-path
homeserver.yaml`
1. Fetch `http://localhost:9322/_synapse/metrics` and/or
`http://localhost:9323/metrics`
1. Adjust the number of [`msecs` in the `looping_call` so that
`_read_forward_extremities`](https://github.com/element-hq/synapse/blob/a82b8a966a7dbe218cb788548683a83ec404e468/synapse/storage/databases/main/metrics.py#L79)
runs immediately instead of after an hour.
1. Observe response includes the `synapse_forward_extremities` and
`synapse_excess_extremity_events` metrics with the `server_name` labelGaugeBucketCollector metrics to be homeserver-scoped (#18715)1 parent f13a136 commit 5106818
File tree
4 files changed
+97
-29
lines changed- changelog.d
- synapse
- metrics
- storage/databases/main
- tests/storage/databases/main
4 files changed
+97
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
343 | 344 | | |
344 | 345 | | |
345 | 346 | | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
346 | 392 | | |
347 | 393 | | |
348 | 394 | | |
| |||
355 | 401 | | |
356 | 402 | | |
357 | 403 | | |
| 404 | + | |
358 | 405 | | |
359 | 406 | | |
360 | 407 | | |
361 | 408 | | |
362 | 409 | | |
363 | 410 | | |
| 411 | + | |
364 | 412 | | |
365 | 413 | | |
| 414 | + | |
366 | 415 | | |
367 | 416 | | |
368 | 417 | | |
| |||
376 | 425 | | |
377 | 426 | | |
378 | 427 | | |
| 428 | + | |
379 | 429 | | |
380 | 430 | | |
381 | 431 | | |
| |||
387 | 437 | | |
388 | 438 | | |
389 | 439 | | |
390 | | - | |
| 440 | + | |
391 | 441 | | |
392 | 442 | | |
393 | 443 | | |
| |||
396 | 446 | | |
397 | 447 | | |
398 | 448 | | |
399 | | - | |
| 449 | + | |
400 | 450 | | |
401 | 451 | | |
402 | 452 | | |
403 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
404 | 458 | | |
405 | | - | |
| 459 | + | |
406 | 460 | | |
407 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
408 | 469 | | |
409 | 470 | | |
410 | 471 | | |
| |||
422 | 483 | | |
423 | 484 | | |
424 | 485 | | |
425 | | - | |
426 | | - | |
427 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
428 | 491 | | |
429 | 492 | | |
430 | 493 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | | - | |
58 | | - | |
| 58 | + | |
| 59 | + | |
59 | 60 | | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
103 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
104 | 108 | | |
105 | 109 | | |
106 | | - | |
| 110 | + | |
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
| |||
Lines changed: 15 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
0 commit comments