Class KeyValueIterable

Inheritance Relationships

Derived Type

Class Documentation

class KeyValueIterable

Supports internal iteration over a collection of key-value pairs.

Subclassed by opentelemetry::common::NoopKeyValueIterable

Public Functions

virtual ~KeyValueIterable() = default
virtual bool ForEachKeyValue(nostd::function_ref<bool(nostd::string_view, common::AttributeValue)> callback) const noexcept = 0

Iterate over key-value pairs


callback – a callback to invoke for each key-value. If the callback returns false, the iteration is aborted.


true if every key-value pair was iterated over

virtual size_t size() const noexcept = 0

the number of key-value pairs