Run initial test for Climate Resilience Verification Suite
Add first part of Alert Quality Analytics
This commit is contained in:
@@ -132,35 +132,55 @@ public sealed class ClinicalMetrics
|
||||
Buckets = new[] { 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0 }
|
||||
});
|
||||
|
||||
// --- Gauges (set by background collectors, not incremented inline) ---
|
||||
// --- Gauges (set by background collectors, not incremented inline) ---
|
||||
|
||||
// The most clinically significant panel. A non-zero value means a patient's
|
||||
// critical alert has gone unacknowledged for more than 5 minutes.
|
||||
// In a real deployment this panel drives an on-call pager alert at the nurse station.
|
||||
public readonly Gauge AlertsUnacknowledgedGauge = Metrics.CreateGauge(
|
||||
"alerts_unacknowledged_gauge",
|
||||
"Count of open CRITICAL alerts older than 5 minutes with no acknowledgment.");
|
||||
// The most clinically significant panel. A non-zero value means a patient's
|
||||
// critical alert has gone unacknowledged for more than 5 minutes.
|
||||
// In a real deployment this panel drives an on-call pager alert at the nurse station.
|
||||
public readonly Gauge AlertsUnacknowledgedGauge = Metrics.CreateGauge(
|
||||
"alerts_unacknowledged_gauge",
|
||||
"Count of open CRITICAL alerts older than 5 minutes with no acknowledgment.");
|
||||
|
||||
// Per consumer group so the dashboard can show whether es-indexer, sepsis-engine,
|
||||
// or data-lake-writer is falling behind the observation stream.
|
||||
public readonly Gauge KafkaConsumerLag = Metrics.CreateGauge(
|
||||
"kafka_consumer_lag",
|
||||
"Approximate consumer group lag in messages, labeled by consumer group.",
|
||||
labelNames: new[] { "consumer_group" });
|
||||
// Per consumer group so the dashboard can show whether es-indexer, sepsis-engine,
|
||||
// or data-lake-writer is falling behind the observation stream.
|
||||
public readonly Gauge KafkaConsumerLag = Metrics.CreateGauge(
|
||||
"kafka_consumer_lag",
|
||||
"Approximate consumer group lag in messages, labeled by consumer group.",
|
||||
labelNames: new[] { "consumer_group" });
|
||||
|
||||
// An outbox that is growing means the relay is not keeping up or Kafka is unavailable.
|
||||
// In a patient safety system, a growing outbox delays alert delivery to all consumers.
|
||||
public readonly Gauge OutboxPendingEvents = Metrics.CreateGauge(
|
||||
"outbox_pending_events",
|
||||
"Count of outbox events not yet relayed to Kafka.");
|
||||
// An outbox that is growing means the relay is not keeping up or Kafka is unavailable.
|
||||
// In a patient safety system, a growing outbox delays alert delivery to all consumers.
|
||||
public readonly Gauge OutboxPendingEvents = Metrics.CreateGauge(
|
||||
"outbox_pending_events",
|
||||
"Count of outbox events not yet relayed to Kafka.");
|
||||
|
||||
public readonly Gauge WardGatewaysOffline = Metrics.CreateGauge(
|
||||
"ward_gateways_offline_gauge",
|
||||
"Ward gateways with status OFFLINE or DEGRADED",
|
||||
labelNames: new[] { "site_code" });
|
||||
public readonly Gauge WardGatewaysOffline = Metrics.CreateGauge(
|
||||
"ward_gateways_offline_gauge",
|
||||
"Ward gateways with status OFFLINE or DEGRADED",
|
||||
labelNames: new[] { "site_code" });
|
||||
|
||||
public readonly Gauge WardGatewayBufferDepth = Metrics.CreateGauge(
|
||||
"ward_gateway_buffer_depth",
|
||||
"Reported unsynced event count per gateway",
|
||||
labelNames: new[] { "gateway_code", "department" });
|
||||
public readonly Gauge WardGatewayBufferDepth = Metrics.CreateGauge(
|
||||
"ward_gateway_buffer_depth",
|
||||
"Reported unsynced event count per gateway",
|
||||
labelNames: new[] { "gateway_code", "department" });
|
||||
|
||||
public readonly Gauge AlertAcknowledgementRate = Metrics.CreateGauge(
|
||||
"vigilcare_alert_acknowledgement_rate",
|
||||
"Alert acknowledgement rate by type.",
|
||||
labelNames: new[] { "alert_type" });
|
||||
|
||||
public readonly Gauge AlertFalsePositiveRate = Metrics.CreateGauge(
|
||||
"vigilcare_alert_false_positive_rate",
|
||||
"Clinician-reported false positive rate by type.",
|
||||
labelNames: new[] { "alert_type" });
|
||||
|
||||
public readonly Gauge AlertUsefulRate = Metrics.CreateGauge(
|
||||
"vigilcare_alert_useful_rate",
|
||||
"Clinician-reported useful rate by type.",
|
||||
labelNames: new[] { "alert_type" });
|
||||
|
||||
public readonly Gauge AlertAvgAckSeconds = Metrics.CreateGauge(
|
||||
"vigilcare_alert_avg_ack_seconds",
|
||||
"Average seconds from trigger to acknowledgement by type.",
|
||||
labelNames: new[] { "alert_type" });
|
||||
}
|
||||
Reference in New Issue
Block a user