Skip to content

Commit

Permalink
build_info value should be 1
Browse files Browse the repository at this point in the history
  • Loading branch information
olix0r committed Dec 5, 2023
1 parent e337802 commit 4ab8fdc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion linkerd/app/core/src/build_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ pub struct BuildInfo {

impl BuildInfo {
pub fn metric(&self) -> prom::Family<BuildInfo, prom::ConstGauge> {
let fam = prom::Family::<Self, prom::ConstGauge>::default();
let fam = prom::Family::<Self, prom::ConstGauge>::new_with_constructor(|| {
prom::ConstGauge::new(1)
});
let _ = fam.get_or_create(self);
fam
}
Expand Down

0 comments on commit 4ab8fdc

Please sign in to comment.