public class HystrixServoMetricsPublisherCommand
extends java.lang.Object
implements com.netflix.hystrix.strategy.metrics.HystrixMetricsPublisherCommand
HystrixMetricsPublisherCommand using Servo (https://github.com/Netflix/servo)
This class should encapsulate all logic around how to pull metrics. This will allow any other custom Servo publisher
to extend. Then, if that class wishes to override initialize(), that concrete implementation can choose
by picking the set of semantic metrics and names, rather than providing an implementation of how.| Modifier and Type | Field and Description |
|---|---|
protected rx.functions.Func0<java.lang.Number> |
currentConcurrentExecutionCountThunk |
protected rx.functions.Func0<java.lang.Number> |
currentTimeThunk |
protected rx.functions.Func0<java.lang.Number> |
errorPercentageThunk |
protected rx.functions.Func0<java.lang.Number> |
rollingMaxConcurrentExecutionCountThunk |
| Constructor and Description |
|---|
HystrixServoMetricsPublisherCommand(com.netflix.hystrix.HystrixCommandKey commandKey,
com.netflix.hystrix.HystrixCommandGroupKey commandGroupKey,
com.netflix.hystrix.HystrixCommandMetrics metrics,
com.netflix.hystrix.HystrixCircuitBreaker circuitBreaker,
com.netflix.hystrix.HystrixCommandProperties properties) |
| Modifier and Type | Method and Description |
|---|---|
protected com.netflix.servo.monitor.Monitor<?> |
getCumulativeCountForEvent(java.lang.String name,
com.netflix.hystrix.HystrixMetrics metrics,
com.netflix.hystrix.util.HystrixRollingNumberEvent event) |
protected com.netflix.servo.monitor.Monitor<?> |
getCumulativeMonitor(java.lang.String name,
com.netflix.hystrix.HystrixEventType event) |
protected com.netflix.servo.monitor.Monitor<?> |
getCurrentValueMonitor(java.lang.String name,
rx.functions.Func0<java.lang.Number> metricToEvaluate) |
protected com.netflix.servo.monitor.Monitor<?> |
getCurrentValueMonitor(java.lang.String name,
rx.functions.Func0<java.lang.Number> metricToEvaluate,
com.netflix.servo.tag.Tag tag) |
protected com.netflix.servo.monitor.Monitor<?> |
getExecutionLatencyMeanMonitor(java.lang.String name) |
protected com.netflix.servo.monitor.Monitor<?> |
getExecutionLatencyPercentileMonitor(java.lang.String name,
double percentile) |
protected com.netflix.servo.monitor.Monitor<?> |
getRollingCountForEvent(java.lang.String name,
com.netflix.hystrix.HystrixMetrics metrics,
com.netflix.hystrix.util.HystrixRollingNumberEvent event) |
protected com.netflix.servo.monitor.Monitor<?> |
getRollingMonitor(java.lang.String name,
com.netflix.hystrix.HystrixEventType event) |
protected com.netflix.hystrix.util.HystrixRollingNumberEvent |
getRollingNumberTypeFromEventType(com.netflix.hystrix.HystrixEventType eventType)
Deprecated.
Instead, use
HystrixRollingNumberEvent.from(HystrixEventType) |
protected com.netflix.servo.tag.Tag |
getServoInstanceTag() |
protected com.netflix.servo.tag.Tag |
getServoTypeTag() |
protected com.netflix.servo.monitor.Monitor<?> |
getTotalLatencyMeanMonitor(java.lang.String name) |
protected com.netflix.servo.monitor.Monitor<?> |
getTotalLatencyPercentileMonitor(java.lang.String name,
double percentile) |
void |
initialize() |
protected final rx.functions.Func0<java.lang.Number> currentConcurrentExecutionCountThunk
protected final rx.functions.Func0<java.lang.Number> rollingMaxConcurrentExecutionCountThunk
protected final rx.functions.Func0<java.lang.Number> errorPercentageThunk
protected final rx.functions.Func0<java.lang.Number> currentTimeThunk
public HystrixServoMetricsPublisherCommand(com.netflix.hystrix.HystrixCommandKey commandKey,
com.netflix.hystrix.HystrixCommandGroupKey commandGroupKey,
com.netflix.hystrix.HystrixCommandMetrics metrics,
com.netflix.hystrix.HystrixCircuitBreaker circuitBreaker,
com.netflix.hystrix.HystrixCommandProperties properties)
public void initialize()
initialize in interface com.netflix.hystrix.strategy.metrics.HystrixMetricsPublisherCommandprotected com.netflix.servo.tag.Tag getServoTypeTag()
protected com.netflix.servo.tag.Tag getServoInstanceTag()
@Deprecated protected final com.netflix.hystrix.util.HystrixRollingNumberEvent getRollingNumberTypeFromEventType(com.netflix.hystrix.HystrixEventType eventType)
HystrixRollingNumberEvent.from(HystrixEventType)eventType - HystrixEventTypeprotected com.netflix.servo.monitor.Monitor<?> getCumulativeMonitor(java.lang.String name,
com.netflix.hystrix.HystrixEventType event)
protected com.netflix.servo.monitor.Monitor<?> getRollingMonitor(java.lang.String name,
com.netflix.hystrix.HystrixEventType event)
protected com.netflix.servo.monitor.Monitor<?> getExecutionLatencyMeanMonitor(java.lang.String name)
protected com.netflix.servo.monitor.Monitor<?> getExecutionLatencyPercentileMonitor(java.lang.String name,
double percentile)
protected com.netflix.servo.monitor.Monitor<?> getTotalLatencyMeanMonitor(java.lang.String name)
protected com.netflix.servo.monitor.Monitor<?> getTotalLatencyPercentileMonitor(java.lang.String name,
double percentile)
protected com.netflix.servo.monitor.Monitor<?> getCurrentValueMonitor(java.lang.String name,
rx.functions.Func0<java.lang.Number> metricToEvaluate)
protected com.netflix.servo.monitor.Monitor<?> getCurrentValueMonitor(java.lang.String name,
rx.functions.Func0<java.lang.Number> metricToEvaluate,
com.netflix.servo.tag.Tag tag)
protected com.netflix.servo.monitor.Monitor<?> getCumulativeCountForEvent(java.lang.String name,
com.netflix.hystrix.HystrixMetrics metrics,
com.netflix.hystrix.util.HystrixRollingNumberEvent event)
protected com.netflix.servo.monitor.Monitor<?> getRollingCountForEvent(java.lang.String name,
com.netflix.hystrix.HystrixMetrics metrics,
com.netflix.hystrix.util.HystrixRollingNumberEvent event)