Skip to content

Commit d36d8c3

Browse files
emmaling27Convex, Inc.
authored and
Convex, Inc.
committed
Fix compaction timer label (#27344)
GitOrigin-RevId: 29b7176b13cb7a9af2a7341aa5f018ee52cbb2f0
1 parent 5456281 commit d36d8c3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/database/src/metrics.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -907,12 +907,13 @@ register_convex_histogram!(
907907
);
908908
pub fn compaction_build_one_timer(search_type: SearchType) -> StatusTimer {
909909
let mut timer = StatusTimer::new(&COMPACTION_BUILD_ONE_SECONDS);
910-
timer.replace_label(UNKNOWN_COMPACTION_LABEL.clone(), search_type.tag());
910+
timer.add_label(search_type.tag());
911+
timer.add_label(UNKNOWN_COMPACTION_LABEL.clone());
911912
timer
912913
}
913914

914915
pub fn finish_compaction_timer(mut timer: StatusTimer, reason: CompactionReason) {
915-
timer.add_label(reason.metric_label());
916+
timer.replace_label(UNKNOWN_COMPACTION_LABEL.clone(), reason.metric_label());
916917
timer.finish();
917918
}
918919

0 commit comments

Comments
 (0)