Class DefaultAggregation
java.lang.Object
io.opentelemetry.sdk.metrics.internal.view.DefaultAggregation
- All Implemented Interfaces:
Aggregation
,AggregatorFactory
Aggregation that selects the specified default based on instrument.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Aggregation
private static final ThrottlingLogger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends PointData,
U extends ExemplarData>
Aggregator<T, U> createAggregator
(InstrumentDescriptor instrumentDescriptor, ExemplarFilter exemplarFilter, MemoryMode memoryMode) Returns a newAggregator
.static Aggregation
boolean
isCompatibleWithInstrument
(InstrumentDescriptor instrumentDescriptor) Determine if theAggregator
produced byAggregatorFactory.createAggregator(InstrumentDescriptor, ExemplarFilter, MemoryMode)
is compatible with theinstrumentDescriptor
.private static Aggregation
resolve
(InstrumentDescriptor instrument, boolean withAdvice) toString()
-
Field Details
-
INSTANCE
-
logger
-
-
Constructor Details
-
DefaultAggregation
private DefaultAggregation()
-
-
Method Details
-
getInstance
-
resolve
-
createAggregator
public <T extends PointData,U extends ExemplarData> Aggregator<T,U> createAggregator(InstrumentDescriptor instrumentDescriptor, ExemplarFilter exemplarFilter, MemoryMode memoryMode) Description copied from interface:AggregatorFactory
Returns a newAggregator
.- Specified by:
createAggregator
in interfaceAggregatorFactory
- Parameters:
instrumentDescriptor
- the descriptor of theInstrument
that will record measurements.exemplarFilter
- the filter on which measurements should turn into exemplarsmemoryMode
- TheMemoryMode
the aggregator will use- Returns:
- a new
Aggregator
.Aggregator.drop()
indicates no measurements should be recorded.
-
isCompatibleWithInstrument
Description copied from interface:AggregatorFactory
Determine if theAggregator
produced byAggregatorFactory.createAggregator(InstrumentDescriptor, ExemplarFilter, MemoryMode)
is compatible with theinstrumentDescriptor
.- Specified by:
isCompatibleWithInstrument
in interfaceAggregatorFactory
-
toString
-