27#include <seastar/util/modules.hh>
32SEASTAR_MODULE_EXPORT_BEGIN
41 std::string _regex_str;
47 const std::string& str()
const noexcept {
50 const std::regex& regex()
const noexcept {
55 std::string str(expr);
56 return operator=(str);
61 _regex = std::regex(_regex_str);
64 bool empty()
const noexcept {
65 return _regex_str.empty();
68 bool match(
const std::string& str)
const noexcept {
69 return !empty() && std::regex_match(str, _regex);
102 enum class relabel_action {
skip_when_empty, report_when_empty, replace, keep, drop, drop_label};
103 std::vector<std::string> source_labels;
104 std::string target_label;
105 std::string replacement =
"${1}";
107 relabel_action action = relabel_action::replace;
108 std::string separator =
";";
132 std::vector<std::string> aggregate_labels;
135SEASTAR_MODULE_EXPORT_END
a wrapper class around regex with the original expr
Definition: relabel_config.hh:40
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
metric_family_config allow changing metrics family configuration
Definition: relabel_config.hh:129
Seastar API namespace.
Definition: abort_on_ebadf.hh:26
a relabel_config allows changing metrics labels dynamically
Definition: relabel_config.hh:101