21 #ifndef SEASTAR_MODULE
24 #include <seastar/util/modules.hh>
29 SEASTAR_MODULE_EXPORT_BEGIN
38 std::string _regex_str;
44 const std::string& str()
const noexcept {
47 const std::regex& regex()
const noexcept {
52 std::string str(expr);
53 return operator=(str);
58 _regex = std::regex(_regex_str);
92 enum class relabel_action {
skip_when_empty, report_when_empty, replace, keep, drop, drop_label};
93 std::vector<std::string> source_labels;
94 std::string target_label;
95 std::string replacement =
"${1}";
97 relabel_action action = relabel_action::replace;
98 std::string separator =
";";
106 SEASTAR_MODULE_EXPORT_END
a wrapper class around regex with the original expr
Definition: relabel_config.hh:37
relabel_config::relabel_action relabel_config_action(const std::string &action)
a helper function to translate a string to relabel_config::relabel_action enum values
Seastar API namespace.
Definition: abort_on_ebadf.hh:26
a relabel_config allows changing metrics labels dynamically
Definition: relabel_config.hh:91