Interface OpenTelemetryOwnershipStrategy


@Contract public interface OpenTelemetryOwnershipStrategy
Strategy for contributing an application-wide OpenTelemetry runtime candidate.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    active(Config rootConfig)
    Whether this strategy should own the application-wide OpenTelemetry runtime for the current configuration.
    io.opentelemetry.api.OpenTelemetry
    create(Config rootConfig)
    Creates this strategy's OpenTelemetry runtime candidate.
    default boolean
    global(Config rootConfig)
    Whether the selected application-wide OpenTelemetry instance should be published to GlobalOpenTelemetry.
    default void
    selected(Config rootConfig, io.opentelemetry.api.OpenTelemetry openTelemetry)
    Invoked once this strategy's runtime has been selected.
    serviceName(Config rootConfig)
    Service name configured for this ownership strategy.
  • Method Details

    • active

      boolean active(Config rootConfig)
      Whether this strategy should own the application-wide OpenTelemetry runtime for the current configuration.
      Parameters:
      rootConfig - root configuration
      Returns:
      whether this strategy is active
    • serviceName

      String serviceName(Config rootConfig)
      Service name configured for this ownership strategy.
      Parameters:
      rootConfig - root configuration
      Returns:
      service name
    • create

      io.opentelemetry.api.OpenTelemetry create(Config rootConfig)
      Creates this strategy's OpenTelemetry runtime candidate.
      Parameters:
      rootConfig - root configuration
      Returns:
      OpenTelemetry runtime candidate
    • global

      default boolean global(Config rootConfig)
      Whether the selected application-wide OpenTelemetry instance should be published to GlobalOpenTelemetry.
      Parameters:
      rootConfig - root configuration
      Returns:
      whether Helidon should publish the selected instance to the OpenTelemetry global
    • selected

      default void selected(Config rootConfig, io.opentelemetry.api.OpenTelemetry openTelemetry)
      Invoked once this strategy's runtime has been selected.
      Parameters:
      rootConfig - root configuration
      openTelemetry - canonical OpenTelemetry runtime