diff --git a/skystreamer-prometheus-exporter/src/posts.rs b/skystreamer-prometheus-exporter/src/posts.rs index 14958be..a6243e4 100644 --- a/skystreamer-prometheus-exporter/src/posts.rs +++ b/skystreamer-prometheus-exporter/src/posts.rs @@ -265,7 +265,7 @@ impl PostsRegistry { { // Languages of the posts - let langs = post + let mut langs = post .language .iter() .map(|lang| { @@ -291,6 +291,9 @@ impl PostsRegistry { }) .collect::>(); + // sort the languages + langs.sort(); + langs.iter().for_each(|lang| { self.language_counter_individual .with_label_values(&[lang])