Package io.opentelemetry.sdk.metrics
Class View
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.View
-
- Direct Known Subclasses:
AutoValue_View
@Immutable public abstract class View extends java.lang.Object
A view configures how measurements are aggregated and exported as metrics.Views are registered with the SDK
SdkMeterProviderBuilder.registerView(InstrumentSelector, View)
.- Since:
- 1.14.0
-
-
Constructor Summary
Constructors Constructor Description View()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ViewBuilder
builder()
(package private) static View
create(java.lang.String name, java.lang.String description, Aggregation aggregation, AttributesProcessor attributesProcessor, int cardinalityLimit)
abstract Aggregation
getAggregation()
Returns the aggregation of the resulting metric.(package private) abstract AttributesProcessor
getAttributesProcessor()
Returns the attribute processor used for this view.abstract int
getCardinalityLimit()
Returns the cardinality limit for this view.abstract java.lang.String
getDescription()
Returns the description of the resulting metric, ornull
if the matched instrument description should be used.abstract java.lang.String
getName()
Returns the name of the resulting metric, ornull
if the matched instrument name should be used.java.lang.String
toString()
-
-
-
Method Detail
-
builder
public static ViewBuilder builder()
-
create
static View create(@Nullable java.lang.String name, @Nullable java.lang.String description, Aggregation aggregation, AttributesProcessor attributesProcessor, int cardinalityLimit)
-
getName
@Nullable public abstract java.lang.String getName()
Returns the name of the resulting metric, ornull
if the matched instrument name should be used.
-
getDescription
@Nullable public abstract java.lang.String getDescription()
Returns the description of the resulting metric, ornull
if the matched instrument description should be used.
-
getAggregation
public abstract Aggregation getAggregation()
Returns the aggregation of the resulting metric.
-
getAttributesProcessor
abstract AttributesProcessor getAttributesProcessor()
Returns the attribute processor used for this view.
-
getCardinalityLimit
public abstract int getCardinalityLimit()
Returns the cardinality limit for this view.- Since:
- 1.44.0
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-