Interface TracerSdkManagement

  • All Known Implementing Classes:
    TracerSdkProvider

    public interface TracerSdkManagement
    "Management" interface for the Tracing SDK. This interface exposes methods for configuring the Tracing SDK, as well as several lifecycle methods.
    • Method Detail

      • getActiveTraceConfig

        TraceConfig getActiveTraceConfig()
        Returns the active TraceConfig.
        Returns:
        the active TraceConfig.
      • addSpanProcessor

        void addSpanProcessor​(SpanProcessor spanProcessor)
        Adds a new SpanProcessor to this Tracer.

        Any registered processor cause overhead, consider to use an async/batch processor especially for span exporting, and export to multiple backends using the MultiSpanExporter.

        Parameters:
        spanProcessor - the new SpanProcessor to be added.
      • shutdown

        void shutdown()
        Attempts to stop all the activity for this Tracer. Calls SpanProcessor.shutdown() for all registered SpanProcessors.

        This operation may block until all the Spans are processed. Must be called before turning off the main application to ensure all data are processed and exported.

        After this is called all the newly created Spans will be no-op.

      • forceFlush

        io.opentelemetry.sdk.common.CompletableResultCode forceFlush()
        Requests the active span processor to process all span events that have not yet been processed and returns a CompletableResultCode which is completed when the flush is finished.
        See Also:
        SpanProcessor.forceFlush()