Class TracingHandle

java.lang.Object
codes.grow.packages.jaeger.tracing.TracingHandle
All Implemented Interfaces:
AutoCloseable

public final class TracingHandle extends Object implements AutoCloseable
  • Constructor Details

  • Method Details

    • openTelemetry

      public io.opentelemetry.sdk.OpenTelemetrySdk openTelemetry()
      The OpenTelemetry SDK instance.
      Returns:
      SDK
    • tracerProvider

      public io.opentelemetry.sdk.trace.SdkTracerProvider tracerProvider()
      The tracer provider.
      Returns:
      tracer provider
    • propagators

      public io.opentelemetry.context.propagation.ContextPropagators propagators()
      The configured propagators.
      Returns:
      propagators
    • config

      public TracingConfig config()
      The config this handle was created from.
      Returns:
      config
    • tracer

      public io.opentelemetry.api.trace.Tracer tracer(String name)
      Returns a tracer.
      Parameters:
      name - instrumentation scope name
      Returns:
      tracer
    • tracer

      public io.opentelemetry.api.trace.Tracer tracer(String name, String version)
      Returns a tracer with a scope version.
      Parameters:
      name - instrumentation scope name
      version - instrumentation scope version
      Returns:
      tracer
    • forceFlush

      public void forceFlush()
      Exports all finished spans, waiting at most the export timeout.
      Throws:
      TimeoutException - when the export does not finish in time
    • forceFlush

      public void forceFlush(Duration timeout)
      Exports all finished spans.
      Parameters:
      timeout - maximum wait
      Throws:
      TimeoutException - when the export does not finish (or fails) in time
    • forceFlushAsync

      public CompletableFuture<Void> forceFlushAsync(Duration timeout)
      Asynchronous forceFlush(Duration).
      Parameters:
      timeout - maximum wait
      Returns:
      completes when flushed
    • shutdown

      public void shutdown()
      Flushes and shuts the tracer provider down; idempotent.
      Throws:
      TimeoutException - when shutting down takes longer than the export timeout
    • shutdownAsync

      public CompletableFuture<Void> shutdownAsync()
      Asynchronous shutdown().
      Returns:
      completes when shut down
    • isShutdown

      public boolean isShutdown()
      Whether shutdown() was called.
      Returns:
      shutdown flag
    • close

      public void close()
      Same as shutdown().
      Specified by:
      close in interface AutoCloseable