Class ViewRegistry
java.lang.Object
io.opentelemetry.sdk.metrics.internal.view.ViewRegistry
Central location for Views to be registered. Registration of a view is done via the
SdkMeterProviderBuilder.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ViewRegistrycreate()Return aViewRegistryusing the default aggregation and no views registered.static ViewRegistrycreate(DefaultAggregationSelector defaultAggregationSelector, CardinalityLimitSelector cardinalityLimitSelector, List<RegisteredView> registeredViews) Returns aViewRegistry.findViews(InstrumentDescriptor descriptor, InstrumentationScopeInfo meterScope) Returns the metricViewfor a given instrument.
-
Method Details
-
create
public static ViewRegistry create(DefaultAggregationSelector defaultAggregationSelector, CardinalityLimitSelector cardinalityLimitSelector, List<RegisteredView> registeredViews) Returns aViewRegistry. -
create
Return aViewRegistryusing the default aggregation and no views registered. -
findViews
public List<RegisteredView> findViews(InstrumentDescriptor descriptor, InstrumentationScopeInfo meterScope) Returns the metricViewfor a given instrument.- Parameters:
descriptor- description of the instrument.- Returns:
- The list of
Views for this instrument, or a default view.
-