Class MicrometerHttpRequestExecutor.Builder

    • Method Detail

      • waitForContinue

        public MicrometerHttpRequestExecutor.Builder waitForContinue​(int waitForContinue)
        Parameters:
        waitForContinue - Overrides the wait for continue time for this request executor. See HttpRequestExecutor for details.
        Returns:
        This builder instance.
      • tags

        public MicrometerHttpRequestExecutor.Builder tags​(java.lang.Iterable<Tag> tags)
        Parameters:
        tags - Additional tags which should be exposed with every value.
        Returns:
        This builder instance.
      • uriMapper

        public MicrometerHttpRequestExecutor.Builder uriMapper​(java.util.function.Function<org.apache.http.HttpRequest,​java.lang.String> uriMapper)
        Allows to register a mapping function for exposing request URIs. Be careful, exposing request URIs could result in a huge number of tag values, which could cause problems in your meter registry. By default, this feature is almost disabled. It only exposes values of the MicrometerHttpRequestExecutor.DEFAULT_URI_PATTERN_HEADER HTTP header.
        Parameters:
        uriMapper - A mapper that allows mapping and exposing request paths.
        Returns:
        This builder instance.
        See Also:
        MicrometerHttpRequestExecutor.DefaultUriMapper
      • exportTagsForRoute

        public MicrometerHttpRequestExecutor.Builder exportTagsForRoute​(boolean exportTagsForRoute)
        Allows to expose the target scheme, host and port with every metric. Be careful with enabling this feature: If your client accesses a huge number of remote servers, this would result in a huge number of tag values, which could cause cardinality problems. By default, this feature is disabled.
        Parameters:
        exportTagsForRoute - Set this to true, if the metrics should be tagged with the target route.
        Returns:
        This builder instance.