Template Class Counter
Defined in File meter.h
Inheritance Relationships
Derived Types
public opentelemetry::metrics::NoopCounter< T >
(Template Class NoopCounter)public opentelemetry::sdk::metrics::DoubleCounter
(Class DoubleCounter)public opentelemetry::sdk::metrics::LongCounter
(Class LongCounter)
Class Documentation
-
template<class T>
class Counter Subclassed by opentelemetry::metrics::NoopCounter< T >, opentelemetry::sdk::metrics::DoubleCounter, opentelemetry::sdk::metrics::LongCounter
Public Functions
-
virtual void Add(T value) noexcept = 0
Record a value
- Parameters:
value – The increment amount. MUST be non-negative.
-
virtual void Add(T value, const context::Context &context) noexcept = 0
Record a value
- Parameters:
value – The increment amount. MUST be non-negative.
context – The explicit context to associate with this measurement.
-
virtual void Add(T value, const common::KeyValueIterable &attributes) noexcept = 0
Record a value with a set of attributes.
- Parameters:
value – The increment amount. MUST be non-negative.
attributes – A set of attributes to associate with the value.
-
virtual void Add(T value, const common::KeyValueIterable &attributes, const context::Context &context) noexcept = 0
Record a value with a set of attributes.
- Parameters:
value – The increment amount. MUST be non-negative.
attributes – A set of attributes to associate with the value.
context – The explicit context to associate with this measurement.
-
template<class U, nostd::enable_if_t<common::detail::is_key_value_iterable<U>::value>* = nullptr>
inline void Add(T value, const U &attributes) noexcept
-
template<class U, nostd::enable_if_t<common::detail::is_key_value_iterable<U>::value>* = nullptr>
inline void Add(T value, const U &attributes, const context::Context &context) noexcept
-
inline void Add(T value, std::initializer_list<std::pair<nostd::string_view, common::AttributeValue>> attributes) noexcept
-
inline void Add(T value, std::initializer_list<std::pair<nostd::string_view, common::AttributeValue>> attributes, const context::Context &context) noexcept
-
virtual void Add(T value) noexcept = 0