Class MicrometerHttpRequestExecutor.Builder
- java.lang.Object
-
- io.micrometer.core.instrument.binder.httpcomponents.MicrometerHttpRequestExecutor.Builder
-
- Enclosing class:
- MicrometerHttpRequestExecutor
public static class MicrometerHttpRequestExecutor.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MicrometerHttpRequestExecutor
build()
MicrometerHttpRequestExecutor.Builder
exportTagsForRoute(boolean exportTagsForRoute)
Allows to expose the target scheme, host and port with every metric.MicrometerHttpRequestExecutor.Builder
tags(java.lang.Iterable<Tag> tags)
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.MicrometerHttpRequestExecutor.Builder
waitForContinue(int waitForContinue)
-
-
-
Method Detail
-
waitForContinue
public MicrometerHttpRequestExecutor.Builder waitForContinue(int waitForContinue)
- Parameters:
waitForContinue
- Overrides the wait for continue time for this request executor. SeeHttpRequestExecutor
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 theMicrometerHttpRequestExecutor.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.
-
build
public MicrometerHttpRequestExecutor build()
- Returns:
- Creates an instance of
MicrometerHttpRequestExecutor
with all the configured properties.
-
-