Interface MicrometerConfig


@ConfigMapping(prefix="quarkus.micrometer") @ConfigRoot(phase=BUILD_AND_RUN_TIME_FIXED) public interface MicrometerConfig
Global configuration for the Micrometer extension
  • 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-all overrides this property, meaning when this is set to false, and enable-all is true, discovery of all MeterBinder will still happen.

    • binder

      Build / static runtime config for binders
    • export

      Build / static runtime config for exporters
    • checkRegistryEnabledWithDefault

      default boolean checkRegistryEnabledWithDefault(MicrometerConfig.CapabilityEnabled config)
      For MeterRegistry configurations with optional 'enabled' attributes, determine whether the registry is enabled using registryEnabledDefault() as the default value.
    • checkBinderEnabledWithDefault

      @Deprecated default boolean checkBinderEnabledWithDefault(MicrometerConfig.CapabilityEnabled config)
      Deprecated.
      For MeterBinder configurations with optional 'enabled' attributes, determine whether the binder is enabled using binderEnabledDefault() as the default value.
    • isEnabled

      default boolean isEnabled(Optional<Boolean> aBoolean)
      Determines if a capability is enabled based on the MicrometerConfig configurations and the following rules:

      • The enabled() has precedence over all configurations, it means that if quarkus.micrometer.enabled is set to false, all metrics are disabled.
      • If the quarkus.micrometer.binder.enable-all is set to true, independently if the parameter aBoolean resolve to true or false the metric will be enabled.
      • If the quarkus.micrometer.binder.enable-all is set to false, the parameter aBoolean will be used to determine if the metric is enabled or not. If aBoolean is empty, the metric will be disabled.
      Parameters:
      aBoolean - the optional boolean value to check if the capability is enabled
      Returns:
      true if the capability is enabled, false otherwise.
    • isEnabled

      default boolean isEnabled(MicrometerConfig.CapabilityEnabled config)
      Determines if a capability is enabled based on the MicrometerConfig configurations and the following rules:

      • The enabled() has precedence over all configurations, it means that if quarkus.micrometer.enabled is set to false, all metrics are disabled.
      • If the quarkus.micrometer.binder.enable-all is set to true, independently if the parameter aBoolean resolve to true or false the metric will be enabled.
      • If the quarkus.micrometer.binder.enable-all is set to false, the parameter config will be used to determine if the metric is enabled or not. If config.enabled() is empty, the binderEnabledDefault() will be used to determine if the metric is enabled or not.
      Parameters:
      config - the MicrometerConfig.CapabilityEnabled to check if the capability is enabled
      Returns:
      true if the capability is enabled, false otherwise.