Interface OpenTelemetryConfig
- All Superinterfaces:
Prototype.Api, Prototype.Factory<HelidonOpenTelemetry>
- All Known Implementing Classes:
OpenTelemetryConfig.BuilderBase.OpenTelemetryConfigImpl
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forHelidonOpenTelemetry.static classOpenTelemetryConfig.BuilderBase<BUILDER extends OpenTelemetryConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends OpenTelemetryConfig>Fluent API builder base forOpenTelemetryConfig. -
Method Summary
Modifier and TypeMethodDescriptionstatic OpenTelemetryConfig.Builderbuilder()Create a new fluent API builder to customize configuration.static OpenTelemetryConfig.Builderbuilder(OpenTelemetryConfig instance) Create a new fluent API builder from an existing instance.static OpenTelemetryConfigcreate()Create a new instance with default values.static OpenTelemetryConfigCreate a new instance from configuration.booleanenabled()Whether the OpenTelemetry support is enabled.booleanglobal()Whether theOpenTelemetryinstance created from this configuration should be published as the OpenTelemetry global instance before any other code initializesGlobalOpenTelemetry, because OpenTelemetry globals are JVM-wide and can be assigned only once; if an OpenTelemetry global already exists, Helidon leaves it unchanged and uses the existing global as the application OpenTelemetry instance.logging()OpenTelemetry logging settings.metrics()OpenTelemetry metrics settings.io.opentelemetry.api.OpenTelemetryTheOpenTelemetryinstance to use for telemetry.List<io.opentelemetry.context.propagation.TextMapPropagator> OpenTelemetryTextMapPropagatorinstances added explicitly by the app.booleanWhether this configuration should contribute the application-wideOpenTelemetryinstance through Helidon's service registry ownership path.default Optional<OpenTelemetryResourceConfig> resource()Resource settings shared by all configured signals.service()Service name used in sending telemetry data to the collector.tracing()OpenTelemetry tracing settings.Methods inherited from interface Prototype.Factory
buildModifier and TypeMethodDescriptionbuild()Create a new instance of the runtime type from this config object.
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
service
String service()Service name used in sending telemetry data to the collector.- Returns:
- service name
-
resource
Resource settings shared by all configured signals.- Returns:
- resource settings
-
enabled
boolean enabled()Whether the OpenTelemetry support is enabled.- Returns:
- true if enabled; false otherwise
-
registered
boolean registered()Whether this configuration should contribute the application-wideOpenTelemetryinstance through Helidon's service registry ownership path.- Returns:
- true if the configured instance should be application-wide when resolved by the service registry; false otherwise
-
global
boolean global()Whether theOpenTelemetryinstance created from this configuration should be published as the OpenTelemetry global instance before any other code initializesGlobalOpenTelemetry, because OpenTelemetry globals are JVM-wide and can be assigned only once; if an OpenTelemetry global already exists, Helidon leaves it unchanged and uses the existing global as the application OpenTelemetry instance.- Returns:
- true if the configured instance should be published to OpenTelemetry global; false otherwise
-
propagators
List<io.opentelemetry.context.propagation.TextMapPropagator> propagators()OpenTelemetryTextMapPropagatorinstances added explicitly by the app.Default: "tracecontext,baggage".
- Returns:
- propagators
- See Also:
-
tracing
Optional<OpenTelemetryTracingConfig> tracing()OpenTelemetry tracing settings.- Returns:
- tracing settings
-
metrics
Optional<OpenTelemetryMetricsConfig> metrics()OpenTelemetry metrics settings.- Returns:
- metrics settings
-
logging
Optional<OpenTelemetryLoggingConfig> logging()OpenTelemetry logging settings.- Returns:
- logging settings
-
openTelemetry
io.opentelemetry.api.OpenTelemetry openTelemetry()TheOpenTelemetryinstance to use for telemetry.Typically, this value will be the OpenTelemetry SDK instance created using this configuration, unless application code has set the instance explicitly on the builder.
- Returns:
- the OpenTelemetry instance
-