Commit 2710bae
committed
feat(metrics): add gossip arrival-time histograms and position counters
Network health had plenty of block-production timing but nothing about
reception timing, so "are votes arriving late, or not arriving at all?" could
only be answered out-of-band with tooling/event-monitor's collector-side clock.
Adds three histograms recording the absolute distance between a gossip
message's arrival and the start of the interval it was due in, plus three
counters splitting arrivals into before/inside/after that interval. The
interval is what counts as inside, not the slot: an attestation landing in its
own slot's aggregation interval missed the production interval it was due in,
so it reads as after.
Aggregates anchor to the most recent aggregation-interval boundary instead of
their own data.slot, since a stale-group catch-up aggregate legitimately
carries an older slot and would otherwise fill the histogram with large values
that are not a health problem. That bounds their delay to one slot and makes
before unreachable, so the aggregate counter does not export that series.
Blocks are sampled only when received on gossip; req/resp sync backfill
delivers them many slots after they were due and would swamp the histogram.
Threading a BlockSource through new_block to tell the two apart also fixes
ChainEvent::BlockGossip, which events.rs already documents as gossip-only yet
until now also fired for sync-fetched blocks.1 parent 32700c8 commit 2710bae
6 files changed
Lines changed: 406 additions & 9 deletions
File tree
- crates
- blockchain/src
- net
- api/src
- p2p/src
- gossipsub
- req_resp
- docs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
112 | 126 | | |
113 | 127 | | |
114 | 128 | | |
| |||
1367 | 1381 | | |
1368 | 1382 | | |
1369 | 1383 | | |
1370 | | - | |
1371 | | - | |
1372 | | - | |
1373 | | - | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
1374 | 1402 | | |
1375 | 1403 | | |
1376 | 1404 | | |
1377 | 1405 | | |
1378 | 1406 | | |
1379 | 1407 | | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
1380 | 1415 | | |
1381 | 1416 | | |
1382 | 1417 | | |
| |||
1390 | 1425 | | |
1391 | 1426 | | |
1392 | 1427 | | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
1393 | 1431 | | |
1394 | 1432 | | |
1395 | 1433 | | |
| |||
1478 | 1516 | | |
1479 | 1517 | | |
1480 | 1518 | | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
0 commit comments