Skip to content
New issue

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

Benchmark throws exception "always scope with ActuateCollectorMetrics.forTransport" #3588

Closed
Holmistr opened this issue Nov 10, 2023 · 1 comment · Fixed by #3619
Closed
Labels

Comments

@Holmistr
Copy link

Describe the Bug

I was trying to run the JMH benchmarks in benchmarks directory. When I execute it, I get:

java.lang.IllegalStateException: always scope with ActuateCollectorMetrics.forTransport
	at zipkin2.server.internal.MicrometerCollectorMetrics.checkScoped(MicrometerCollectorMetrics.java:141)
	at zipkin2.server.internal.MicrometerCollectorMetrics.incrementBytes(MicrometerCollectorMetrics.java:128)
	at zipkin2.collector.MetricsBenchmarks.incrementBytes(MetricsBenchmarks.java:82)
	at zipkin2.collector.MetricsBenchmarks.incrementBytes_longSpans_Actuate(MetricsBenchmarks.java:58)
	at zipkin2.collector.jmh_generated.MetricsBenchmarks_incrementBytes_longSpans_Actuate_jmhTest.incrementBytes_longSpans_Actuate_avgt_jmhStub(MetricsBenchmarks_incrementBytes_longSpans_Actuate_jmhTest.java:186)
	at zipkin2.collector.jmh_generated.MetricsBenchmarks_incrementBytes_longSpans_Actuate_jmhTest.incrementBytes_longSpans_Actuate_AverageTime(MetricsBenchmarks_incrementBytes_longSpans_Actuate_jmhTest.java:150)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:453)
	at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:437)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Steps to Reproduce

Steps to reproduce the behavior - simply run java -jar target/benchmarks.jar inside the benchmarks directory.

Expected Behaviour

No exception, running benchmark.

I'm happy to work on a fix, but at this point I would appreciate a pointer whether this is a configuration issue or is the test just broken.

@codefromthecrypt
Copy link
Member

I will pick at this over the next couple days, as it takes over an hour to run through the benchmarks ;) #3619

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants