Interface MetricDescriptorStrategy
-
public interface MetricDescriptorStrategyThe strategy for how to handle metric descriptors.
-
-
Field Summary
Fields Modifier and Type Field Description static MetricDescriptorStrategyALWAYS_SENDA strategy that always sends metric descriptors.static MetricDescriptorStrategyNEVER_SENDA strategy that never sends metric descriptors and relies on auto-creation.static MetricDescriptorStrategySEND_ONCEA strategy that sends descriptors once per classloader instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidexportDescriptors(java.lang.Iterable<com.google.api.MetricDescriptor> batchDescriptors, java.util.function.Consumer<com.google.api.MetricDescriptor> export)Determines what to do with metric descriptors.
-
-
-
Field Detail
-
ALWAYS_SEND
static final MetricDescriptorStrategy ALWAYS_SEND
A strategy that always sends metric descriptors.This means EVERY create timeseries call will include several metric descriptor calls. This is not recommended.
-
NEVER_SEND
static final MetricDescriptorStrategy NEVER_SEND
A strategy that never sends metric descriptors and relies on auto-creation.
-
SEND_ONCE
static final MetricDescriptorStrategy SEND_ONCE
A strategy that sends descriptors once per classloader instance.
-
-
Method Detail
-
exportDescriptors
void exportDescriptors(java.lang.Iterable<com.google.api.MetricDescriptor> batchDescriptors, java.util.function.Consumer<com.google.api.MetricDescriptor> export)Determines what to do with metric descriptors.- Parameters:
batchDescriptors- The set of metrics being exported in a batch.export- A consumer that will ensure metric descriptors are registered to cloud monitoring.
-
-