Commit ed2fea0
## 🗒️ Description / Motivation
Implements the new cross-client counter
`lean_aggregator_skipped_total{reason=...}` proposed in [leanMetrics PR
#36](leanEthereum/leanMetrics#36), so operators
can attribute missed aggregations directly instead of deriving them from
coverage gauges or logs.
## What Changed
| reason | When it fires in ethlambda |
|---|---|
| `not_aggregator` | Every interval-2 tick where the aggregator flag is
off — separates "no duty" from genuine misses |
| `other` | Aggregation jobs the worker never reached because the 750 ms
session deadline (or actor shutdown) cancelled it, incremented by the
number of dropped jobs |
| `not_synced`, `missing_state`, `spawn_failed` | Never fire — ethlambda
has no sync gate on aggregation, no per-target pre-state resolution, and
`spawn_blocking` cannot fail to start. Seeded at zero so fleet
dashboards see the full label set |
- `crates/blockchain/src/metrics.rs`: `IntCounterVec` registration,
reason-list const documenting the never-firing labels, two `inc_*`
helpers, init seeding
- `crates/blockchain/src/lib.rs`: count the skip at the interval-2 tick
when not an aggregator
- `crates/blockchain/src/aggregation.rs`: track attempted vs. total jobs
in `run_aggregation_worker` and count the dropped remainder on
cancellation
## ✅ Verification Checklist
- [x] Ran `make fmt` — clean
- [x] Ran `make lint` (clippy with `-D warnings`) — clean
- [x] `cargo test -p ethlambda-blockchain --lib` — 29 passed
Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
1 parent 7ca0b5e commit ed2fea0
3 files changed
Lines changed: 71 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| 406 | + | |
| 407 | + | |
406 | 408 | | |
407 | 409 | | |
408 | 410 | | |
409 | 411 | | |
410 | 412 | | |
| 413 | + | |
411 | 414 | | |
412 | 415 | | |
413 | 416 | | |
| |||
450 | 453 | | |
451 | 454 | | |
452 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
453 | 463 | | |
454 | 464 | | |
455 | 465 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
258 | | - | |
259 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
260 | 267 | | |
261 | 268 | | |
262 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
516 | 543 | | |
517 | 544 | | |
518 | 545 | | |
| |||
588 | 615 | | |
589 | 616 | | |
590 | 617 | | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
591 | 625 | | |
592 | 626 | | |
593 | 627 | | |
| |||
725 | 759 | | |
726 | 760 | | |
727 | 761 | | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
728 | 779 | | |
729 | 780 | | |
730 | 781 | | |
| |||
0 commit comments