You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function form_metric_filename takes service_name as a parameter but always uses empty string as filename to generate the metric filename if the service_name does not contains dot(.).
// Generate the metric file name from the service name.fnform_metric_filename(service_name:&str,with_pid:bool) -> String{let dot = ".";let separator = "-";letmut filename = String::new();if service_name.contains(dot){
filename = service_name.replace(dot, separator);}letmut filename = format!("{}{}{}", filename, separator,METRIC_FILENAME_SUFFIX);if with_pid {let pid = std::process::id();
filename = format!("{}.pid{}", filename, pid);}
filename
}
The text was updated successfully, but these errors were encountered:
flearc
changed the title
form_metric_filename does not handle service name without dot correctly
form_metric_filename does not form correct metric filename when the service_name does not contain dot
Mar 25, 2024
The function form_metric_filename takes service_name as a parameter but always uses empty string as filename to generate the metric filename if the service_name does not contains dot(.).
The text was updated successfully, but these errors were encountered: