Function prometheus::hostname_grouping_key[][src]

pub fn hostname_grouping_key() -> HashMap<String, String>

hostname_grouping_key returns a label map with the only entry {instance=“”}. This can be conveniently used as the grouping parameter if metrics should be pushed with the hostname as label. The returned map is created upon each call so that the caller is free to add more labels to the map.

Note: This function returns instance = "unknown" in Windows.