Package com.codahale.metrics.servlets

Examples of com.codahale.metrics.servlets.MetricsServlet


        metricsFilter.addMappingForUrlPatterns(disps, true, "/*");
        metricsFilter.setAsyncSupported(true);

        log.debug("Registering Metrics Servlet");
        ServletRegistration.Dynamic metricsAdminServlet =
                servletContext.addServlet("metricsServlet", new MetricsServlet());

        metricsAdminServlet.addMapping("/metrics/metrics/*");
        metricsAdminServlet.setAsyncSupported(true);
        metricsAdminServlet.setLoadOnStartup(2);
    }<% if (websocket == 'atmosphere') { %>
View Full Code Here


    embeddedJetty.setHandler(context);
    ServletHolder h = new ServletHolder(new ServletContainer(new DrillRestServer(manager)));
//    h.setInitParameter(ServerProperties.PROVIDER_PACKAGES, "org.apache.drill.exec.server");
    h.setInitOrder(1);
    context.addServlet(h, "/*");
    context.addServlet(new ServletHolder(new MetricsServlet(this.context.getMetrics())), "/status/metrics");
    context.addServlet(new ServletHolder(new ThreadDumpServlet()), "/status/threads");

    embeddedJetty.start();

    System.out.println("");
View Full Code Here

        metricsFilter.addMappingForUrlPatterns(disps, true, "/*");
        metricsFilter.setAsyncSupported(true);

        log.debug("Registering Metrics Servlet");
        ServletRegistration.Dynamic metricsAdminServlet =
                servletContext.addServlet("metricsServlet", new MetricsServlet());

        metricsAdminServlet.addMapping("/metrics/metrics/*");
        metricsAdminServlet.setAsyncSupported(true);
        metricsAdminServlet.setLoadOnStartup(2);
    }
View Full Code Here

    embeddedJetty.setHandler(context);
    ServletHolder h = new ServletHolder(new ServletContainer(new DrillRestServer(manager)));
//    h.setInitParameter(ServerProperties.PROVIDER_PACKAGES, "org.apache.drill.exec.server");
    h.setInitOrder(1);
    context.addServlet(h, "/*");
    context.addServlet(new ServletHolder(new MetricsServlet(this.context.getMetrics())), "/status/metrics");
    context.addServlet(new ServletHolder(new ThreadDumpServlet()), "/status/threads");

    embeddedJetty.start();

    System.out.println("");
View Full Code Here

                wacMetrics = new WebappContext("metrics", "");
                wacMetrics.setAttribute("com.codahale.metrics.servlets.MetricsServlet.registry", application.getMetricRegistry());
                wacMetrics.addContextInitParameter("com.codahale.metrics.servlets.MetricsServlet.rateUnit", this.convertRateTo);
                wacMetrics.addContextInitParameter("com.codahale.metrics.servlets.MetricsServlet.durationUnit", this.convertDurationTo);

                final ServletRegistration sgMetrics = wacMetrics.addServlet("metrics", new MetricsServlet());
                sgMetrics.addMapping("/metrics/*");

                wacMetrics.deploy(this.httpServer);
            }
        }
View Full Code Here

TOP

Related Classes of com.codahale.metrics.servlets.MetricsServlet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.