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 class
MetricsComponent.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 ExportComponent
getExportComponent()
Returns theExportComponent
with the provided implementation.abstract MetricRegistry
getMetricRegistry()
Returns theMetricRegistry
with the provided implementation.(package private) static MetricsComponent
newNoopMetricsComponent()
Returns an instance that contains no-op implementations for all the instances.
-
-
-
Method Detail
-
getExportComponent
public abstract ExportComponent getExportComponent()
Returns theExportComponent
with the provided implementation. If no implementation is provided then no-op implementations will be used.- Returns:
- the
ExportComponent
implementation. - Since:
- 0.17
-
getMetricRegistry
public abstract MetricRegistry getMetricRegistry()
Returns theMetricRegistry
with the provided implementation.- Returns:
- the
MetricRegistry
implementation. - 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.
-
-