Package io.opencensus.trace
Class TraceComponent
- java.lang.Object
-
- io.opencensus.trace.TraceComponent
-
- Direct Known Subclasses:
TraceComponent.NoopTraceComponent,TraceComponentImpl,TraceComponentImpl,TraceComponentImplLite,TraceComponentImplLite
public abstract class TraceComponent extends java.lang.ObjectClass that holds the implementation instances forTracer,PropagationComponent,Clock,ExportComponentandTraceConfig.Unless otherwise noted all methods (on component) results are cacheable.
- Since:
- 0.5
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classTraceComponent.NoopTraceComponent
-
Constructor Summary
Constructors Constructor Description TraceComponent()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ClockgetClock()Returns theClockwith the provided implementation.abstract ExportComponentgetExportComponent()Returns theExportComponentwith the provided implementation.abstract PropagationComponentgetPropagationComponent()Returns thePropagationComponentwith the provided implementation.abstract TraceConfiggetTraceConfig()Returns theTraceConfigwith the provided implementation.abstract TracergetTracer()Returns theTracerwith the provided implementations.(package private) static TraceComponentnewNoopTraceComponent()Returns an instance that contains no-op implementations for all the instances.
-
-
-
Method Detail
-
getTracer
public abstract Tracer getTracer()
Returns theTracerwith the provided implementations. If no implementation is provided then no-op implementations will be used.- Returns:
- the
Tracerimplementation. - Since:
- 0.5
-
getPropagationComponent
public abstract PropagationComponent getPropagationComponent()
Returns thePropagationComponentwith the provided implementation. If no implementation is provided then no-op implementation will be used.- Returns:
- the
PropagationComponentimplementation. - Since:
- 0.5
-
getClock
public abstract Clock getClock()
Returns theClockwith the provided implementation.- Returns:
- the
Clockimplementation. - Since:
- 0.5
-
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.5
-
getTraceConfig
public abstract TraceConfig getTraceConfig()
Returns theTraceConfigwith the provided implementation. If no implementation is provided then no-op implementations will be used.- Returns:
- the
TraceConfigimplementation. - Since:
- 0.5
-
newNoopTraceComponent
static TraceComponent newNoopTraceComponent()
Returns an instance that contains no-op implementations for all the instances.- Returns:
- an instance that contains no-op implementations for all the instances.
-
-