Interface MicrometerConfig
@ConfigMapping(prefix="quarkus.micrometer")
@ConfigRoot(phase=BUILD_AND_RUN_TIME_FIXED)
public interface MicrometerConfig
Global configuration for the Micrometer extension
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuild / static runtime config for bindersstatic interfacestatic interfaceBuild / static runtime config for exporters -
Method Summary
Modifier and TypeMethodDescriptionbinder()Build / static runtime config for bindersbooleanMicrometer MeterBinder discovery.default booleanDeprecated.default booleanFor MeterRegistry configurations with optional 'enabled' attributes, determine whether the registry is enabled usingregistryEnabledDefault()as the default value.booleanenabled()Micrometer metrics support.export()Build / static runtime config for exportersdefault booleanDetermines if a capability is enabled based on theMicrometerConfigconfigurations and the following rules:default booleanDetermines if a capability is enabled based on theMicrometerConfigconfigurations and the following rules:booleanMicrometer MeterRegistry discovery.
-
Method Details
-
enabled
@WithDefault("true") boolean enabled()Micrometer metrics support.Micrometer metrics support is enabled by default.
-
registryEnabledDefault
@WithDefault("true") boolean registryEnabledDefault()Micrometer MeterRegistry discovery.Micrometer MeterRegistry implementations discovered on the classpath will be enabled automatically by default.
-
binderEnabledDefault
@WithDefault("true") boolean binderEnabledDefault()Micrometer MeterBinder discovery. In other words, enables the automatic metrics instrumentation.Micrometer MeterBinder implementations discovered on the classpath will be enabled automatically by default. In other words, automatic metrics instrumentation will be ON by default.
quarkus.micrometer.binder.enable-alloverrides this property, meaning when this is set tofalse, andenable-allis true, discovery of all MeterBinder will still happen. -
binder
MicrometerConfig.BinderConfig binder()Build / static runtime config for binders -
export
MicrometerConfig.ExportConfig export()Build / static runtime config for exporters -
checkRegistryEnabledWithDefault
For MeterRegistry configurations with optional 'enabled' attributes, determine whether the registry is enabled usingregistryEnabledDefault()as the default value. -
checkBinderEnabledWithDefault
@Deprecated default boolean checkBinderEnabledWithDefault(MicrometerConfig.CapabilityEnabled config) Deprecated.useisEnabled(CapabilityEnabled)instead.For MeterBinder configurations with optional 'enabled' attributes, determine whether the binder is enabled usingbinderEnabledDefault()as the default value. -
isEnabled
Determines if a capability is enabled based on theMicrometerConfigconfigurations and the following rules:-
The
enabled()has precedence over all configurations, it means that ifquarkus.micrometer.enabledis set tofalse, all metrics are disabled. -
If the
quarkus.micrometer.binder.enable-allis set totrue, independently if the parameteraBooleanresolve totrueorfalsethe metric will be enabled. -
If the
quarkus.micrometer.binder.enable-allis set tofalse, the parameteraBooleanwill be used to determine if the metric is enabled or not. IfaBooleanis empty, the metric will be disabled.
- Parameters:
aBoolean- the optional boolean value to check if the capability is enabled- Returns:
trueif the capability is enabled,falseotherwise.
-
The
-
isEnabled
Determines if a capability is enabled based on theMicrometerConfigconfigurations and the following rules:-
The
enabled()has precedence over all configurations, it means that ifquarkus.micrometer.enabledis set tofalse, all metrics are disabled. -
If the
quarkus.micrometer.binder.enable-allis set totrue, independently if the parameteraBooleanresolve totrueorfalsethe metric will be enabled. -
If the
quarkus.micrometer.binder.enable-allis set tofalse, the parameterconfigwill be used to determine if the metric is enabled or not. Ifconfig.enabled()is empty, thebinderEnabledDefault()will be used to determine if the metric is enabled or not.
- Parameters:
config- theMicrometerConfig.CapabilityEnabledto check if the capability is enabled- Returns:
trueif the capability is enabled,falseotherwise.
-
The
-
isEnabled(CapabilityEnabled)instead.