Details
-
Bug
-
Resolution: Done
-
Major
-
28.0.0.Final, 28.0.1.Final
-
None
Description
Due to the new way opentelemetry is integrated, or more precisely due to the new way the OpenTelemetry object is created and configured it's no longer possible to configure the sampler-type property of the opentelemetry subsystem (or otel.traces.sampler resp.) correctly.
The subsystem limits the possible config values to "on", "off", and "ratio". In previous versions this did work out since the sampler was created by the subsystem itself (here https://github.com/wildfly/wildfly/blob/27.0.1.Final/observability/opentelemetry/src/main/java/org/wildfly/extension/opentelemetry/OpenTelemetryHolder.java#L98)
Now the subsystem just collects and adapts the configuration, and forwards it to smallrye-opentelemetry, which in turn uses the autoconfig feature of the opentelemetry-java SDK. There, the possible values for sampler type are limited to values like: "always_on", "always_of", "traceidratio", etc. (see here https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#sampler)
So if sampler-type is configured, it can only be "on", "off" or "ratio" which will be declined by the autoconfig, and thus WildFly startup fails.