feat(scanner): expose cycle progress metrics (#3152)

Co-authored-by: Henry Guo <marshawcoco@users.noreply.github.com>
Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
Henry Guo
2026-06-01 15:54:39 +08:00
committed by GitHub
parent cbb6f9c76f
commit f3bd838925
6 changed files with 454 additions and 6 deletions
@@ -282,9 +282,21 @@ pub enum MetricName {
ScannerCurrentCycle,
ScannerCompletedCycles,
ScannerCurrentCycleAgeSeconds,
ScannerCurrentCycleObjectsScanned,
ScannerCurrentCycleDirectoriesScanned,
ScannerCurrentCycleBucketDriveScans,
ScannerCurrentCycleObjectsPerSecond,
ScannerCurrentCycleDirectoriesPerSecond,
ScannerCurrentCycleBucketDriveScansPerSecond,
ScannerCurrentScanMode,
ScannerLastCycleResult,
ScannerLastCycleDurationSeconds,
ScannerLastCycleObjectsScanned,
ScannerLastCycleDirectoriesScanned,
ScannerLastCycleBucketDriveScans,
ScannerLastCycleObjectsPerSecond,
ScannerLastCycleDirectoriesPerSecond,
ScannerLastCycleBucketDriveScansPerSecond,
ScannerFailedCycles,
// CPU system-related metrics
@@ -630,9 +642,21 @@ impl MetricName {
Self::ScannerCurrentCycle => "current_cycle".to_string(),
Self::ScannerCompletedCycles => "completed_cycles".to_string(),
Self::ScannerCurrentCycleAgeSeconds => "current_cycle_age_seconds".to_string(),
Self::ScannerCurrentCycleObjectsScanned => "current_cycle_objects_scanned".to_string(),
Self::ScannerCurrentCycleDirectoriesScanned => "current_cycle_directories_scanned".to_string(),
Self::ScannerCurrentCycleBucketDriveScans => "current_cycle_bucket_drive_scans".to_string(),
Self::ScannerCurrentCycleObjectsPerSecond => "current_cycle_objects_per_second".to_string(),
Self::ScannerCurrentCycleDirectoriesPerSecond => "current_cycle_directories_per_second".to_string(),
Self::ScannerCurrentCycleBucketDriveScansPerSecond => "current_cycle_bucket_drive_scans_per_second".to_string(),
Self::ScannerCurrentScanMode => "current_scan_mode".to_string(),
Self::ScannerLastCycleResult => "last_cycle_result".to_string(),
Self::ScannerLastCycleDurationSeconds => "last_cycle_duration_seconds".to_string(),
Self::ScannerLastCycleObjectsScanned => "last_cycle_objects_scanned".to_string(),
Self::ScannerLastCycleDirectoriesScanned => "last_cycle_directories_scanned".to_string(),
Self::ScannerLastCycleBucketDriveScans => "last_cycle_bucket_drive_scans".to_string(),
Self::ScannerLastCycleObjectsPerSecond => "last_cycle_objects_per_second".to_string(),
Self::ScannerLastCycleDirectoriesPerSecond => "last_cycle_directories_per_second".to_string(),
Self::ScannerLastCycleBucketDriveScansPerSecond => "last_cycle_bucket_drive_scans_per_second".to_string(),
Self::ScannerFailedCycles => "failed_cycles".to_string(),
// CPU system-related metrics