Class MicrometerHttpRequestExecutor.Builder
java.lang.Object
io.micrometer.core.instrument.binder.httpcomponents.MicrometerHttpRequestExecutor.Builder
- Enclosing class:
- MicrometerHttpRequestExecutor
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
exportTagsForRoute
(boolean exportTagsForRoute) Allows to expose the target scheme, host and port with every metric.Allows to register a mapping function for exposing request URIs.waitForContinue
(int waitForContinue)
-
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(Function<org.apache.http.HttpRequest, 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:
-
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.
-