Package restx.metrics.codahale

Examples of restx.metrics.codahale.CodahaleMetricRegistry


                                GraphiteSettings graphiteSettings, AppSettings appSettings) {

        if (!(metricRegistry instanceof CodahaleMetricRegistry)){
            throw new IllegalStateException("restx-monitor-admin expects that module restx-monitor-codahale is loaded");
        }
        CodahaleMetricRegistry codahaleMetricRegistry = (CodahaleMetricRegistry) metricRegistry;
        CodahaleHealthCheckRegistry codahaleHealthCheckRegistry = (CodahaleHealthCheckRegistry) healthCheckRegistry;

        this.metrics = codahaleMetricRegistry.getCodahaleMetricRegistry();
        this.healthChecks = codahaleHealthCheckRegistry.getCodahaleHealthCheckRegistry();
        this.graphiteSettings = graphiteSettings;
        this.appSettings = appSettings;
    }
View Full Code Here


@Module
public class MonitorCodahaleModule {

    @Provides @Named(Factory.METRICS_REGISTRY)
    public MetricRegistry metricRegistry() {
        return new CodahaleMetricRegistry();
    }
View Full Code Here

    private static StdRoute getGetMonitorRoute(restx.common.metrics.api.MetricRegistry metricRegistry) {
        if (!(metricRegistry instanceof CodahaleMetricRegistry)){
            throw new IllegalStateException("restx-monitor-admin expects that module restx-monitor-codahale is loaded");
        }
        CodahaleMetricRegistry codahaleMetricRegistry = (CodahaleMetricRegistry) metricRegistry;
        final MetricRegistry metrics = codahaleMetricRegistry.getCodahaleMetricRegistry();

        return new StdRoute("MonitorRoute", new StdRestxRequestMatcher("GET", "/@/monitor")) {
            @Override
            public void handle(RestxRequestMatch match, RestxRequest req, RestxResponse resp, RestxContext ctx) throws IOException {
                resp.setStatus(HttpStatus.OK);
View Full Code Here

    public MetricsResource(restx.common.metrics.api.MetricRegistry metricRegistry, restx.common.metrics.api.health.HealthCheckRegistry healthCheckRegistry) {
        if (!(metricRegistry instanceof CodahaleMetricRegistry)){
            throw new IllegalStateException("restx-monitor-admin expects that module restx-monitor-codahale is loaded");
        }
        CodahaleMetricRegistry codahaleMetricRegistry = (CodahaleMetricRegistry) metricRegistry;
        CodahaleHealthCheckRegistry codahaleHealthCheckRegistry = (CodahaleHealthCheckRegistry) healthCheckRegistry;

        this.metrics = codahaleMetricRegistry.getCodahaleMetricRegistry();
        this.healthChecks = codahaleHealthCheckRegistry.getCodahaleHealthCheckRegistry();
        threadDump = new ThreadDump(ManagementFactory.getThreadMXBean());
    }
View Full Code Here

TOP

Related Classes of restx.metrics.codahale.CodahaleMetricRegistry

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.