Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'idea'

dependencies {
compile project(':hystrix-core')
compile 'com.netflix.servo:servo-core:0.4.32'
compile 'com.netflix.servo:servo-core:0.6.+'
}

eclipse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,29 @@ protected abstract class InformationalMetric<K> extends AbstractMonitor<K> {
public InformationalMetric(MonitorConfig config) {
super(config.withAdditionalTag(DataSourceType.INFORMATIONAL).withAdditionalTag(getServoTypeTag()).withAdditionalTag(getServoInstanceTag()));
}

@Override
public K getValue(int n) {
return getValue();
}

@Override
public abstract K getValue();
}

protected abstract class CounterMetric extends AbstractMonitor<Long> implements Counter {
protected abstract class CounterMetric extends AbstractMonitor<Number> implements Counter {
public CounterMetric(MonitorConfig config) {
super(config.withAdditionalTag(DataSourceType.COUNTER).withAdditionalTag(getServoTypeTag()).withAdditionalTag(getServoInstanceTag()));
}

@Override
public Number getValue(int n) {
return getValue();
}

@Override
public abstract Number getValue();

@Override
public void increment() {
throw new IllegalStateException("We are wrapping a value instead.");
Expand All @@ -61,6 +77,14 @@ protected abstract class GaugeMetric extends AbstractMonitor<Number> implements
public GaugeMetric(MonitorConfig config) {
super(config.withAdditionalTag(DataSourceType.GAUGE).withAdditionalTag(getServoTypeTag()).withAdditionalTag(getServoInstanceTag()));
}

@Override
public Number getValue(int n) {
return getValue();
}

@Override
public abstract Number getValue();
}

protected Monitor<?> getCumulativeCountForEvent(String name, final HystrixCommandMetrics metrics, final HystrixRollingNumberEvent event) {
Expand Down