Skip to content

Commit

Permalink
fix(plugin_k8s): Don't explore folder which don't end with .slice
Browse files Browse the repository at this point in the history
  • Loading branch information
AngeCyp authored and TheElectronWill committed Nov 13, 2024
1 parent b75b3ba commit 79df2fb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugin-cgroupv2/src/k8s/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ fn list_metric_file_in_dir(
.to_str()
.with_context(|| format!("Filename is not valid UTF-8: {:?}", path))?;

// If the dir_uid doesn't end with .slice, we will not find the right files
if !dir_uid.ends_with(".slice") {
continue;
}

let dir_uid_mod = dir_uid.strip_suffix(".slice").unwrap_or(dir_uid);

let root_file_name = root_directory_path
Expand Down

0 comments on commit 79df2fb

Please sign in to comment.