Class ExemplarData

Class Documentation

class ExemplarData

A sample input measurement.

Exemplars also hold information about the environment when the measurement was recorded, for example the span and trace ID of the active span when the exemplar was recorded.

Public Functions

inline MetricAttributes GetFilteredAttributes()

The set of key/value pairs that were filtered out by the aggregator, but recorded alongside the original measurement. Only key/value pairs that were filtered out by the aggregator should be included

inline opentelemetry::common::SystemTimestamp GetEpochNanos()

Returns the timestamp in nanos when measurement was collected.

inline const trace::SpanContext &GetSpanContext() const noexcept

Returns the SpanContext associated with this exemplar. If the exemplar was not recorded inside a sampled trace, the Context will be invalid.

Public Static Functions

static inline ExemplarData Create(std::shared_ptr<trace::SpanContext> context, const opentelemetry::common::SystemTimestamp &timestamp, const PointDataAttributes &point_data_attr)
static inline PointType CreateSumPointData(ValueType value)
static inline PointType CreateLastValuePointData(ValueType value)
static inline PointType CreateDropPointData()