NVIDIA DeepStream SDK API Reference

8.0 Release
prometheus Namespace Reference

Namespaces

 detail
 

Data Structures

struct  ClientMetric
 
class  Collectable
 Interface implemented by anything that can be used by Prometheus to collect metrics. More...
 
class  Counter
 A counter metric to represent a monotonically increasing value. More...
 
class  Family
 A metric of type T with a set of labeled dimensions. More...
 
class  Gauge
 A gauge metric to represent a value that can arbitrarily go up and down. More...
 
class  Histogram
 A histogram metric to represent aggregatable distributions of events. More...
 
class  Info
 A info metric to represent textual information which should not change during process lifetime. More...
 
struct  MetricFamily
 
class  Registry
 Manages the collection of a number of metrics. More...
 
class  Serializer
 
class  Summary
 A summary metric samples observations over a sliding window of time. More...
 
class  TextSerializer
 

Typedefs

using Labels = std::map< std::string, std::string >
 Multiple labels and their value. More...
 
using Label = Labels::value_type
 Single label and its value. More...
 

Enumerations

enum  MetricType {
  MetricType::Counter,
  MetricType::Gauge,
  MetricType::Summary,
  MetricType::Untyped,
  MetricType::Histogram,
  MetricType::Info,
  MetricType::Counter,
  MetricType::Gauge,
  MetricType::Summary,
  MetricType::Untyped,
  MetricType::Histogram,
  MetricType::Info
}
 
enum  MetricType {
  MetricType::Counter,
  MetricType::Gauge,
  MetricType::Summary,
  MetricType::Untyped,
  MetricType::Histogram,
  MetricType::Info,
  MetricType::Counter,
  MetricType::Gauge,
  MetricType::Summary,
  MetricType::Untyped,
  MetricType::Histogram,
  MetricType::Info
}
 

Functions

PROMETHEUS_CPP_CORE_EXPORT bool CheckMetricName (const std::string &name)
 
PROMETHEUS_CPP_CORE_EXPORT bool CheckLabelName (const std::string &name, MetricType type)
 
PROMETHEUS_CPP_CORE_EXPORT detail::Builder< CounterBuildCounter ()
 Return a builder to configure and register a Counter metric. More...
 
PROMETHEUS_CPP_CORE_EXPORT detail::Builder< GaugeBuildGauge ()
 Return a builder to configure and register a Gauge metric. More...
 
PROMETHEUS_CPP_CORE_EXPORT detail::Builder< HistogramBuildHistogram ()
 Return a builder to configure and register a Histogram metric. More...
 
PROMETHEUS_CPP_CORE_EXPORT detail::Builder< InfoBuildInfo ()
 Return a builder to configure and register a Info metric. More...
 
PROMETHEUS_CPP_CORE_EXPORT detail::Builder< SummaryBuildSummary ()
 Return a builder to configure and register a Summary metric. More...
 

Typedef Documentation

◆ Label

typedef Labels::value_type prometheus::Label

Single label and its value.

Definition at line 12 of file sources/includes/prometheus/labels.h.

◆ Labels

typedef std::map< std::string, std::string > prometheus::Labels

Multiple labels and their value.

Definition at line 9 of file sources/includes/prometheus/labels.h.

Enumeration Type Documentation

◆ MetricType [1/2]

Enumerator
Counter 
Gauge 
Summary 
Untyped 
Histogram 
Info 
Counter 
Gauge 
Summary 
Untyped 
Histogram 
Info 

Definition at line 5 of file sources/includes/prometheus/metric_type.h.

◆ MetricType [2/2]

Enumerator
Counter 
Gauge 
Summary 
Untyped 
Histogram 
Info 
Counter 
Gauge 
Summary 
Untyped 
Histogram 
Info 

Definition at line 5 of file 9.0/sources/includes/prometheus/metric_type.h.

Function Documentation

◆ BuildCounter()

PROMETHEUS_CPP_CORE_EXPORT detail::Builder< Counter > prometheus::BuildCounter ( )

Return a builder to configure and register a Counter metric.

Every metric is uniquely identified by its name and a set of key-value pairs, also known as labels. Prometheus's query language allows filtering and aggregation based on metric name and these labels.

This example selects all time series that have the http_requests_total metric name:

http_requests_total

It is possible to assign labels to the metric name. These labels are propagated to each dimensional data added with Add(). For example if a label job= "prometheus" is provided to this constructor, it is possible to filter this time series with Prometheus's query language by appending a set of labels to match in curly braces ({})

http_requests_total{job= "prometheus"}

For further information see: Querying Basics

Parameters
nameSet the metric name.
helpSet an additional description.
constant_labelsAssign a set of key-value pairs (= labels) to the metric. All these labels are propagated to each time series within the metric.
Exceptions
std::runtime_exceptionon invalid metric or label names.

Example usage:

auto registry = std::make_shared<Registry>();
auto& counter_family = prometheus::BuildCounter()
.Name("some_name")
.Help("Additional description.")
.Labels({{"key", "value"}})
.Register(*registry);
...
Returns
An object of unspecified type T, i.e., an implementation detail except that it has the following members:
  • Name(const std::string&) to set the metric name,
  • Help(const std::string&) to set an additional description.
  • Labels(const Labels&) to assign a set of key-value pairs (= labels) to the metric.

To finish the configuration of the Counter metric, register it with Register(Registry&).

◆ BuildGauge()

PROMETHEUS_CPP_CORE_EXPORT detail::Builder< Gauge > prometheus::BuildGauge ( )

Return a builder to configure and register a Gauge metric.

Every metric is uniquely identified by its name and a set of key-value pairs, also known as labels. Prometheus's query language allows filtering and aggregation based on metric name and these labels.

This example selects all time series that have the http_requests_total metric name:

http_requests_total

It is possible to assign labels to the metric name. These labels are propagated to each dimensional data added with Add(). For example if a label job= "prometheus" is provided to this constructor, it is possible to filter this time series with Prometheus's query language by appending a set of labels to match in curly braces ({})

http_requests_total{job= "prometheus"}

For further information see: Querying Basics

Parameters
nameSet the metric name.
helpSet an additional description.
constant_labelsAssign a set of key-value pairs (= labels) to the metric. All these labels are propagated to each time series within the metric.
Exceptions
std::runtime_exceptionon invalid metric or label names.

Example usage:

auto registry = std::make_shared<Registry>();
auto& gauge_family = prometheus::BuildGauge()
.Name("some_name")
.Help("Additional description.")
.Labels({{"key", "value"}})
.Register(*registry);
...
Returns
An object of unspecified type T, i.e., an implementation detail except that it has the following members:
  • Name(const std::string&) to set the metric name,
  • Help(const std::string&) to set an additional description.
  • Labels(const Labels&) to assign a set of key-value pairs (= labels) to the metric.

To finish the configuration of the Gauge metric register it with Register(Registry&).

◆ BuildHistogram()

PROMETHEUS_CPP_CORE_EXPORT detail::Builder< Histogram > prometheus::BuildHistogram ( )

Return a builder to configure and register a Histogram metric.

Every metric is uniquely identified by its name and a set of key-value pairs, also known as labels. Prometheus's query language allows filtering and aggregation based on metric name and these labels.

This example selects all time series that have the http_requests_total metric name:

http_requests_total

It is possible to assign labels to the metric name. These labels are propagated to each dimensional data added with Add(). For example if a label job= "prometheus" is provided to this constructor, it is possible to filter this time series with Prometheus's query language by appending a set of labels to match in curly braces ({})

http_requests_total{job= "prometheus"}

For further information see: Querying Basics

Parameters
nameSet the metric name.
helpSet an additional description.
constant_labelsAssign a set of key-value pairs (= labels) to the metric. All these labels are propagated to each time series within the metric.
Exceptions
std::runtime_exceptionon invalid metric or label names.

Example usage:

auto registry = std::make_shared<Registry>();
auto& histogram_family = prometheus::BuildHistogram()
.Name("some_name")
.Help("Additional description.")
.Labels({{"key", "value"}})
.Register(*registry);
...
Returns
An object of unspecified type T, i.e., an implementation detail except that it has the following members:
  • Name(const std::string&) to set the metric name,
  • Help(const std::string&) to set an additional description.
  • Labels(const Labels&) to assign a set of key-value pairs (= labels) to the metric.

To finish the configuration of the Histogram metric register it with Register(Registry&).

◆ BuildInfo()

PROMETHEUS_CPP_CORE_EXPORT detail::Builder< Info > prometheus::BuildInfo ( )

Return a builder to configure and register a Info metric.

Every metric is uniquely identified by its name and a set of key-value pairs, also known as labels. Prometheus's query language allows filtering and aggregation based on metric name and these labels.

This example selects all time series that have the http_requests_total metric name:

http_requests_total

It is possible to assign labels to the metric name. These labels are propagated to each dimensional data added with Add(). For example if a label job= "prometheus" is provided to this constructor, it is possible to filter this time series with Prometheus's query language by appending a set of labels to match in curly braces ({})

http_requests_total{job= "prometheus"}

For further information see: Querying Basics

Parameters
nameSet the metric name.
helpSet an additional description.
constant_labelsAssign a set of key-value pairs (= labels) to the metric. All these labels are propagated to each time series within the metric.
Exceptions
std::runtime_exceptionon invalid metric or label names.

Example usage:

auto registry = std::make_shared<Registry>();
auto& info_family = prometheus::BuildInfo()
.Name("some_name")
.Help("Additional description.")
.Labels({{"key", "value"}})
.Register(*registry);
...
Returns
An object of unspecified type T, i.e., an implementation detail except that it has the following members:
  • Name(const std::string&) to set the metric name,
  • Help(const std::string&) to set an additional description.
  • Labels(const Labels&) to assign a set of key-value pairs (= labels) to the metric.

To finish the configuration of the Info metric, register it with Register(Registry&).

◆ BuildSummary()

PROMETHEUS_CPP_CORE_EXPORT detail::Builder< Summary > prometheus::BuildSummary ( )

Return a builder to configure and register a Summary metric.

Every metric is uniquely identified by its name and a set of key-value pairs, also known as labels. Prometheus's query language allows filtering and aggregation based on metric name and these labels.

This example selects all time series that have the http_requests_total metric name:

http_requests_total

It is possible to assign labels to the metric name. These labels are propagated to each dimensional data added with Add(). For example if a label job= "prometheus" is provided to this constructor, it is possible to filter this time series with Prometheus's query language by appending a set of labels to match in curly braces ({})

http_requests_total{job= "prometheus"}

For further information see: Querying Basics

Parameters
nameSet the metric name.
helpSet an additional description.
constant_labelsAssign a set of key-value pairs (= labels) to the metric. All these labels are propagated to each time series within the metric.
Exceptions
std::runtime_exceptionon invalid metric or label names.

Example usage:

auto registry = std::make_shared<Registry>();
auto& summary_family = prometheus::BuildSummary()
.Name("some_name")
.Help("Additional description.")
.Labels({{"key", "value"}})
.Register(*registry);
...
Returns
An object of unspecified type T, i.e., an implementation detail except that it has the following members:
  • Name(const std::string&) to set the metric name,
  • Help(const std::string&) to set an additional description.
  • Labels(const Labels&) to assign a set of key-value pairs (= labels) to the metric.

To finish the configuration of the Summary metric register it with Register(Registry&).

◆ CheckLabelName()

PROMETHEUS_CPP_CORE_EXPORT bool prometheus::CheckLabelName ( const std::string &  name,
MetricType  type 
)

◆ CheckMetricName()

PROMETHEUS_CPP_CORE_EXPORT bool prometheus::CheckMetricName ( const std::string &  name)
prometheus::BuildInfo
PROMETHEUS_CPP_CORE_EXPORT detail::Builder< Info > BuildInfo()
Return a builder to configure and register a Info metric.
prometheus::BuildCounter
PROMETHEUS_CPP_CORE_EXPORT detail::Builder< Counter > BuildCounter()
Return a builder to configure and register a Counter metric.
prometheus::BuildSummary
PROMETHEUS_CPP_CORE_EXPORT detail::Builder< Summary > BuildSummary()
Return a builder to configure and register a Summary metric.
prometheus::BuildGauge
PROMETHEUS_CPP_CORE_EXPORT detail::Builder< Gauge > BuildGauge()
Return a builder to configure and register a Gauge metric.
prometheus::BuildHistogram
PROMETHEUS_CPP_CORE_EXPORT detail::Builder< Histogram > BuildHistogram()
Return a builder to configure and register a Histogram metric.