Skip to content

Commit

Permalink
backward compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
  • Loading branch information
blt committed Dec 12, 2024
1 parent eb38edd commit 3b7ce8e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lading/src/observer/linux/cgroup/v2/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ pub(crate) async fn poll(group_prefix: &Path, labels: &[(String, String)]) -> Re
let user_cpu = (user_fraction / allowed_cores) * 100.0;
let system_cpu = (system_fraction / allowed_cores) * 100.0;
gauge!("total_cpu_percentage", labels).set(total_cpu);
gauge!("cpu_percentage", labels).set(total_cpu); // backward compatibility
gauge!("user_cpu_percentage", labels).set(user_cpu);
gauge!("kernel_cpu_percentage", labels).set(system_cpu); // kernel is a misnomer, keeping for compatibility
gauge!("system_cpu_percentage", labels).set(system_cpu);
Expand Down

0 comments on commit 3b7ce8e

Please sign in to comment.