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 fromObservableLongMeasurementorObservableDoubleMeasurement.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 ImmutableMeasurementcreateDouble(long startEpochNanos, long epochNanos, double value, Attributes attributes)(package private) static ImmutableMeasurementcreateLong(long startEpochNanos, long epochNanos, long value, Attributes attributes)MeasurementwithAttributes(Attributes attributes)Updates the attributes.MeasurementwithStartEpochNanos(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:MeasurementUpdates the attributes.- Specified by:
withAttributesin interfaceMeasurement- Parameters:
attributes- The attributes to update- Returns:
- The updated object. For
ImmutableMeasurementit will be a new object with the updated attributes and forMutableMeasurementit will return itself with the attributes updated
-
withStartEpochNanos
public Measurement withStartEpochNanos(long startEpochNanos)
Description copied from interface:MeasurementUpdates the startEpochNanos.- Specified by:
withStartEpochNanosin interfaceMeasurement- Parameters:
startEpochNanos- start epoch nanosecond- Returns:
- The updated object. For
ImmutableMeasurementit will be a new object with the updated startEpochNanos and forMutableMeasurementit will return itself with the startEpochNanos updated
-
-