Seastar
High performance C++ framework for concurrent servers
|
metrics creation and registration
the metrics namespace holds the relevant method and classes to generate metrics.
The metrics layer support registering metrics, that later will be exported via different API protocols.
To be able to support multiple protocols the following simplifications where made:
To add metrics definition to class A do the following:
In A header file
In A source file:
Classes | |
class | description |
Human-readable description of a metric/group. More... | |
class | double_registration |
struct | histogram |
Histogram data type. More... | |
struct | histogram_bucket |
Histogram bucket type. More... | |
class | label |
Class that creates label instances. More... | |
class | label_instance |
Label a metrics. More... | |
class | metric_definition |
class | metric_group |
hold a single metric group Initialization is done in the constructor or with a call to add_group More... | |
class | metric_group_definition |
class | metric_groups |
holds the metric definition. More... | |
Typedefs | |
using | metric_type_def = sstring |
using | metric_name_type = sstring |
using | instance_id_type = sstring |
using | group_name_type = sstring |
Functions | |
template<typename T > | |
impl::metric_definition_impl | make_gauge (metric_name_type name, T &&val, description d=description(), std::vector< label_instance > labels={}) |
Gauge are a general purpose metric. More... | |
template<typename T > | |
impl::metric_definition_impl | make_gauge (metric_name_type name, description d, T &&val) |
Gauge are a general purpose metric. More... | |
template<typename T > | |
impl::metric_definition_impl | make_gauge (metric_name_type name, description d, std::vector< label_instance > labels, T &&val) |
Gauge are a general purpose metric. More... | |
template<typename T > | |
impl::metric_definition_impl | make_derive (metric_name_type name, T &&val, description d=description(), std::vector< label_instance > labels={}) |
Derive are used when a rate is more interesting than the value. More... | |
template<typename T > | |
impl::metric_definition_impl | make_derive (metric_name_type name, description d, T &&val) |
Derive are used when a rate is more interesting than the value. More... | |
template<typename T > | |
impl::metric_definition_impl | make_derive (metric_name_type name, description d, std::vector< label_instance > labels, T &&val) |
Derive are used when a rate is more interesting than the value. More... | |
template<typename T > | |
impl::metric_definition_impl | make_counter (metric_name_type name, T &&val, description d=description(), std::vector< label_instance > labels={}) |
create a counter metric More... | |
template<typename T > | |
impl::metric_definition_impl | make_absolute (metric_name_type name, T &&val, description d=description(), std::vector< label_instance > labels={}) |
create an absolute metric. More... | |
template<typename T > | |
impl::metric_definition_impl | make_histogram (metric_name_type name, T &&val, description d=description(), std::vector< label_instance > labels={}) |
create a histogram metric. More... | |
template<typename T > | |
impl::metric_definition_impl | make_histogram (metric_name_type name, description d, std::vector< label_instance > labels, T &&val) |
create a histogram metric. More... | |
template<typename T > | |
impl::metric_definition_impl | make_histogram (metric_name_type name, description d, T &&val) |
create a histogram metric. More... | |
template<typename T > | |
impl::metric_definition_impl | make_total_bytes (metric_name_type name, T &&val, description d=description(), std::vector< label_instance > labels={}, instance_id_type instance=impl::shard()) |
create a total_bytes metric. More... | |
template<typename T > | |
impl::metric_definition_impl | make_current_bytes (metric_name_type name, T &&val, description d=description(), std::vector< label_instance > labels={}, instance_id_type instance=impl::shard()) |
create a current_bytes metric. More... | |
template<typename T > | |
impl::metric_definition_impl | make_queue_length (metric_name_type name, T &&val, description d=description(), std::vector< label_instance > labels={}, instance_id_type instance=impl::shard()) |
create a queue_length metric. More... | |
template<typename T > | |
impl::metric_definition_impl | make_total_operations (metric_name_type name, T &&val, description d=description(), std::vector< label_instance > labels={}, instance_id_type instance=impl::shard()) |
create a total operation metric. More... | |
future | configure (const boost::program_options::variables_map &opts) |
set the metrics configuration | |
boost::program_options::options_description | get_options_description () |
get the metrics configuration desciprtion | |
Variables | |
const bool | metric_disabled |
label | shard_label |
using seastar::metrics::group_name_type = typedef sstring |
A group of logically related metrics