Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions plugins/stats_over_http/stats_over_http.cc
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,10 @@ csv_out_stat(TSRecordType /* rec_type ATS_UNUSED */, void *edata, int /* registe
static
// Remove this check when we drop support for pre-13 GCC versions.
#if defined(__cpp_lib_constexpr_string) && __cpp_lib_constexpr_string >= 201907L
// Clang <= 16 doesn't fully support constexpr std::string.
#if !defined(__clang__) || __clang_major__ > 16
constexpr
#endif
#endif
std::string
sanitize_metric_name_for_prometheus(std::string_view name)
Expand Down Expand Up @@ -1133,6 +1136,8 @@ config_handler(TSCont cont, TSEvent /* event ATS_UNUSED */, void * /* edata ATS_
#ifdef DEBUG
// Remove this check when we drop support for pre-13 GCC versions.
#if defined(__cpp_lib_constexpr_string) && __cpp_lib_constexpr_string >= 201907L
// Clang <= 16 doesn't fully support constexpr std::string.
#if !defined(__clang__) || __clang_major__ > 16
constexpr void
test_sanitize_metric_name_for_prometheus()
{
Expand Down Expand Up @@ -1204,5 +1209,6 @@ test_sanitize_metric_name_for_prometheus()
static_assert(sanitize_metric_name_for_prometheus("foo [[[bar]]]") == "foo____bar___");
static_assert(sanitize_metric_name_for_prometheus("foo@#$%bar") == "foo____bar");
}
#endif // !defined(__clang__) || __clang_major__ > 16
#endif // defined(__cpp_lib_constexpr_string) && __cpp_lib_constexpr_string >= 201907L
#endif // DEBUG