* Time: 5:32 PM
*/
public class MetricsRegistryInitializerFilter implements Filter {
public void init(FilterConfig filterConfig) throws ServletException {
ServletContext context = filterConfig.getServletContext();
context.setAttribute(MonitorManager.HEALTH_CHECK_REGISTRY, new HealthCheckRegistry());
context.setAttribute(MonitorManager.CRITICAL_HEALTH_CHECK_REGISTRY, new HealthCheckRegistry());
context.setAttribute(MonitorManager.WARNING_HEALTH_CHECK_REGISTRY, new HealthCheckRegistry());
context.setAttribute(MonitorManager.EXPENSIVE_HEALTH_CHECK_REGISTRY, new HealthCheckRegistry());
MetricsRegistry metricsRegistry = new MetricsRegistry();
context.setAttribute(MonitorManager.METRICS_REGISTRY, metricsRegistry);
context.setAttribute(DefaultWebappMetricsFilter.REGISTRY_ATTRIBUTE, metricsRegistry);
}