fr.ippon.spark.metrics.SparkReporter Java Examples

The following examples show how to use fr.ippon.spark.metrics.SparkReporter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MetricsConfiguration.java    From klask-io with GNU General Public License v3.0 5 votes vote down vote up
@PostConstruct
private void init() {
    if (jHipsterProperties.getMetrics().getSpark().isEnabled()) {
        log.info("Initializing Metrics Spark reporting");
        String sparkHost = jHipsterProperties.getMetrics().getSpark().getHost();
        Integer sparkPort = jHipsterProperties.getMetrics().getSpark().getPort();
        SparkReporter sparkReporter = SparkReporter.forRegistry(metricRegistry)
            .convertRatesTo(TimeUnit.SECONDS)
            .convertDurationsTo(TimeUnit.MILLISECONDS)
            .build(sparkHost, sparkPort);
        sparkReporter.start(1, TimeUnit.MINUTES);
    }
}
 
Example #2
Source File: MetricsConfiguration.java    From jhipster-ribbon-hystrix with GNU General Public License v3.0 5 votes vote down vote up
@PostConstruct
private void init() {
    if (jHipsterProperties.getMetrics().getSpark().isEnabled()) {
        log.info("Initializing Metrics Spark reporting");
        String sparkHost = jHipsterProperties.getMetrics().getSpark().getHost();
        Integer sparkPort = jHipsterProperties.getMetrics().getSpark().getPort();
        SparkReporter sparkReporter = SparkReporter.forRegistry(metricRegistry)
            .convertRatesTo(TimeUnit.SECONDS)
            .convertDurationsTo(TimeUnit.MILLISECONDS)
            .build(sparkHost, sparkPort);
        sparkReporter.start(1, TimeUnit.MINUTES);
    }
}
 
Example #3
Source File: MetricsConfiguration.java    From jhipster-ribbon-hystrix with GNU General Public License v3.0 5 votes vote down vote up
@PostConstruct
private void init() {
    if (jHipsterProperties.getMetrics().getSpark().isEnabled()) {
        log.info("Initializing Metrics Spark reporting");
        String sparkHost = jHipsterProperties.getMetrics().getSpark().getHost();
        Integer sparkPort = jHipsterProperties.getMetrics().getSpark().getPort();
        SparkReporter sparkReporter = SparkReporter.forRegistry(metricRegistry)
            .convertRatesTo(TimeUnit.SECONDS)
            .convertDurationsTo(TimeUnit.MILLISECONDS)
            .build(sparkHost, sparkPort);
        sparkReporter.start(1, TimeUnit.MINUTES);
    }
}
 
Example #4
Source File: _MetricsConfiguration.java    From jhipster-ribbon-hystrix with GNU General Public License v3.0 5 votes vote down vote up
@PostConstruct
private void init() {
    if (jHipsterProperties.getMetrics().getSpark().isEnabled()) {
        log.info("Initializing Metrics Spark reporting");
        String sparkHost = jHipsterProperties.getMetrics().getSpark().getHost();
        Integer sparkPort = jHipsterProperties.getMetrics().getSpark().getPort();
        SparkReporter sparkReporter = SparkReporter.forRegistry(metricRegistry)
            .convertRatesTo(TimeUnit.SECONDS)
            .convertDurationsTo(TimeUnit.MILLISECONDS)
            .build(sparkHost, sparkPort);
        sparkReporter.start(1, TimeUnit.MINUTES);
    }
}
 
Example #5
Source File: MetricsConfiguration.java    From jhipster-ribbon-hystrix with GNU General Public License v3.0 5 votes vote down vote up
@PostConstruct
private void init() {
    if (jHipsterProperties.getMetrics().getSpark().isEnabled()) {
        log.info("Initializing Metrics Spark reporting");
        String sparkHost = jHipsterProperties.getMetrics().getSpark().getHost();
        Integer sparkPort = jHipsterProperties.getMetrics().getSpark().getPort();
        SparkReporter sparkReporter = SparkReporter.forRegistry(metricRegistry)
            .convertRatesTo(TimeUnit.SECONDS)
            .convertDurationsTo(TimeUnit.MILLISECONDS)
            .build(sparkHost, sparkPort);
        sparkReporter.start(1, TimeUnit.MINUTES);
    }
}
 
Example #6
Source File: MetricsConfiguration.java    From gpmr with Apache License 2.0 5 votes vote down vote up
@PostConstruct
private void init() {
    if (jHipsterProperties.getMetrics().getSpark().isEnabled()) {
        log.info("Initializing Metrics Spark reporting");
        String sparkHost = jHipsterProperties.getMetrics().getSpark().getHost();
        Integer sparkPort = jHipsterProperties.getMetrics().getSpark().getPort();
        SparkReporter sparkReporter = SparkReporter.forRegistry(metricRegistry)
            .convertRatesTo(TimeUnit.SECONDS)
            .convertDurationsTo(TimeUnit.MILLISECONDS)
            .build(sparkHost, sparkPort);
        sparkReporter.start(1, TimeUnit.MINUTES);
    }
}
 
Example #7
Source File: MetricsConfiguration.java    From OpenIoE with Apache License 2.0 5 votes vote down vote up
@PostConstruct
private void init() {
    if (jHipsterProperties.getMetrics().getSpark().isEnabled()) {
        log.info("Initializing Metrics Spark reporting");
        String sparkHost = jHipsterProperties.getMetrics().getSpark().getHost();
        Integer sparkPort = jHipsterProperties.getMetrics().getSpark().getPort();
        SparkReporter sparkReporter = SparkReporter.forRegistry(metricRegistry)
            .convertRatesTo(TimeUnit.SECONDS)
            .convertDurationsTo(TimeUnit.MILLISECONDS)
            .build(sparkHost, sparkPort);
        sparkReporter.start(1, TimeUnit.MINUTES);
    }
}
 
Example #8
Source File: MetricsConfiguration.java    From ServiceCutter with Apache License 2.0 5 votes vote down vote up
@PostConstruct
private void init() {
    Boolean sparkEnabled = propertyResolver.getProperty(PROP_SPARK_ENABLED, Boolean.class, false);
    if (sparkEnabled) {
        log.info("Initializing Metrics Spark reporting");
        String sparkHost = propertyResolver.getRequiredProperty(PROP_HOST);
        Integer sparkPort = propertyResolver.getRequiredProperty(PROP_PORT, Integer.class);

        SparkReporter sparkReporter = SparkReporter.forRegistry(metricRegistry)
                .convertRatesTo(TimeUnit.SECONDS)
                .convertDurationsTo(TimeUnit.MILLISECONDS)
                .build(sparkHost, sparkPort);
        sparkReporter.start(1, TimeUnit.MINUTES);
    }
}
 
Example #9
Source File: MetricsConfiguration.java    From expper with GNU General Public License v3.0 5 votes vote down vote up
@PostConstruct
private void init() {
    if (jHipsterProperties.getMetrics().getSpark().isEnabled()) {
        log.info("Initializing Metrics Spark reporting");
        String sparkHost = jHipsterProperties.getMetrics().getSpark().getHost();
        Integer sparkPort = jHipsterProperties.getMetrics().getSpark().getPort();
        SparkReporter sparkReporter = SparkReporter.forRegistry(metricRegistry)
            .convertRatesTo(TimeUnit.SECONDS)
            .convertDurationsTo(TimeUnit.MILLISECONDS)
            .build(sparkHost, sparkPort);
        sparkReporter.start(1, TimeUnit.MINUTES);
    }
}