Class RequestProfilingFilter

java.lang.Object
com.atlassian.util.profiling.filters.RequestProfilingFilter
All Implemented Interfaces:
javax.servlet.Filter

@Internal public class RequestProfilingFilter extends Object implements javax.servlet.Filter
Filter that ensures timer state is cleaned up at the end of the request.

Optionally, the filter can be configured to allow per-request profiling when a predefined request parameter is present on the request. The name of this parameter can be configured through the activate.param filter init-param:

   <filter>
      <filter-name>profiling</filter-name>
      <filter-class>com.atlassian.util.profiling.filters.RequestProfilingFilter</filter-class>
      <init-param>
             <param-name>activate.param</param-name>
             <param-value>profilingfilter</param-value>
         </init-param>
  </filter>
 
If activate.param is not defined, per-request profiling will not be supported.
Since:
3.0
  • Constructor Details

    • RequestProfilingFilter

      public RequestProfilingFilter()
  • Method Details

    • destroy

      public void destroy()
      Specified by:
      destroy in interface javax.servlet.Filter
    • doFilter

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

      public void init(javax.servlet.FilterConfig filterConfig)
      Specified by:
      init in interface javax.servlet.Filter