We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The metrics publisher seems to be broken in 1.5.x where in 1.4.x it works perfectly.
The following test based on HystrixCodaHaleMetricsPublisherCommandTest works in 1.4.x and fails in 1.5.x
package com.netflix.hystrix.contrib.codahalemetricspublisher; import com.codahale.metrics.Gauge; import com.codahale.metrics.MetricRegistry; import com.netflix.hystrix.HystrixCommand; import com.netflix.hystrix.HystrixCommandGroupKey; import com.netflix.hystrix.HystrixCommandKey; import com.netflix.hystrix.strategy.HystrixPlugins; import org.junit.Before; import org.junit.Test; import java.util.Map; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; public class HystrixCodaHaleMetricsPublisherCommandTest { private final MetricRegistry metricRegistry = new MetricRegistry(); @Before public void setup() { HystrixPlugins.getInstance().registerMetricsPublisher(new HystrixCodaHaleMetricsPublisher(metricRegistry)); } @Test public void commandMaxActiveGauge() throws InterruptedException { Command command = new Command(); command.execute(); for (Map.Entry<String, Gauge> entry : metricRegistry.getGauges().entrySet()) { entry.getValue().getValue(); } assertThat((Long) metricRegistry.getGauges().get("test.test.countSuccess").getValue(), is(1L)); } private static class Command extends HystrixCommand<Void> { final static HystrixCommandKey hystrixCommandKey = HystrixCommandKey.Factory.asKey("test"); final static HystrixCommandGroupKey hystrixCommandGroupKey = HystrixCommandGroupKey.Factory.asKey("test"); Command() { super(Setter.withGroupKey(hystrixCommandGroupKey).andCommandKey(hystrixCommandKey)); } @Override protected Void run() throws Exception { return null; } } }
The text was updated successfully, but these errors were encountered:
Thanks for the report, @kevlarC . Got this working in #1586
Sorry, something went wrong.
No branches or pull requests
The metrics publisher seems to be broken in 1.5.x where in 1.4.x it works perfectly.
The following test based on HystrixCodaHaleMetricsPublisherCommandTest works in 1.4.x and fails in 1.5.x
The text was updated successfully, but these errors were encountered: