@@ -0,0 +1,658 @@
+package com.codahale.metrics.servlet;%0A%0Aimport com.codahale.metrics.MetricRegistry;%0A%0Aimport javax.servlet.ServletContextEvent;%0Aimport javax.servlet.ServletContextListener;%0A%0Apublic class MetricsContextListener implements ServletContextListener %7B%0A    private final MetricRegistry registry;%0A%0A    public MetricsContextListener(MetricRegistry registry) %7B%0A        this.registry = registry;%0A    %7D%0A%0A    @Override%0A    public void contextInitialized(ServletContextEvent sce) %7B%0A        sce.getServletContext().setAttribute(DefaultWebappMetricsFilter.REGISTRY_ATTRIBUTE, registry);%0A    %7D%0A%0A    @Override%0A    public void contextDestroyed(ServletContextEvent sce) %7B%0A    %7D%0A%7D%0A

Add a context listener to metrics-servlet.