Package io.opentelemetry.sdk.metrics
Class SdkMeter.MultiWritableMetricStorage
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.SdkMeter.MultiWritableMetricStorage
-
- All Implemented Interfaces:
WriteableMetricStorage
- Enclosing class:
- SdkMeter
private static class SdkMeter.MultiWritableMetricStorage extends java.lang.Object implements WriteableMetricStorage
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<? extends WriteableMetricStorage>
storages
-
Constructor Summary
Constructors Modifier Constructor Description private
MultiWritableMetricStorage(java.util.List<? extends WriteableMetricStorage> storages)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isEnabled()
Returnstrue
if the storage is actively recording measurements, andfalse
otherwise (i.e.void
recordDouble(double value, Attributes attributes, Context context)
Records a measurement.void
recordLong(long value, Attributes attributes, Context context)
Records a measurement.
-
-
-
Field Detail
-
storages
private final java.util.List<? extends WriteableMetricStorage> storages
-
-
Constructor Detail
-
MultiWritableMetricStorage
private MultiWritableMetricStorage(java.util.List<? extends WriteableMetricStorage> storages)
-
-
Method Detail
-
recordLong
public void recordLong(long value, Attributes attributes, Context context)
Description copied from interface:WriteableMetricStorage
Records a measurement.- Specified by:
recordLong
in interfaceWriteableMetricStorage
-
recordDouble
public void recordDouble(double value, Attributes attributes, Context context)
Description copied from interface:WriteableMetricStorage
Records a measurement.- Specified by:
recordDouble
in interfaceWriteableMetricStorage
-
isEnabled
public boolean isEnabled()
Description copied from interface:WriteableMetricStorage
Returnstrue
if the storage is actively recording measurements, andfalse
otherwise (i.e. noop / empty metric storage is installed).- Specified by:
isEnabled
in interfaceWriteableMetricStorage
-
-