Skip to content

Commit 8dc64d8

Browse files
tdittrdavidv1992
authored andcommitted
Add parent identity to grandmaster metrics
1 parent 11ce070 commit 8dc64d8

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

statime-linux/src/metrics/format.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,17 @@ pub fn format_current_ds(
146146
pub fn format_parent_ds(
147147
w: &mut impl std::fmt::Write,
148148
parent_ds: &ParentDS,
149-
labels: Vec<(&'static str, String)>,
149+
mut labels: Vec<(&'static str, String)>,
150150
) -> std::fmt::Result {
151+
labels.push((
152+
"parent_clock_identity",
153+
parent_ds.parent_port_identity.clock_identity.to_string(),
154+
));
155+
labels.push((
156+
"parent_port_number",
157+
parent_ds.parent_port_identity.port_number.to_string(),
158+
));
159+
151160
format_metric(
152161
w,
153162
"grandmaster_clock_quality_class",

0 commit comments

Comments
 (0)