Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/agent/src/instrumentation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl AgentMetricsState {
pub fn create_metrics(meter: Meter) -> Arc<AgentMetricsState> {
let http_counter = meter
.u64_counter("http_requests")
.with_description("Total number of HTTP requests made.")
.with_description("Number of HTTP requests made.")
.build();
let http_req_latency_histogram: Histogram<f64> = meter
.f64_histogram("request_latency")
Expand Down
2 changes: 1 addition & 1 deletion crates/api-core/src/handlers/machine_scout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ fn record_reboot_duration_metric(
log = warn,
metric = counter,
message = "Failed to wake up state handler for machine",
describe = "The amount of times a machine's state handler could not be woken after a \
describe = "Number of times a machine's state handler could not be woken after a \
scout-reported event"
)]
struct StateHandlerWakeupFailed {
Expand Down
2 changes: 1 addition & 1 deletion crates/api-core/src/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ pub async fn start(
.build();
let connection_failed_counter = meter
.u64_counter("carbide-api.tls.connection_fail")
.with_description("The amount of tcp connections that were failures")
.with_description("Number of inbound connections that failed")
.build();

let mut tls_acceptor_created = Instant::now();
Expand Down
8 changes: 4 additions & 4 deletions crates/api-core/src/logging/service_health_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub fn start_export_service_health_metrics(health_context: ServiceHealthContext)
health_context
.meter
.u64_observable_gauge("carbide_db_pool_idle_conns")
.with_description("The amount of idle connections in the carbide database pool")
.with_description("Number of idle connections in the carbide database pool")
Comment thread
coderabbitai[bot] marked this conversation as resolved.
.with_callback(move |observer| {
observer.observe(database_pool.num_idle() as u64, &[]);
})
Expand All @@ -84,7 +84,7 @@ pub fn start_export_service_health_metrics(health_context: ServiceHealthContext)
.meter
.u64_observable_gauge("carbide_db_pool_total_conns")
.with_description(
"The amount of total (active + idle) connections in the carbide database pool",
"Number of total (active + idle) connections in the carbide database pool",
)
.with_callback(move |observer| {
observer.observe(database_pool.size() as u64, &[]);
Expand All @@ -97,7 +97,7 @@ pub fn start_export_service_health_metrics(health_context: ServiceHealthContext)
health_context
.meter
.u64_observable_gauge("carbide_resourcepool_used_count")
.with_description("Count of values in the pool currently allocated")
.with_description("Number of values in the pool currently allocated")
.with_callback(move |observer| {
for (name, stats) in rp_stats.lock().unwrap().iter() {
observer.observe(
Expand All @@ -114,7 +114,7 @@ pub fn start_export_service_health_metrics(health_context: ServiceHealthContext)
health_context
.meter
.u64_observable_gauge("carbide_resourcepool_free_count")
.with_description("Count of values in the pool currently available for allocation")
.with_description("Number of values in the pool currently available for allocation")
.with_callback(move |observer| {
for (name, stats) in rp_stats.lock().unwrap().iter() {
let name_attr = KeyValue::new("pool", name.to_string());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl DpuNicFirmwareUpdateMetrics {
let running_dpu_updates = self.running_dpu_updates.clone();
meter
.u64_observable_gauge("carbide_pending_dpu_nic_firmware_update_count")
.with_description("The number of machines in the system that need a firmware update.")
.with_description("Number of machines in the system that need a firmware update.")
Comment thread
coderabbitai[bot] marked this conversation as resolved.
.with_callback(move |observer| {
observer.observe(pending_firmware_updates.load(Relaxed), &[]);
})
Expand All @@ -56,7 +56,7 @@ impl DpuNicFirmwareUpdateMetrics {
meter
.u64_observable_gauge("carbide_unavailable_dpu_nic_firmware_update_count")
.with_description(
"The number of machines in the system that need a firmware update but are unavailable for update.",
"Number of machines in the system that need a firmware update but are unavailable for update.",
)
.with_callback(move |observer| {
observer.observe(unavailable_dpu_updates.load(Relaxed), &[]);
Expand All @@ -66,7 +66,7 @@ impl DpuNicFirmwareUpdateMetrics {
meter
.u64_observable_gauge("carbide_running_dpu_updates_count")
.with_description(
"The number of machines in the system that are running a firmware update.",
"Number of machines in the system that are running a firmware update.",
)
.with_callback(move |observer| {
observer.observe(running_dpu_updates.load(Relaxed), &[]);
Expand Down
6 changes: 2 additions & 4 deletions crates/api-core/src/machine_update_manager/host_firmware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,17 +258,15 @@ impl HostFirmwareUpdateMetrics {
let active_firmware_updates = self.active_firmware_updates.clone();
meter
.u64_observable_gauge("carbide_pending_host_firmware_update_count")
.with_description(
"The number of host machines in the system that need a firmware update.",
)
.with_description("Number of host machines in the system that need a firmware update.")
Comment thread
coderabbitai[bot] marked this conversation as resolved.
.with_callback(move |observer| {
observer.observe(pending_firmware_updates.load(Ordering::Relaxed), &[])
})
.build();
meter
.u64_observable_gauge("carbide_active_host_firmware_update_count")
.with_description(
"The number of host machines in the system currently working on updating their firmware.",
"Number of host machines in the system currently working on updating their firmware.",
)
.with_callback(move |observer|
observer.observe(active_firmware_updates.load(Ordering::Relaxed), &[]))
Expand Down
8 changes: 3 additions & 5 deletions crates/api-core/src/machine_update_manager/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,23 @@ impl MachineUpdateManagerMetrics {
self.concurrent_machine_updates_available.clone();
meter
.u64_observable_gauge("carbide_machines_in_maintenance_count")
.with_description("The total number of machines in the system that are in maintenance.")
.with_description("Number of machines in the system that are in maintenance.")
.with_callback(move |observer| {
observer.observe(machines_in_maintenance.load(Ordering::Relaxed), &[])
})
.build();
meter
.u64_observable_gauge("carbide_machine_updates_started_count")
.with_description(
"The number of machines in the system that are in the process of updating.",
"Number of machines in the system that are in the process of updating.",
)
.with_callback(move |observer| {
observer.observe(machine_updates_started.load(Ordering::Relaxed), &[])
})
.build();
meter
.u64_observable_gauge("carbide_concurrent_machine_updates_available")
.with_description(
"The number of machines in the system that we will update concurrently.",
)
.with_description("Number of machines in the system that we will update concurrently.")
.with_callback(move |observer| {
observer.observe(
concurrent_machine_updates_available.load(Ordering::Relaxed),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# HELP carbide_machine_validation_completed Count of machine validation that have completed successfully
# HELP carbide_machine_validation_completed Number of machine validation runs that have completed successfully
# TYPE carbide_machine_validation_completed gauge
carbide_machine_validation_completed 10
# HELP carbide_machine_validation_failed Count of machine validation that have failed
# HELP carbide_machine_validation_failed Number of machine validation runs that have failed
# TYPE carbide_machine_validation_failed gauge
carbide_machine_validation_failed 15
# HELP carbide_machine_validation_in_progress Count of machine validation that are in progress
# HELP carbide_machine_validation_in_progress Number of machine validation runs that are in progress
# TYPE carbide_machine_validation_in_progress gauge
carbide_machine_validation_in_progress 20
# HELP carbide_machine_validation_oldest_active_age_seconds Age in seconds of the oldest active machine validation run
# TYPE carbide_machine_validation_oldest_active_age_seconds gauge
carbide_machine_validation_oldest_active_age_seconds 0
# HELP carbide_machine_validation_stale_runs_count Count of active machine validation runs considered stale
# HELP carbide_machine_validation_stale_runs_count Number of active machine validation runs considered stale
# TYPE carbide_machine_validation_stale_runs_count gauge
carbide_machine_validation_stale_runs_count 0
# HELP carbide_machine_validation_tests The details of machine validation tests
Expand Down
8 changes: 4 additions & 4 deletions crates/api-core/src/machine_validation/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn hydrate_meter(meter: Meter, shared_metrics: SharedMetricsHolder<MachineValida
let metrics = shared_metrics.clone();
meter
.u64_observable_gauge("carbide_machine_validation_completed")
.with_description("Count of machine validation that have completed successfully")
.with_description("Number of machine validation runs that have completed successfully")
Comment thread
coderabbitai[bot] marked this conversation as resolved.
.with_callback(move |observer| {
metrics.if_available(|metrics, attrs| {
observer.observe(metrics.completed_validation as u64, attrs);
Expand All @@ -60,7 +60,7 @@ fn hydrate_meter(meter: Meter, shared_metrics: SharedMetricsHolder<MachineValida
let metrics = shared_metrics.clone();
meter
.u64_observable_gauge("carbide_machine_validation_failed")
.with_description("Count of machine validation that have failed")
.with_description("Number of machine validation runs that have failed")
.with_callback(move |observer| {
metrics.if_available(|metrics, attrs| {
observer.observe(metrics.failed_validation as u64, attrs);
Expand All @@ -73,7 +73,7 @@ fn hydrate_meter(meter: Meter, shared_metrics: SharedMetricsHolder<MachineValida
let metrics = shared_metrics.clone();
meter
.u64_observable_gauge("carbide_machine_validation_in_progress")
.with_description("Count of machine validation that are in progress")
.with_description("Number of machine validation runs that are in progress")
.with_callback(move |observer| {
metrics.if_available(|metrics, attrs| {
observer.observe(metrics.in_progress_validation as u64, attrs);
Expand All @@ -97,7 +97,7 @@ fn hydrate_meter(meter: Meter, shared_metrics: SharedMetricsHolder<MachineValida
let metrics = shared_metrics.clone();
meter
.u64_observable_gauge("carbide_machine_validation_stale_runs_count")
.with_description("Count of active machine validation runs considered stale")
.with_description("Number of active machine validation runs considered stale")
.with_callback(move |observer| {
metrics.if_available(|metrics, attrs| {
observer.observe(metrics.stale_validation as u64, attrs);
Expand Down
22 changes: 8 additions & 14 deletions crates/api-core/src/measured_boot/metrics_collector/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fn hydrate_meter(
let metrics = shared_metrics.clone();
meter
.u64_observable_gauge("carbide_measured_boot_profiles_total")
.with_description("The total number of measured boot profiles.")
.with_description("Number of measured boot profiles.")
Comment thread
coderabbitai[bot] marked this conversation as resolved.
.with_callback(move |observer| {
metrics.if_available(|metrics, attrs| {
observer.observe(metrics.num_profiles as u64, attrs);
Expand All @@ -95,7 +95,7 @@ fn hydrate_meter(
let metrics = shared_metrics.clone();
meter
.u64_observable_gauge("carbide_measured_boot_bundles_total")
.with_description("The total number of measured boot bundles.")
.with_description("Number of measured boot bundles.")
.with_callback(move |observer| {
metrics.if_available(|metrics, attrs| {
observer.observe(metrics.num_bundles as u64, attrs);
Expand All @@ -108,7 +108,7 @@ fn hydrate_meter(
let metrics = shared_metrics.clone();
meter
.u64_observable_gauge("carbide_measured_boot_machines_total")
.with_description("The total number of machines reporting measurements.")
.with_description("Number of machines reporting measurements.")
.with_callback(move |observer| {
metrics.if_available(|metrics, attrs| {
observer.observe(metrics.num_machines as u64, attrs);
Expand All @@ -121,7 +121,7 @@ fn hydrate_meter(
let metrics = shared_metrics.clone();
meter
.u64_observable_gauge("carbide_measured_boot_machines_per_profile_total")
.with_description("The total number of machines per measured boot system profile.")
.with_description("Number of machines per measured boot system profile.")
.with_callback(move |observer| {
metrics.if_available(|metrics, attrs| {
for (profile_id, total) in metrics.num_machines_per_profile.iter() {
Expand All @@ -143,7 +143,7 @@ fn hydrate_meter(
let metrics = shared_metrics.clone();
meter
.u64_observable_gauge("carbide_measured_boot_machines_per_bundle_total")
.with_description("The total number of machines per measured boot bundle.")
.with_description("Number of machines per measured boot bundle.")
.with_callback(move |observer| {
metrics.if_available(|metrics, attrs| {
for (bundle_id, total) in metrics.num_machines_per_bundle.iter() {
Expand All @@ -161,9 +161,7 @@ fn hydrate_meter(
let metrics = shared_metrics.clone();
meter
.u64_observable_gauge("carbide_measured_boot_machines_per_bundle_state_total")
.with_description(
"The total number of machines per a given measured boot bundle state.",
)
.with_description("Number of machines in each measured boot bundle state.")
.with_callback(move |observer| {
metrics.if_available(|metrics, attrs| {
for (bundle_state, total) in metrics.num_machines_per_bundle_state.iter() {
Expand All @@ -185,9 +183,7 @@ fn hydrate_meter(
let metrics = shared_metrics.clone();
meter
.u64_observable_gauge("carbide_measured_boot_machines_per_machine_state_total")
.with_description(
"The total number of machines per a given measured boot machine state.",
)
.with_description("Number of machines in each measured boot machine state.")
.with_callback(move |observer| {
metrics.if_available(|metrics, attrs| {
for (machine_state, total) in metrics.num_machines_per_machine_state.iter() {
Expand All @@ -209,9 +205,7 @@ fn hydrate_meter(
let metrics = shared_metrics;
meter
.u64_observable_gauge("carbide_measured_boot_machines_per_pcr_value_total")
.with_description(
"The total number of machines with a given PCR value at a given PCR index.",
)
.with_description("Number of machines with a given PCR value at a given PCR index.")
.with_callback(move |observer| {
metrics.if_available(|metrics, attrs| {
for (pcr_register, total) in metrics.num_machines_per_pcr_value.iter() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
# HELP carbide_measured_boot_bundles_total The total number of measured boot bundles.
# HELP carbide_measured_boot_bundles_total Number of measured boot bundles.
# TYPE carbide_measured_boot_bundles_total gauge
carbide_measured_boot_bundles_total 4
# HELP carbide_measured_boot_machines_per_bundle_state_total The total number of machines per a given measured boot bundle state.
# HELP carbide_measured_boot_machines_per_bundle_state_total Number of machines in each measured boot bundle state.
# TYPE carbide_measured_boot_machines_per_bundle_state_total gauge
carbide_measured_boot_machines_per_bundle_state_total{bundle_state="Active"} 1
carbide_measured_boot_machines_per_bundle_state_total{bundle_state="Obsolete"} 1
carbide_measured_boot_machines_per_bundle_state_total{bundle_state="Pending"} 1
carbide_measured_boot_machines_per_bundle_state_total{bundle_state="Retired"} 3
carbide_measured_boot_machines_per_bundle_state_total{bundle_state="Revoked"} 4
# HELP carbide_measured_boot_machines_per_bundle_total The total number of machines per measured boot bundle.
# HELP carbide_measured_boot_machines_per_bundle_total Number of machines per measured boot bundle.
# TYPE carbide_measured_boot_machines_per_bundle_total gauge
carbide_measured_boot_machines_per_bundle_total{bundle_id="33be881e-5871-4519-b7dd-84946f3b758a"} 4
carbide_measured_boot_machines_per_bundle_total{bundle_id="3e4ec902-f834-448c-9c0d-aca7da84d5d7"} 3
carbide_measured_boot_machines_per_bundle_total{bundle_id="53008cc3-988e-459c-a4c1-acb0ea44a884"} 2
carbide_measured_boot_machines_per_bundle_total{bundle_id="f567ae32-690c-4108-8ee8-5116c64ff3f0"} 1
# HELP carbide_measured_boot_machines_per_machine_state_total The total number of machines per a given measured boot machine state.
# HELP carbide_measured_boot_machines_per_machine_state_total Number of machines in each measured boot machine state.
# TYPE carbide_measured_boot_machines_per_machine_state_total gauge
carbide_measured_boot_machines_per_machine_state_total{machine_state="Discovered"} 1
carbide_measured_boot_machines_per_machine_state_total{machine_state="Measured"} 3
carbide_measured_boot_machines_per_machine_state_total{machine_state="MeasuringFailed"} 4
carbide_measured_boot_machines_per_machine_state_total{machine_state="PendingBundle"} 2
# HELP carbide_measured_boot_machines_per_pcr_value_total The total number of machines with a given PCR value at a given PCR index.
# HELP carbide_measured_boot_machines_per_pcr_value_total Number of machines with a given PCR value at a given PCR index.
# TYPE carbide_measured_boot_machines_per_pcr_value_total gauge
carbide_measured_boot_machines_per_pcr_value_total{pcr_index="0",pcr_value="aa"} 5
carbide_measured_boot_machines_per_pcr_value_total{pcr_index="1",pcr_value="bb"} 5
# HELP carbide_measured_boot_machines_per_profile_total The total number of machines per measured boot system profile.
# HELP carbide_measured_boot_machines_per_profile_total Number of machines per measured boot system profile.
# TYPE carbide_measured_boot_machines_per_profile_total gauge
carbide_measured_boot_machines_per_profile_total{profile_id="254542a1-0fb2-4250-91df-b5ecfa52645e"} 2
carbide_measured_boot_machines_per_profile_total{profile_id="4ed2dea5-c325-4317-aeb3-e9766956d9fc"} 3
carbide_measured_boot_machines_per_profile_total{profile_id="bf13aaeb-c9e6-4e42-9b2f-5aa525c56124"} 1
carbide_measured_boot_machines_per_profile_total{profile_id="c5c926f3-a454-497c-95ff-d21647590631"} 4
# HELP carbide_measured_boot_machines_total The total number of machines reporting measurements.
# HELP carbide_measured_boot_machines_total Number of machines reporting measurements.
# TYPE carbide_measured_boot_machines_total gauge
carbide_measured_boot_machines_total 10
# HELP carbide_measured_boot_profiles_total The total number of measured boot profiles.
# HELP carbide_measured_boot_profiles_total Number of measured boot profiles.
# TYPE carbide_measured_boot_profiles_total gauge
carbide_measured_boot_profiles_total 10
Loading
Loading