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
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)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
waitForContinue
- Parameters:
waitForContinue
- Overrides the wait for continue time for this request executor. SeeHttpRequestExecutor
for details.- Returns:
- This builder instance.
-
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 "URI_PATTERN" HTTP header.- Parameters:
uriMapper
- A mapper that allows mapping and exposing request paths.- Returns:
- This builder instance.
- See Also:
DefaultUriMapper
-
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
- Returns:
- Creates an instance of
MicrometerHttpRequestExecutor
with all the configured properties.
-