Search in sources :

Example 1 with MonitorConfig

use of com.netflix.servo.monitor.MonitorConfig in project Hystrix by Netflix.

the class HystrixServoMetricsPublisherCollapser method initialize.

@Override
public void initialize() {
    /* list of monitors */
    List<Monitor<?>> monitors = getServoMonitors();
    // publish metrics together under a single composite (it seems this name is ignored)
    MonitorConfig commandMetricsConfig = MonitorConfig.builder("HystrixCollapser_" + key.name()).build();
    BasicCompositeMonitor commandMetricsMonitor = new BasicCompositeMonitor(commandMetricsConfig, monitors);
    DefaultMonitorRegistry.getInstance().register(commandMetricsMonitor);
    RollingCollapserBatchSizeDistributionStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
    RollingCollapserEventCounterStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
    CumulativeCollapserEventCounterStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
}
Also used : Monitor(com.netflix.servo.monitor.Monitor) BasicCompositeMonitor(com.netflix.servo.monitor.BasicCompositeMonitor) BasicCompositeMonitor(com.netflix.servo.monitor.BasicCompositeMonitor) MonitorConfig(com.netflix.servo.monitor.MonitorConfig)

Example 2 with MonitorConfig

use of com.netflix.servo.monitor.MonitorConfig in project Hystrix by Netflix.

the class HystrixServoMetricsPublisherThreadPool method initialize.

@Override
public void initialize() {
    /* list of monitors */
    List<Monitor<?>> monitors = getServoMonitors();
    // publish metrics together under a single composite (it seems this name is ignored)
    MonitorConfig commandMetricsConfig = MonitorConfig.builder("HystrixThreadPool_" + key.name()).build();
    BasicCompositeMonitor commandMetricsMonitor = new BasicCompositeMonitor(commandMetricsConfig, monitors);
    DefaultMonitorRegistry.getInstance().register(commandMetricsMonitor);
    RollingThreadPoolEventCounterStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
    CumulativeThreadPoolEventCounterStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
    RollingThreadPoolMaxConcurrencyStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
}
Also used : Monitor(com.netflix.servo.monitor.Monitor) BasicCompositeMonitor(com.netflix.servo.monitor.BasicCompositeMonitor) BasicCompositeMonitor(com.netflix.servo.monitor.BasicCompositeMonitor) MonitorConfig(com.netflix.servo.monitor.MonitorConfig)

Example 3 with MonitorConfig

use of com.netflix.servo.monitor.MonitorConfig in project Hystrix by Netflix.

the class HystrixServoMetricsPublisherCommand method initialize.

@Override
public void initialize() {
    /* list of monitors */
    List<Monitor<?>> monitors = getServoMonitors();
    // publish metrics together under a single composite (it seems this name is ignored)
    MonitorConfig commandMetricsConfig = MonitorConfig.builder("HystrixCommand_" + key.name()).build();
    BasicCompositeMonitor commandMetricsMonitor = new BasicCompositeMonitor(commandMetricsConfig, monitors);
    DefaultMonitorRegistry.getInstance().register(commandMetricsMonitor);
    RollingCommandEventCounterStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
    CumulativeCommandEventCounterStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
    RollingCommandLatencyDistributionStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
    RollingCommandUserLatencyDistributionStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
    RollingCommandMaxConcurrencyStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
}
Also used : Monitor(com.netflix.servo.monitor.Monitor) BasicCompositeMonitor(com.netflix.servo.monitor.BasicCompositeMonitor) BasicCompositeMonitor(com.netflix.servo.monitor.BasicCompositeMonitor) MonitorConfig(com.netflix.servo.monitor.MonitorConfig)

Aggregations

BasicCompositeMonitor (com.netflix.servo.monitor.BasicCompositeMonitor)3 Monitor (com.netflix.servo.monitor.Monitor)3 MonitorConfig (com.netflix.servo.monitor.MonitorConfig)3