Class MetricsFilter
java.lang.Object
ch.tocco.nice2.metrics.impl.servlet.MetricsFilter
- All Implemented Interfaces:
jakarta.servlet.Filter
Servlet filter that collects metrics for certain HTTP requests.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doFilter
(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) void
setMaxBodySizeKiloBytes
(int maxBodySizeKiloBytes) void
setRequestExclusionPattern
(String requestExclusionPattern) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.servlet.Filter
destroy, init
-
Constructor Details
-
MetricsFilter
-
-
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 interfacejakarta.servlet.Filter
- Throws:
IOException
jakarta.servlet.ServletException
-