Skip to content

Commit 98d1d70

Browse files
committed
Changed warning metric format
`*flow__warnings__count:RSZ-62` -> `:RSZ-0062` Signed-off-by: Jaehyun Kim <[email protected]>
1 parent 3bc3c95 commit 98d1d70

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/utl/src/Logger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ void Logger::addWarningMetrics()
197197
warning_type_cnt++;
198198
log_metric(
199199
// NOLINTNEXTLINE(misc-include-cleaner)
200-
fmt::format("flow__warnings__count:{}-{}", tool_names_[i], j),
200+
fmt::format("flow__warnings__count:{}-{:04}", tool_names_[i], j),
201201
std::to_string(message_counters_[i][j]));
202202
}
203203
}

src/utl/test/cpp/TestMetrics.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ TEST(Utl, WarningMetrics)
3838
// For simplicity, we'll just check for substrings.
3939
EXPECT_NE(content.find("\"flow__warnings__count\": 11"), std::string::npos);
4040
EXPECT_NE(content.find("\"flow__errors__count\": 0"), std::string::npos);
41-
EXPECT_NE(content.find("\"flow__warnings__count:UTL-20\": 10"),
41+
EXPECT_NE(content.find("\"flow__warnings__count:UTL-0020\": 10"),
4242
std::string::npos);
43-
EXPECT_NE(content.find("\"flow__warnings__count:UTL-21\": 1"),
43+
EXPECT_NE(content.find("\"flow__warnings__count:UTL-0021\": 1"),
4444
std::string::npos);
4545
EXPECT_NE(content.find("\"flow__warnings__type_count\": 2"),
4646
std::string::npos);

0 commit comments

Comments
 (0)