Class ApplicationOpenTelemetry
java.lang.Object
io.helidon.telemetry.opentelemetry.ApplicationOpenTelemetry
Shared OpenTelemetry selection used by Helidon telemetry integrations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.opentelemetry.api.OpenTelemetryapplicationOpenTelemetry(Config config, List<OpenTelemetryOwnershipStrategy> strategies) Selects the OpenTelemetry instance for the current application using the configured ownership strategies.static io.opentelemetry.api.OpenTelemetryapplicationOpenTelemetry(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.static booleanapplicationTelemetryCached(ServiceRegistry registry) Reports whether an OpenTelemetry selection is cached for the service registry.static voidclearApplicationTelemetry(ServiceRegistry registry) Clears and closes any OpenTelemetry selection cached for the service registry.
-
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 configurationstrategies- 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 registryconfig- root configurationstrategies- available ownership strategiesregistryOpenTelemetry- supplier for an existing registry-provided OpenTelemetry instance- Returns:
- selected OpenTelemetry instance
-
clearApplicationTelemetry
Clears and closes any OpenTelemetry selection cached for the service registry.- Parameters:
registry- service registry
-
applicationTelemetryCached
Reports whether an OpenTelemetry selection is cached for the service registry.- Parameters:
registry- service registry- Returns:
- whether the registry has a cached selection
-