Class ImmutableMeasurement
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.internal.state.ImmutableMeasurement
-
- All Implemented Interfaces:
Measurement
- Direct Known Subclasses:
AutoValue_ImmutableMeasurement
public abstract class ImmutableMeasurement extends java.lang.Object implements Measurement
A long or double measurement recorded fromObservableLongMeasurement
orObservableDoubleMeasurement
.This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
-
Constructor Summary
Constructors Constructor Description ImmutableMeasurement()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static ImmutableMeasurement
createDouble(long startEpochNanos, long epochNanos, double value, Attributes attributes)
(package private) static ImmutableMeasurement
createLong(long startEpochNanos, long epochNanos, long value, Attributes attributes)
Measurement
withAttributes(Attributes attributes)
Updates the attributes.Measurement
withStartEpochNanos(long startEpochNanos)
Updates the startEpochNanos.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.opentelemetry.sdk.metrics.internal.state.Measurement
attributes, doubleValue, epochNanos, hasDoubleValue, hasLongValue, longValue, startEpochNanos
-
-
-
-
Method Detail
-
createDouble
static ImmutableMeasurement createDouble(long startEpochNanos, long epochNanos, double value, Attributes attributes)
-
createLong
static ImmutableMeasurement createLong(long startEpochNanos, long epochNanos, long value, Attributes attributes)
-
withAttributes
public Measurement withAttributes(Attributes attributes)
Description copied from interface:Measurement
Updates the attributes.- Specified by:
withAttributes
in interfaceMeasurement
- Parameters:
attributes
- The attributes to update- Returns:
- The updated object. For
ImmutableMeasurement
it will be a new object with the updated attributes and forMutableMeasurement
it will return itself with the attributes updated
-
withStartEpochNanos
public Measurement withStartEpochNanos(long startEpochNanos)
Description copied from interface:Measurement
Updates the startEpochNanos.- Specified by:
withStartEpochNanos
in interfaceMeasurement
- Parameters:
startEpochNanos
- start epoch nanosecond- Returns:
- The updated object. For
ImmutableMeasurement
it will be a new object with the updated startEpochNanos and forMutableMeasurement
it will return itself with the startEpochNanos updated
-
-