Class WebClientMetric.Builder

    • Method Detail

      • methods

        public WebClientMetric.Builder methods​(String... methods)
        Adds metric supported methods.
        Parameters:
        methods - metric supported methods
        Returns:
        updated builder instance
      • methods

        public WebClientMetric.Builder methods​(io.helidon.common.http.Http.Method... methods)
        Adds metric supported methods.
        Parameters:
        methods - metric supported methods
        Returns:
        updated builder instance
      • nameFormat

        public WebClientMetric.Builder nameFormat​(String nameFormat)
        Sets name format of the metric.
        Parameters:
        nameFormat - format of the metric
        Returns:
        updated builder instance
      • description

        public WebClientMetric.Builder description​(String description)
        Sets the description of the metric.
        Parameters:
        description - metric description
        Returns:
        updated builder instance
      • success

        public WebClientMetric.Builder success​(boolean success)
        Sets value if this metric should cover successful requests.
        Parameters:
        success - handle success
        Returns:
        updated builder instance
      • errors

        public WebClientMetric.Builder errors​(boolean errors)
        Sets value if this metric should cover unsuccessful requests.
        Parameters:
        errors - handle errors
        Returns:
        updated builder instance
      • config

        public WebClientMetric.Builder config​(io.helidon.config.Config config)
        Configure a metric from configuration. The following configuration key are used:
        Client Metric configuration options
        key default description
        errors true Whether this metric triggers for error states
        success true Whether this metric triggers for successful executions
        name-format client.success.method.hostname.status A string format used to construct a metric name. The format gets three parameters: the method name, the hostname and the response code (if applicable)
        description   Description of this metric, used in metric Metadata
        Parameters:
        config - configuration to configure this metric
        Returns:
        updated builder instance