Skip to content

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Aug 3, 2021

  • when a metrics extension is present and
    quarkus.scheduler.metrics.enabled=true a timed interceptor binding is
    automatically added to a scheduled method

TODO:

  • Add test for MP Metrics
  • Add docs

@quarkus-bot quarkus-bot bot added the area/arc Issue related to ARC (dependency injection) label Aug 4, 2021
@mkouba mkouba force-pushed the scheduler-metrics branch from d79309b to 2ba8b4a Compare August 4, 2021 04:29
@mkouba mkouba marked this pull request as ready for review August 4, 2021 04:30
@mkouba
Copy link
Contributor Author

mkouba commented Aug 4, 2021

Squashed, rebased and ready for review ;-)

@quarkus-bot
Copy link

quarkus-bot bot commented Aug 4, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 2ba8b4a

Status Name Step Test failures Logs Raw logs
JVM Tests - JDK 11 Build Test failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Test failures Logs Raw logs
JVM Tests - JDK 16 Build Test failures Logs Raw logs
MicroProfile TCKs Tests Verify Test failures Logs Raw logs
Native Tests - Data3 Build Test failures Logs Raw logs

Full information is available in the Build summary check run.

Test Failures

⚙️ JVM Tests - JDK 11 #

📦 extensions/agroal/deployment

io.quarkus.agroal.test.AgroalMetricsTestCase. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:550)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:368)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:192)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:78)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:136)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarch...

📦 extensions/scheduler/deployment

io.quarkus.scheduler.test.metrics.MicrometerTimedTest.testTimedMethod line 51 - More details - Source on GitHub

io.micrometer.core.instrument.search.MeterNotFoundException: 
Unable to find a meter that matches all the requirements at once. Here's what was found:
   FAIL: No meter with name 'scheduled.methods' was found.
   FAIL: No meters with type timer were found.
   FAIL: No meters have the required tag 'method'.
   FAIL: No meters have the required tag 'class'.
   FAIL: No meters have the required tag 'exception'.
	at io.micrometer.core.instrument.search.MeterNotFoundException$FromRequiredSearch.build(MeterNotFoundException.java:228)
	at io.micrometer.core.instrument.search.MeterNotFoundException$FromRequiredSearch.access$100(MeterNotFoundException.java:46)
	at io.micrometer.core.instrument.search.MeterNotFoundException.forSearch(MeterNotFoundException.java:43)
	at io.micrometer.core.instrument.search.RequiredSearch.findOne(RequiredSearch.java:199)
	at io.micrometer.core.instrument.search.RequiredSearch.timer(RequiredSearch.java:122)
	at io.quarkus.scheduler.test.metrics.MicrometerTimedTe...

⚙️ JVM Tests - JDK 11 Windows #

📦 extensions/agroal/deployment

io.quarkus.agroal.test.AgroalMetricsTestCase. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:550)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:368)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:192)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:78)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:136)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarch...

📦 extensions/scheduler/deployment

io.quarkus.scheduler.test.metrics.MicrometerTimedTest.testTimedMethod line 51 - More details - Source on GitHub

io.micrometer.core.instrument.search.MeterNotFoundException: 
Unable to find a meter that matches all the requirements at once. Here's what was found:
   FAIL: No meter with name 'scheduled.methods' was found.
   OK: A meter with type timer was found.
   FAIL: No meters have the required tag 'method'.
   FAIL: No meters have the required tag 'class'.
   FAIL: No meters have the required tag 'exception'.
	at io.micrometer.core.instrument.search.MeterNotFoundException$FromRequiredSearch.build(MeterNotFoundException.java:228)
	at io.micrometer.core.instrument.search.MeterNotFoundException$FromRequiredSearch.access$100(MeterNotFoundException.java:46)
	at io.micrometer.core.instrument.search.MeterNotFoundException.forSearch(MeterNotFoundException.java:43)
	at io.micrometer.core.instrument.search.RequiredSearch.findOne(RequiredSearch.java:199)
	at io.micrometer.core.instrument.search.RequiredSearch.timer(RequiredSearch.java:122)
	at io.quarkus.scheduler.test.metrics.MicrometerTimedTest.te...

⚙️ JVM Tests - JDK 16 #

📦 extensions/agroal/deployment

io.quarkus.agroal.test.AgroalMetricsTestCase. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:550)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:368)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:192)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:78)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:136)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarch...

📦 extensions/scheduler/deployment

io.quarkus.scheduler.test.metrics.MicrometerTimedTest.testTimedMethod line 51 - More details - Source on GitHub

io.micrometer.core.instrument.search.MeterNotFoundException: 
Unable to find a meter that matches all the requirements at once. Here's what was found:
   FAIL: No meter with name 'scheduled.methods' was found.
   FAIL: No meters with type timer were found.
   FAIL: No meters have the required tag 'method'.
   FAIL: No meters have the required tag 'class'.
   FAIL: No meters have the required tag 'exception'.
	at io.micrometer.core.instrument.search.MeterNotFoundException$FromRequiredSearch.build(MeterNotFoundException.java:228)
	at io.micrometer.core.instrument.search.MeterNotFoundException$FromRequiredSearch.access$100(MeterNotFoundException.java:46)
	at io.micrometer.core.instrument.search.MeterNotFoundException.forSearch(MeterNotFoundException.java:43)
	at io.micrometer.core.instrument.search.RequiredSearch.findOne(RequiredSearch.java:199)
	at io.micrometer.core.instrument.search.RequiredSearch.timer(RequiredSearch.java:122)
	at io.quarkus.scheduler.test.metrics.MicrometerTimedTe...

⚙️ MicroProfile TCKs Tests #

📦 tcks/microprofile-metrics/api

org.eclipse.microprofile.metrics.tck.metrics.OverloadedTimedMethodBeanTest.overloadedTimedMethodNotCalledYet line 70 - More details - Source on GitHub

java.lang.AssertionError: Metrics are not registered correctly
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.eclipse.microprofile.metrics.tck.metrics.OverloadedTimedMethodBeanTest.overloadedTimedMethodNotCalledYet(OverloadedTimedMethodBeanTest.java:70)
	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 io.quarkus.arquillian.QuarkusProtocol$QuarkusMethodExecutor$1.invoke(QuarkusProtocol.java:87)
	at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:57)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethod...

org.eclipse.microprofile.metrics.tck.metrics.OverloadedTimedMethodBeanTest.callOverloadedTimedMethodOnce line 80 - More details - Source on GitHub

java.lang.AssertionError: Metrics are not registered correctly
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.eclipse.microprofile.metrics.tck.metrics.OverloadedTimedMethodBeanTest.callOverloadedTimedMethodOnce(OverloadedTimedMethodBeanTest.java:80)
	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 io.quarkus.arquillian.QuarkusProtocol$QuarkusMethodExecutor$1.invoke(QuarkusProtocol.java:87)
	at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:57)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAcce...

⚙️ Native Tests - Data3 #

📦 integration-tests/hibernate-orm-panache

io.quarkus.it.panache.PanacheFunctionalityInGraalITCase.testBug5274 - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Unable to successfully launch process '2515'. Exit code is: '1'.
	at io.quarkus.test.junit.QuarkusIntegrationTestExtension.throwBootFailureException(QuarkusIntegrationTestExtension.java:232)
	at io.quarkus.test.junit.QuarkusIntegrationTestExtension.beforeEach(QuarkusIntegrationTestExtension.java:58)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeEachCallbacks$1(TestMethodTestDescriptor.java:159)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeMethodsOrCallbacksUntilExceptionOccurs$5(TestMethodTestDescriptor.java:195)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeMethodsOrCallbacksUntilExceptionOccurs(TestMethodTestDescriptor.java:195)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeEachCallbac...

@geoand
Copy link
Contributor

geoand commented Aug 4, 2021

CI failures seem related

@mkouba mkouba force-pushed the scheduler-metrics branch from 2ba8b4a to e0081fc Compare August 4, 2021 09:09
@mkouba
Copy link
Contributor Author

mkouba commented Aug 4, 2021

CI failures seem related

Yes, some of them are related... looking into this.

@mkouba mkouba added this to the 2.2 - main milestone Aug 4, 2021
@mkouba
Copy link
Contributor Author

mkouba commented Aug 4, 2021

Hm, the AgroalMetricsTestCase fails because the synthetic bean instance for io.agroal.api.AgroalDataSource is not initialized when the metrics are registered (I need to check the relevant build steps) and io.quarkus.scheduler.test.metrics.MicrometerTimedTest fails for no obvious reason (and I cannot reproduce it locally :-(

- when a metrics extension is present and
quarkus.scheduler.metrics.enabled=true a timed interceptor binding is
automatically added to a scheduled method
- SmallRye Metrics - consider MP annotations added via annotation transformer
- added MP metrics + quartz scheduler test
- improved BeanInfo javadoc
@mkouba mkouba force-pushed the scheduler-metrics branch from e0081fc to 7b53683 Compare August 4, 2021 13:05
@mkouba mkouba requested a review from ebullient August 4, 2021 18:28
@mkouba
Copy link
Contributor Author

mkouba commented Aug 4, 2021

The CI is green so it's up to you guys :-)

@ebullient
Copy link
Member

I've been keeping up, I'm ok

@mkouba
Copy link
Contributor Author

mkouba commented Aug 5, 2021

CC @machi1990

Copy link
Contributor

@jmartisk jmartisk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jmartisk jmartisk merged commit 7820ff6 into quarkusio:main Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants