Class MetricsFilter

java.lang.Object
ch.tocco.nice2.metrics.impl.servlet.MetricsFilter
All Implemented Interfaces:
jakarta.servlet.Filter

@Component public class MetricsFilter extends Object implements jakarta.servlet.Filter
Servlet filter that collects metrics for certain HTTP requests.
  • Constructor Details

  • Method Details

    • setRequestExclusionPattern

      @Value("${nice2.metrics.requestExclusionPattern}") public void setRequestExclusionPattern(String requestExclusionPattern)
    • setMaxBodySizeKiloBytes

      @Value("${nice2.metrics.maxBodySizeKiloBytes}") public void setMaxBodySizeKiloBytes(int maxBodySizeKiloBytes)
    • doFilter

      public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException
      Specified by:
      doFilter in interface jakarta.servlet.Filter
      Throws:
      IOException
      jakarta.servlet.ServletException