Seastar
High performance C++ framework for concurrent servers
|
a relabel_config allows changing metrics labels dynamically
The logic is similar to Prometheus configuration This is how Prometheus entry looks like:
source_labels - a list of source labels, the labels are concatenated with the separator and and the combine value is match to the regex. target_label - the labels to perform the action on when replacing a value or when dropping a label. replacement - the string to use when replacing a label value, regex group can be used. expr - a regular expression in a string format. Action would be taken if the regex match the concatenated labels. action - The action to perform when there is a match. separator - separator to use when concatenating the labels.
#include <seastar/core/relabel_config.hh>
Public Types | |
enum class | relabel_action { skip_when_empty , report_when_empty , replace , keep , drop , drop_label } |
Public Attributes | |
std::vector< std::string > | source_labels |
std::string | target_label |
std::string | replacement = "${1}" |
relabel_config_regex | expr = "(.*)" |
relabel_action | action = relabel_action::replace |
std::string | separator = ";" |