Class ImmutableMeasurement
java.lang.Object
io.opentelemetry.sdk.metrics.internal.state.ImmutableMeasurement
- All Implemented Interfaces:
Measurement
A long or double measurement recorded from
ObservableLongMeasurement or ObservableDoubleMeasurement.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwithAttributes(Attributes attributes) Updates the attributes.withStartEpochNanos(long startEpochNanos) Updates the startEpochNanos.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Measurement
attributes, doubleValue, epochNanos, hasDoubleValue, hasLongValue, longValue, startEpochNanos
-
Constructor Details
-
ImmutableMeasurement
public ImmutableMeasurement()
-
-
Method Details
-
withAttributes
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
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
-