Class RequestMetricInfo
- java.lang.Object
-
- io.quarkus.micrometer.runtime.binder.RequestMetricInfo
-
- Direct Known Subclasses:
HttpRequestMetric
,RestClientMetricsFilter.RestClientMetricInfo
,VertxHttpClientMetrics.RequestTracker
public class RequestMetricInfo extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
HTTP_REQUEST_PATH
(package private) static org.jboss.logging.Logger
log
static Pattern
MULTIPLE_SLASH_PATTERN
static String
ROOT
protected io.micrometer.core.instrument.Timer.Sample
sample
Store the sample used to measure the requeststatic Pattern
TRAILING_SLASH_PATTERN
-
Constructor Summary
Constructors Constructor Description RequestMetricInfo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static String
applyMatchPatterns(String path, Map<Pattern,String> matchPatterns)
protected String
applyTemplateMatching(String path)
Subclasses should override with appropriate mechanisms for finding templated urlsprotected static String
filterIgnored(String path, List<Pattern> ignorePatterns)
Return path or null if it should be ignoredprotected String
getNormalizedUriPath(Map<Pattern,String> matchPatterns, List<Pattern> ignorePatterns, String uri)
Normalize and filter request path against match patternsio.micrometer.core.instrument.Timer.Sample
getSample()
protected static String
normalizePath(String uri)
RequestMetricInfo
setSample(io.micrometer.core.instrument.Timer.Sample sample)
-
-
-
Field Detail
-
log
static final org.jboss.logging.Logger log
-
TRAILING_SLASH_PATTERN
public static final Pattern TRAILING_SLASH_PATTERN
-
MULTIPLE_SLASH_PATTERN
public static final Pattern MULTIPLE_SLASH_PATTERN
-
ROOT
public static final String ROOT
- See Also:
- Constant Field Values
-
HTTP_REQUEST_PATH
public static final String HTTP_REQUEST_PATH
- See Also:
- Constant Field Values
-
sample
protected io.micrometer.core.instrument.Timer.Sample sample
Store the sample used to measure the request
-
-
Method Detail
-
setSample
public RequestMetricInfo setSample(io.micrometer.core.instrument.Timer.Sample sample)
-
getSample
public io.micrometer.core.instrument.Timer.Sample getSample()
-
getNormalizedUriPath
protected String getNormalizedUriPath(Map<Pattern,String> matchPatterns, List<Pattern> ignorePatterns, String uri)
Normalize and filter request path against match patterns- Parameters:
uri
- Uri for requestignorePatterns
-matchPatterns
-- Returns:
- final uri for tag, or null to skip measurement
-
applyTemplateMatching
protected String applyTemplateMatching(String path)
Subclasses should override with appropriate mechanisms for finding templated urls
-
applyMatchPatterns
static String applyMatchPatterns(String path, Map<Pattern,String> matchPatterns)
-
filterIgnored
protected static String filterIgnored(String path, List<Pattern> ignorePatterns)
Return path or null if it should be ignored
-
-