Class TraceComponent

java.lang.Object
io.opencensus.trace.TraceComponent
Direct Known Subclasses:
TraceComponent.NoopTraceComponent, TraceComponentImpl, TraceComponentImpl, TraceComponentImplLite, TraceComponentImplLite

public abstract class TraceComponent extends Object
Class that holds the implementation instances for Tracer, PropagationComponent, Clock, ExportComponent and TraceConfig.

Unless otherwise noted all methods (on component) results are cacheable.

Since:
0.5
  • Constructor Details

    • TraceComponent

      public TraceComponent()
  • Method Details

    • getTracer

      public abstract Tracer getTracer()
      Returns the Tracer with the provided implementations. If no implementation is provided then no-op implementations will be used.
      Returns:
      the Tracer implementation.
      Since:
      0.5
    • getPropagationComponent

      public abstract PropagationComponent getPropagationComponent()
      Returns the PropagationComponent with the provided implementation. If no implementation is provided then no-op implementation will be used.
      Returns:
      the PropagationComponent implementation.
      Since:
      0.5
    • getClock

      public abstract Clock getClock()
      Returns the Clock with the provided implementation.
      Returns:
      the Clock implementation.
      Since:
      0.5
    • getExportComponent

      public abstract ExportComponent getExportComponent()
      Returns the ExportComponent with the provided implementation. If no implementation is provided then no-op implementations will be used.
      Returns:
      the ExportComponent implementation.
      Since:
      0.5
    • getTraceConfig

      public abstract TraceConfig getTraceConfig()
      Returns the TraceConfig with the provided implementation. If no implementation is provided then no-op implementations will be used.
      Returns:
      the TraceConfig implementation.
      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.