Interface Exemplar
-
- All Known Implementing Classes:
DoubleExemplar,LongExemplar
@Immutable public interface ExemplarA 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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetEpochNanos()Returns the timestamp in nanos when measurement was collected.io.opentelemetry.api.common.AttributesgetFilteredAttributes()The set of key/value pairs that were filtered out by the aggregator, but recorded alongside the original measurement.StringgetSpanId()(Optional) Span ID of the exemplar trace.StringgetTraceId()(Optional) Trace ID of the exemplar trace.doublegetValueAsDouble()Coerces this exemplar to a double value.
-
-
-
Method Detail
-
getFilteredAttributes
io.opentelemetry.api.common.Attributes 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
-
getEpochNanos
long getEpochNanos()
Returns the timestamp in nanos when measurement was collected.
-
getSpanId
@Nullable String getSpanId()
(Optional) Span ID of the exemplar trace.Span ID may be
nullif the measurement is not recorded inside a trace or the trace was not sampled.
-
getTraceId
@Nullable String getTraceId()
(Optional) Trace ID of the exemplar trace.Trace ID may be
nullif the measurement is not recorded inside a trace or if the trace is not sampled.
-
getValueAsDouble
double getValueAsDouble()
Coerces this exemplar to a double value.Note: This could createa a loss of precision from
longmeasurements.
-
-