Seastar
High performance C++ framework for concurrent servers
Modules | Classes | Typedefs | Functions | Variables
Metrics

Detailed Description

Modules

 metrics type definitions
 

Classes

class  seastar::metrics::double_registration
 
class  seastar::metrics::description
 Human-readable description of a metric/group. More...
 
class  seastar::metrics::label_instance
 Label a metrics. More...
 
class  seastar::metrics::label
 Class that creates label instances. More...
 

Typedefs

using seastar::metrics::metric_type_def = sstring
 
using seastar::metrics::metric_name_type = sstring
 
using seastar::metrics::instance_id_type = sstring
 
using seastar::metrics::skip_when_empty = bool_class< class skip_when_empty_tag >
 

Functions

template<typename T >
impl::metric_definition_impl seastar::metrics::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 seastar::metrics::make_gauge (metric_name_type name, description d, T &&val)
 Gauge are a general purpose metric. More...
 
template<typename T >
impl::metric_definition_impl seastar::metrics::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 seastar::metrics::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 seastar::metrics::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 seastar::metrics::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 seastar::metrics::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 seastar::metrics::make_counter (metric_name_type name, description d, T &&val)
 create a counter metric More...
 
template<typename T >
impl::metric_definition_impl seastar::metrics::make_counter (metric_name_type name, description d, std::vector< label_instance > labels, T &&val)
 create a counter metric More...
 
template<typename T >
impl::metric_definition_impl seastar::metrics::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 seastar::metrics::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 seastar::metrics::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 seastar::metrics::make_histogram (metric_name_type name, description d, T &&val)
 create a histogram metric. More...
 
template<typename T >
impl::metric_definition_impl seastar::metrics::make_summary (metric_name_type name, description d, T &&val)
 create a summary metric. More...
 
template<typename T >
impl::metric_definition_impl seastar::metrics::make_total_bytes (metric_name_type name, T &&val, description d=description(), std::vector< label_instance > labels={}, instance_id_type=impl::shard())
 create a total_bytes metric. More...
 
template<typename T >
impl::metric_definition_impl seastar::metrics::make_current_bytes (metric_name_type name, T &&val, description d=description(), std::vector< label_instance > labels={}, instance_id_type=impl::shard())
 create a current_bytes metric. More...
 
template<typename T >
impl::metric_definition_impl seastar::metrics::make_queue_length (metric_name_type name, T &&val, description d=description(), std::vector< label_instance > labels={}, instance_id_type=impl::shard())
 create a queue_length metric. More...
 
template<typename T >
impl::metric_definition_impl seastar::metrics::make_total_operations (metric_name_type name, T &&val, description d=description(), std::vector< label_instance > labels={}, instance_id_type=impl::shard())
 create a total operation metric. More...
 

Variables

const bool seastar::metrics::metric_disabled
 
label seastar::metrics::shard_label
 

Typedef Documentation

◆ instance_id_type

using seastar::metrics::instance_id_type = typedef sstring

typically used for the shard id

◆ metric_name_type

using seastar::metrics::metric_name_type = typedef sstring

The metric name'

◆ metric_type_def

using seastar::metrics::metric_type_def = typedef sstring

Used to hold an inherit type (like bytes)

Function Documentation

◆ make_absolute()

template<typename T >
impl::metric_definition_impl seastar::metrics::make_absolute ( metric_name_type  name,
T &&  val,
description  d = description(),
std::vector< label_instance labels = {} 
)

create an absolute metric.

Absolute are used for metric that are being erased after each time they are read. They are here for compatibility reasons and should general be avoided in most applications.

◆ make_counter() [1/3]

template<typename T >
impl::metric_definition_impl seastar::metrics::make_counter ( metric_name_type  name,
description  d,
std::vector< label_instance labels,
T &&  val 
)

create a counter metric

Counters are used when a rate is more interesting than the value, monitoring systems take derivation from it to display.

It's an integer or floating point value that can increase or decrease.

◆ make_counter() [2/3]

template<typename T >
impl::metric_definition_impl seastar::metrics::make_counter ( metric_name_type  name,
description  d,
T &&  val 
)

create a counter metric

Counters are used when a rate is more interesting than the value, monitoring systems take derivation from it to display.

It's an integer or floating point value that can increase or decrease.

◆ make_counter() [3/3]

template<typename T >
impl::metric_definition_impl seastar::metrics::make_counter ( metric_name_type  name,
T &&  val,
description  d = description(),
std::vector< label_instance labels = {} 
)

create a counter metric

Counters are used when a rate is more interesting than the value, monitoring systems take derivation from it to display.

It's an integer or floating point value that can increase or decrease.

◆ make_current_bytes()

template<typename T >
impl::metric_definition_impl seastar::metrics::make_current_bytes ( metric_name_type  name,
T &&  val,
description  d = description(),
std::vector< label_instance labels = {},
instance_id_type  = impl::shard() 
)

create a current_bytes metric.

current_bytes are used to report on current status in bytes. For example the current free memory.

◆ make_derive() [1/3]

template<typename T >
impl::metric_definition_impl seastar::metrics::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.

Derive is an integer value that can increase or decrease, typically it is used when looking at the derivation of the value.

It is OK to use it when counting things and if no wrap-around is expected (it shouldn't) it's prefer over counter metric.

◆ make_derive() [2/3]

template<typename T >
impl::metric_definition_impl seastar::metrics::make_derive ( metric_name_type  name,
description  d,
T &&  val 
)

Derive are used when a rate is more interesting than the value.

Derive is an integer value that can increase or decrease, typically it is used when looking at the derivation of the value.

It is OK to use it when counting things and if no wrap-around is expected (it shouldn't) it's prefer over counter metric.

◆ make_derive() [3/3]

template<typename T >
impl::metric_definition_impl seastar::metrics::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.

Derive is an integer value that can increase or decrease, typically it is used when looking at the derivation of the value.

It is OK to use it when counting things and if no wrap-around is expected (it shouldn't) it's prefer over counter metric.

◆ make_gauge() [1/3]

template<typename T >
impl::metric_definition_impl seastar::metrics::make_gauge ( metric_name_type  name,
description  d,
std::vector< label_instance labels,
T &&  val 
)

Gauge are a general purpose metric.

They can support floating point and can increase or decrease

◆ make_gauge() [2/3]

template<typename T >
impl::metric_definition_impl seastar::metrics::make_gauge ( metric_name_type  name,
description  d,
T &&  val 
)

Gauge are a general purpose metric.

They can support floating point and can increase or decrease

◆ make_gauge() [3/3]

template<typename T >
impl::metric_definition_impl seastar::metrics::make_gauge ( metric_name_type  name,
T &&  val,
description  d = description(),
std::vector< label_instance labels = {} 
)

Gauge are a general purpose metric.

They can support floating point and can increase or decrease

◆ make_histogram() [1/3]

template<typename T >
impl::metric_definition_impl seastar::metrics::make_histogram ( metric_name_type  name,
description  d,
std::vector< label_instance labels,
T &&  val 
)

create a histogram metric.

Histograms are a list o buckets with upper values and counter for the number of entries in each bucket.

◆ make_histogram() [2/3]

template<typename T >
impl::metric_definition_impl seastar::metrics::make_histogram ( metric_name_type  name,
description  d,
T &&  val 
)

create a histogram metric.

Histograms are a list o buckets with upper values and counter for the number of entries in each bucket.

◆ make_histogram() [3/3]

template<typename T >
impl::metric_definition_impl seastar::metrics::make_histogram ( metric_name_type  name,
T &&  val,
description  d = description(),
std::vector< label_instance labels = {} 
)

create a histogram metric.

Histograms are a list o buckets with upper values and counter for the number of entries in each bucket.

◆ make_queue_length()

template<typename T >
impl::metric_definition_impl seastar::metrics::make_queue_length ( metric_name_type  name,
T &&  val,
description  d = description(),
std::vector< label_instance labels = {},
instance_id_type  = impl::shard() 
)

create a queue_length metric.

queue_length are used to report on queue length

◆ make_summary()

template<typename T >
impl::metric_definition_impl seastar::metrics::make_summary ( metric_name_type  name,
description  d,
T &&  val 
)

create a summary metric.

Summaries are a different kind of histograms. It reports in quantiles. For example, the p99 and p95 latencies.

◆ make_total_bytes()

template<typename T >
impl::metric_definition_impl seastar::metrics::make_total_bytes ( metric_name_type  name,
T &&  val,
description  d = description(),
std::vector< label_instance labels = {},
instance_id_type  = impl::shard() 
)

create a total_bytes metric.

total_bytes are used for an ever growing counters, like the total bytes passed on a network.

◆ make_total_operations()

template<typename T >
impl::metric_definition_impl seastar::metrics::make_total_operations ( metric_name_type  name,
T &&  val,
description  d = description(),
std::vector< label_instance labels = {},
instance_id_type  = impl::shard() 
)

create a total operation metric.

total_operations are used for ever growing operation counter.