Class HelidonOpenTelemetry.AgentDetector
java.lang.Object
io.helidon.tracing.providers.opentelemetry.HelidonOpenTelemetry.AgentDetector
- Enclosing class:
HelidonOpenTelemetry
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 Summary
Modifier and TypeMethodDescriptionstatic boolean
isAgentPresent
(Config config) Check if the OTEL Agent is present.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.
-
Method Details
-
isAgentPresent
Check if the OTEL Agent is present.- Parameters:
config
- Configuration- Returns:
- boolean
-
useExistingGlobalOpenTelemetry
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
-