Class ApplicationOpenTelemetry

java.lang.Object
io.helidon.telemetry.opentelemetry.ApplicationOpenTelemetry

public final class ApplicationOpenTelemetry extends Object
Shared OpenTelemetry selection used by Helidon telemetry integrations.
  • Method Details

    • applicationOpenTelemetry

      public static io.opentelemetry.api.OpenTelemetry applicationOpenTelemetry(Config config, List<OpenTelemetryOwnershipStrategy> strategies)
      Selects the OpenTelemetry instance for the current application using the configured ownership strategies.
      Parameters:
      config - root configuration
      strategies - available ownership strategies
      Returns:
      selected OpenTelemetry instance
    • applicationOpenTelemetry

      public static io.opentelemetry.api.OpenTelemetry applicationOpenTelemetry(ServiceRegistry registry, Config config, List<OpenTelemetryOwnershipStrategy> strategies, Supplier<io.opentelemetry.api.OpenTelemetry> registryOpenTelemetry)
      Selects the OpenTelemetry instance for the current application and caches the selection for the service registry.
      Parameters:
      registry - service registry
      config - root configuration
      strategies - available ownership strategies
      registryOpenTelemetry - supplier for an existing registry-provided OpenTelemetry instance
      Returns:
      selected OpenTelemetry instance
    • clearApplicationTelemetry

      public static void clearApplicationTelemetry(ServiceRegistry registry)
      Clears and closes any OpenTelemetry selection cached for the service registry.
      Parameters:
      registry - service registry
    • applicationTelemetryCached

      public static boolean applicationTelemetryCached(ServiceRegistry registry)
      Reports whether an OpenTelemetry selection is cached for the service registry.
      Parameters:
      registry - service registry
      Returns:
      whether the registry has a cached selection