Package com.codahale.metrics.servlet
Class InstrumentedFilter
- java.lang.Object
-
- com.codahale.metrics.servlet.AbstractInstrumentedFilter
-
- com.codahale.metrics.servlet.InstrumentedFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
public class InstrumentedFilter extends AbstractInstrumentedFilter
Implementation of theAbstractInstrumentedFilterwhich provides a default set of response codes to capture information about.Use it in your servlet.xml like this:
<filter> <filter-name>instrumentedFilter</filter-name> <filter-class>com.codahale.metrics.servlet.InstrumentedFilter</filter-class> </filter> <filter-mapping> <filter-name>instrumentedFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
-
-
Field Summary
Fields Modifier and Type Field Description private static intBAD_REQUESTprivate static intCREATEDprivate static java.lang.StringNAME_PREFIXprivate static intNO_CONTENTprivate static intNOT_FOUNDprivate static intOKstatic java.lang.StringREGISTRY_ATTRIBUTEprivate static intSERVER_ERROR
-
Constructor Summary
Constructors Constructor Description InstrumentedFilter()Creates a new instance of the filter.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.util.Map<java.lang.Integer,java.lang.String>createMeterNamesByStatusCode()-
Methods inherited from class com.codahale.metrics.servlet.AbstractInstrumentedFilter
destroy, doFilter, init
-
-
-
-
Field Detail
-
REGISTRY_ATTRIBUTE
public static final java.lang.String REGISTRY_ATTRIBUTE
-
NAME_PREFIX
private static final java.lang.String NAME_PREFIX
- See Also:
- Constant Field Values
-
OK
private static final int OK
- See Also:
- Constant Field Values
-
CREATED
private static final int CREATED
- See Also:
- Constant Field Values
-
NO_CONTENT
private static final int NO_CONTENT
- See Also:
- Constant Field Values
-
BAD_REQUEST
private static final int BAD_REQUEST
- See Also:
- Constant Field Values
-
NOT_FOUND
private static final int NOT_FOUND
- See Also:
- Constant Field Values
-
SERVER_ERROR
private static final int SERVER_ERROR
- See Also:
- Constant Field Values
-
-