Interface MetricsSettings

  • public interface MetricsSettings
    Settings which control behavior for metrics overall.

    This class controls all of metrics, not just a single component's usage of metrics. For that, see ComponentMetricsSettings.

    • Method Detail

      • create

        static MetricsSettings create()
        Returns default metrics settings based on default config.
        new settings reflecting the default config
      • create

        static MetricsSettings create​(Config config)
        Returns metrics settings based on a Config node, by convention the metrics config section within the overall metrics config.

        Equivalent to MetricsSettings.builder().config(config).build().

        config - the metrics config section
        new settings reflecting the config, using defaults as needed
      • builder

        static MetricsSettings.Builder builder​(MetricsSettings metricsSettings)
        Creates a builder based on the values in an existing MetricsSettings instance.
        metricsSettings - existing instance to copy
        MetricsSettings.Builder initialized according to the provided settings
      • isEnabled

        boolean isEnabled()
        whether metrics are enabled according to the settings
      • baseMetricsSettings

        BaseMetricsSettings baseMetricsSettings()
        the base metrics settings
      • isMetricEnabled

        boolean isMetricEnabled​(MetricRegistry.Type registryType,
                                String metricName)
        Reports whether the specified metric is enabled in the indicated registry type.
        registryType - which registry type to check
        metricName - name of the metric to check
        true if metrics overall is enabled and if the metric is enabled in the specified registry; false otherwise