Package io.opencensus.metrics
Class MetricsComponent
- java.lang.Object
-
- io.opencensus.metrics.MetricsComponent
-
- Direct Known Subclasses:
MetricsComponent.NoopMetricsComponent,MetricsComponentImplBase
@ExperimentalApi public abstract class MetricsComponent extends java.lang.Object
Class that holds the implementation instance forExportComponent.- Since:
- 0.17
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classMetricsComponent.NoopMetricsComponent
-
Constructor Summary
Constructors Constructor Description MetricsComponent()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ExportComponentgetExportComponent()Returns theExportComponentwith the provided implementation.abstract MetricRegistrygetMetricRegistry()Returns theMetricRegistrywith the provided implementation.(package private) static MetricsComponentnewNoopMetricsComponent()Returns an instance that contains no-op implementations for all the instances.
-
-
-
Method Detail
-
getExportComponent
public abstract ExportComponent getExportComponent()
Returns theExportComponentwith the provided implementation. If no implementation is provided then no-op implementations will be used.- Returns:
- the
ExportComponentimplementation. - Since:
- 0.17
-
getMetricRegistry
public abstract MetricRegistry getMetricRegistry()
Returns theMetricRegistrywith the provided implementation.- Returns:
- the
MetricRegistryimplementation. - Since:
- 0.17
-
newNoopMetricsComponent
static MetricsComponent newNoopMetricsComponent()
Returns an instance that contains no-op implementations for all the instances.- Returns:
- an instance that contains no-op implementations for all the instances.
-
-