Skip to content

Commit

Permalink
chore(orchestrator): CON-1231 Remove unused metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
eichhorl committed Jan 31, 2024
1 parent a88096e commit a212196
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
12 changes: 4 additions & 8 deletions rs/orchestrator/src/firewall.rs
Expand Up @@ -468,16 +468,12 @@ impl Firewall {
"Checking for firewall config registry version: {}", registry_version
);

match self.check_for_firewall_config(registry_version).await {
Ok(()) => self
.metrics
.datacenter_registry_version
.set(registry_version.get() as i64),
Err(e) => info!(
if let Err(e) = self.check_for_firewall_config(registry_version).await {
info!(
self.logger,
"Failed to check for firewall config at version {}: {}", registry_version, e
),
};
)
}
}

pub fn get_last_applied_version(&self) -> Arc<RwLock<RegistryVersion>> {
Expand Down
16 changes: 0 additions & 16 deletions rs/orchestrator/src/metrics.rs
Expand Up @@ -6,10 +6,6 @@ pub const PROMETHEUS_HTTP_PORT: u16 = 9091;

#[derive(Clone)]
pub struct OrchestratorMetrics {
pub heart_beat_count: IntCounter,
pub resident_mem_used: IntGauge,
/// Registry version last used to successfully fetch datacenter information
pub datacenter_registry_version: IntGauge,
pub ssh_access_registry_version: IntGauge,
pub firewall_registry_version: IntGauge,
pub reboot_duration: IntGauge,
Expand Down Expand Up @@ -45,18 +41,6 @@ impl KeyRotationStatus {
impl OrchestratorMetrics {
pub fn new(metrics_registry: &ic_metrics::MetricsRegistry) -> Self {
Self {
heart_beat_count: metrics_registry.int_counter(
"replica_heart_beat_count",
"Number of times a process heart beat has been observed for the Subnet Replica",
),
resident_mem_used: metrics_registry.int_gauge(
"replica_resident_memory_used",
"Resident memory allocated by the Subnet Replica in bytes",
),
datacenter_registry_version: metrics_registry.int_gauge(
"datacenter_registry_version",
"Registry version last used to successfully fetch datacenter information",
),
ssh_access_registry_version: metrics_registry.int_gauge(
"ssh_access_registry_version",
"Registry version last used to update the SSH public keys",
Expand Down

0 comments on commit a212196

Please sign in to comment.