Class RequestMetricInfo

    • 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
      • sample

        protected io.micrometer.core.instrument.Timer.Sample sample
        Store the sample used to measure the request
    • Constructor Detail

      • RequestMetricInfo

        public RequestMetricInfo()
    • 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 request
        ignorePatterns -
        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
      • filterIgnored

        protected static String filterIgnored​(String path,
                                              List<Pattern> ignorePatterns)
        Return path or null if it should be ignored
      • normalizePath

        protected static String normalizePath​(String uri)