feature: Prometheus Metrics, Supervisor Dashboard, and Promotion Retry Job

This commit is contained in:
voltsrage
2026-06-27 13:29:04 +08:00
parent e22d33b654
commit 04bdb7e85c
31 changed files with 4482 additions and 259 deletions
@@ -138,6 +138,10 @@ public class VerificationService : IVerificationService
await _db.SaveChangesAsync();
DiagnosticsMetrics.RejectionTotal
.WithLabels("verification_failed")
.Inc();
_logger.LogInformation(
"Batch {BatchId} verification failed by {VerifierUserId}, rejected",
batchId, verifierUserId);
@@ -206,6 +210,13 @@ public class VerificationService : IVerificationService
await _db.SaveChangesAsync();
var category = previousStatus == BatchStatus.AwaitingClinicalApproval
? "clinical_rejected"
: "verification_failed";
DiagnosticsMetrics.RejectionTotal
.WithLabels(category)
.Inc();
_logger.LogInformation(
"Batch {BatchId} rejected by {ActorUserId} from {PreviousStatus}: {Reason}",
batchId, actorUserId, previousStatus.ToDbString(), request.Reason);