From 990f6db5079c44374b71de0bca388469ce3cb2e2 Mon Sep 17 00:00:00 2001 From: Martin Kouba Date: Mon, 31 Oct 2022 09:52:56 +0100 Subject: [PATCH] Turn off monitoring of bean invocations and fired events by default - this feature seems to cause more problems than benefits - set quarkus.arc.dev-mode.monitoring-enabled=true to turn it on (cherry picked from commit a0951e8c42112771353cd2fd9fd3285c80750d78) --- docs/src/main/asciidoc/cdi-reference.adoc | 4 ++++ .../main/java/io/quarkus/arc/deployment/ArcDevModeConfig.java | 2 +- .../io/quarkus/test/devconsole/DevConsoleArcSmokeTest.java | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/src/main/asciidoc/cdi-reference.adoc b/docs/src/main/asciidoc/cdi-reference.adoc index f2f2087b72656..1d20c5b0aa0e9 100644 --- a/docs/src/main/asciidoc/cdi-reference.adoc +++ b/docs/src/main/asciidoc/cdi-reference.adoc @@ -1083,6 +1083,10 @@ In the development mode, two special endpoints are registered automatically to p NOTE: These endpoints are only available in the development mode, i.e. when you run your application via `mvn quarkus:dev` (or `./gradlew quarkusDev`). +=== Monitoring Business Method Invocations and Events + +In the development mode, it is also possible to enable monitoring of business method invocations and fired events. +Simply set the `quarkus.arc.dev-mode.monitoring-enabled` configuration property to `true` and explore the relevant Dev UI pages. [[arc-configuration-reference]] == ArC Configuration Reference diff --git a/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/ArcDevModeConfig.java b/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/ArcDevModeConfig.java index 18ac7917643ca..f5966f30e4921 100644 --- a/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/ArcDevModeConfig.java +++ b/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/ArcDevModeConfig.java @@ -9,7 +9,7 @@ public class ArcDevModeConfig { /** * If set to true then the container monitors business method invocations and fired events during the development mode. */ - @ConfigItem(defaultValue = "true") + @ConfigItem(defaultValue = "false") public boolean monitoringEnabled; } diff --git a/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/DevConsoleArcSmokeTest.java b/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/DevConsoleArcSmokeTest.java index 0af2b40ae71e9..4bf054ae3ec32 100644 --- a/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/DevConsoleArcSmokeTest.java +++ b/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/DevConsoleArcSmokeTest.java @@ -5,6 +5,7 @@ import javax.inject.Named; import org.hamcrest.Matchers; +import org.jboss.shrinkwrap.api.asset.StringAsset; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; @@ -20,7 +21,8 @@ public class DevConsoleArcSmokeTest { @RegisterExtension static final QuarkusDevModeTest test = new QuarkusDevModeTest() .withApplicationRoot((jar) -> jar - .addClasses(Foo.class)); + .addClasses(Foo.class).addAsResource(new StringAsset("quarkus.arc.dev-mode.monitoring-enabled=true"), + "application.properties")); @Test public void testPages() {