Class View

java.lang.Object
io.opentelemetry.sdk.metrics.View

@Immutable public abstract class View extends 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
  • Method Details

    • builder

      public static ViewBuilder builder()
      Returns a builder for a View.
    • getName

      @Nullable public abstract String getName()
      Returns the name of the resulting metric, or null if the matched instrument name should be used.
    • getDescription

      @Nullable public abstract String getDescription()
      Returns the description of the resulting metric, or null if the matched instrument description should be used.
    • getAggregation

      public abstract Aggregation getAggregation()
      Returns the aggregation of the resulting metric.
    • toString

      public final String toString()
      Overrides:
      toString in class Object