private void initMetricsServlet(ServletContext servletContext, EnumSet<DispatcherType> disps, ServletRegistration.Dynamic dispatcherServlet) {
log.debug("Setting Metrics profile for the Web ApplicationContext");
log.debug("Registering Metrics Filter");
FilterRegistration.Dynamic metricsFilter = servletContext.addFilter("webappMetricsFilter",
new DefaultWebappMetricsFilter());
metricsFilter.addMappingForUrlPatterns(disps, true, "/*");
log.debug("Registering Metrics Admin Servlet");
ServletRegistration.Dynamic metricsAdminServlet =
servletContext.addServlet("metricsAdminServlet", new AdminServlet());