seaweedfs/weed/stats
Chris Lu d5e54f217d
feat(s3/lifecycle): publish per-shard cursor + walker gauges and heartbeat (#9486)
Operator visibility was the last item on the daily-replay must-have
list. The `S3LifecycleCursorMinTsNs` gauge already existed but nothing
ever set it — leftover from the streaming worker that got deleted.
Wire it up and add a parallel one for the walker so a single PromQL
query answers "is this thing working?":

- `cursor_min_ts_ns{shard}` set after each cursor save. Operators read
  `now - cursor_min_ts_ns` as the per-shard replay lag.
- `daily_run_last_walked_ns{shard}` new — set in parallel so operators
  can confirm WalkerInterval is actually being honored. A stuck value
  means the scheduler isn't invoking the worker, the throttle is too
  long, or the walker is failing.
- saveCursorAndPublish wraps every Save call site in runShard so the
  gauges and the persisted state stay aligned (gauges only advance on
  successful saves).
- Enhance the `daily_run: status=... duration=...` heartbeat with
  `cursor_lag_max=` and `walked_max_age=` summary tokens for ops grep.
  Existing tokens stay positional-stable; new ones append at the end.
  Marker `cold` distinguishes "not started" from "0s caught up."

Tests pin the summary line: cold-start state, max-across-shards
selection, and partial-fill (some shards drained, others walked).

Stacked on #9485.
2026-05-13 14:18:35 -07:00
..
disk_notsupported.go go fix 2026-02-20 18:42:00 -08:00
disk_openbsd.go fix(stats): fix build on openbsd, solaris, and windows (#8951) 2026-04-06 12:48:48 -07:00
disk_solaris.go fix(stats): fix build on openbsd, solaris, and windows (#8951) 2026-04-06 12:48:48 -07:00
disk_supported.go go fix 2026-02-20 18:42:00 -08:00
disk_windows.go fix(stats): fix build on openbsd, solaris, and windows (#8951) 2026-04-06 12:48:48 -07:00
disk.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
duration_counter_test.go directory structure change to work with glide 2016-06-02 18:09:14 -07:00
duration_counter.go directory structure change to work with glide 2016-06-02 18:09:14 -07:00
http_status_recorder.go chore: add status code for request_total metrics (#5188) 2024-01-10 10:05:27 -08:00
memory_notsupported.go go fix 2026-02-20 18:42:00 -08:00
memory_supported.go go fix 2026-02-20 18:42:00 -08:00
memory.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
metrics_buildinfo_test.go chore: execute goimports to format the code (#7983) 2026-01-07 13:06:08 -08:00
metrics_names.go [volume] refactor and add metrics for flight upload and download data limit condition (#6920) 2025-07-02 18:03:49 -07:00
metrics.go feat(s3/lifecycle): publish per-shard cursor + walker gauges and heartbeat (#9486) 2026-05-13 14:18:35 -07:00
stats.go chore: remove ~50k lines of unreachable dead code (#8913) 2026-04-03 16:04:27 -07:00