Class HelidonOpenTelemetry.AgentDetector

java.lang.Object
io.helidon.tracing.providers.opentelemetry.HelidonOpenTelemetry.AgentDetector
Enclosing class:
HelidonOpenTelemetry

public static final class HelidonOpenTelemetry.AgentDetector extends Object
Check if OpenTelemetry is present by indirect properties. This class does best explicit check if OTEL_AGENT_PRESENT_PROPERTY config property is set and uses its value to set the behaviour of OpenTelemetry producer. If the value is not explicitly set, the detector does best effort to estimate indirect means if the agent is present. This detector may stop working if OTEL changes the indirect indicators.
  • Method Details

    • isAgentPresent

      public static boolean isAgentPresent(Config config)
      Check if the OTEL Agent is present.
      Parameters:
      config - Configuration
      Returns:
      boolean
    • useExistingGlobalOpenTelemetry

      public static boolean useExistingGlobalOpenTelemetry(Config config)
      Return whether the user has requested that Helidon use an existing global OpenTelemetry instance rather than creating one itself; specifying that the OpenTelemetry agent is present automatically implies using the agent's existing instance.
      Parameters:
      config - configuration potentially containing the setting
      Returns:
      true if Helidon is configured to use an existing global OpenTelemetry instance; false otherwise