From c94c60c58bb293a0bd8d3508755a6c761599ae05 Mon Sep 17 00:00:00 2001 From: eitsch Date: Sat, 20 Feb 2021 14:55:53 +0100 Subject: [PATCH 1/8] reflect required java version in readme with commit https://github.com/gunnarmorling/jfr-custom-events/commit/4792255bd5a935914181c87d7c7df85b65242482 the required java version was 1upped --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b257b83..dd9cf84 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Update Feb. 8th: the example has been expanded to show the usage of the [JFR dat ## Build -Make sure to have Java 14 installed. +Make sure to have Java 15 installed. Run the following to build this project: ```shell From f5507ff34fc8815b1982648701d666055dfa0fc4 Mon Sep 17 00:00:00 2001 From: eitsch Date: Sat, 20 Feb 2021 15:10:10 +0100 Subject: [PATCH 2/8] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index dd9cf84..b41abef 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ Update Feb. 8th: the example has been expanded to show the usage of the [JFR dat ## Build Make sure to have Java 15 installed. +Make sure you have extracted the contents of https://github.com/rh-jmc-team/jfr-datasource into the empty folder ./jfr-datasource Run the following to build this project: ```shell From f3bbb3ccb4eda6ec7eefb9db91ea5f5a9bdb9ede Mon Sep 17 00:00:00 2001 From: eitsch Date: Sat, 20 Feb 2021 15:13:10 +0100 Subject: [PATCH 3/8] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b41abef..50c640d 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ Update Feb. 8th: the example has been expanded to show the usage of the [JFR dat ## Build -Make sure to have Java 15 installed. -Make sure you have extracted the contents of https://github.com/rh-jmc-team/jfr-datasource into the empty folder ./jfr-datasource +Make sure to have Java 15 installed +Make sure to have contents of https://github.com/rh-jmc-team/jfr-datasource extracted in folder ./jfr-datasource Run the following to build this project: ```shell From 158eb528f0af2de70a7b2666396d2b3b09e5aa68 Mon Sep 17 00:00:00 2001 From: eitsch Date: Tue, 23 Feb 2021 23:26:26 +0100 Subject: [PATCH 4/8] found the workaround \o/ hi gunnar, found the workaround to make it run ... i can re-use the Dockerfile.jvm you supplied in the example-service ootb --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 50c640d..1e37d36 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,14 @@ It also demonstrates how to export Flight Recorder events in realtime via MicroP Update Feb. 8th: the example has been expanded to show the usage of the [JFR datasource](https://github.com/rh-jmc-team/jfr-datasource) for Grafana. ## Build - -Make sure to have Java 15 installed -Make sure to have contents of https://github.com/rh-jmc-team/jfr-datasource extracted in folder ./jfr-datasource -Run the following to build this project: +### === PREPARATIONS === +* Make sure to have Java 15 installed +* Make sure to have contents of https://github.com/rh-jmc-team/jfr-datasource extracted in folder ./jfr-datasource +* Copy the file ```.\example-service\src\main\docker\Dockerfile.jvm``` to the directory ```.\jfr-datasource\src\main\docker``` +* Change [the line](https://github.com/gunnarmorling/jfr-custom-events/blob/9add5939ae91e779c7cf9037fd52421e845e0324/docker-compose.yaml#L78) ```dockerfile: docker/Dockerfile.jvm``` to ```dockerfile: src/main/docker/Dockerfile.jvm``` +### === PREPARATIONS === + +* Run the following to build this project: ```shell # Example service From b1d0e7845b1608bbe034e5aeba15f583f9065f65 Mon Sep 17 00:00:00 2001 From: eitsch Date: Sat, 13 Mar 2021 13:04:41 +0100 Subject: [PATCH 5/8] changing from "git ssh auth" to https --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index aeb020f..a0637aa 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "path_to_submodule"] path = jfr-datasource - url = git@github.com:gunnarmorling/jfr-datasource.git + url = https://github.com/gunnarmorling/jfr-datasource.git From dd3b5937296d544c109260c284f6ff39cb3421dc Mon Sep 17 00:00:00 2001 From: eitsch Date: Sat, 13 Mar 2021 13:46:53 +0100 Subject: [PATCH 6/8] updated with checking out submodules --- README.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1e37d36..e4821b4 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,14 @@ Example code accompanying the [blog post](https://www.morling.dev/blog/rest-api- It shows how to use custom event types with JDK Flight Recorder and Mission Control to gain insight into runtime performance of a JAX-RS based REST API. It also demonstrates how to export Flight Recorder events in realtime via MicroProfile Metrics, using the JDK Flight Recorder event streaming API ([JEP 349](https://openjdk.java.net/jeps/349)) added in Java 14. +### === PREREQUISITES === +* make sure to have Java 15 installed +* :heavy_exclamation_mark: make sure to have a populated jfr-datasource subdirectory after checkout by + * either **git clone** ```--recurse-submodules``` on initial clone + * or ```git submodule update --init --recursive``` if you have already cloned + * jfr-datasource is a referenced git project which stays an empty folder if you just use ```git clone ...``` +### === PREREQUISITES === + ![Custom Flight Recorder Events in JDK Mission Control](jfr_jax_rs_events.png) ![Metrics for Flight Recorder Events in Grafana](jfr_grafana.png) @@ -11,13 +19,6 @@ It also demonstrates how to export Flight Recorder events in realtime via MicroP Update Feb. 8th: the example has been expanded to show the usage of the [JFR datasource](https://github.com/rh-jmc-team/jfr-datasource) for Grafana. ## Build -### === PREPARATIONS === -* Make sure to have Java 15 installed -* Make sure to have contents of https://github.com/rh-jmc-team/jfr-datasource extracted in folder ./jfr-datasource -* Copy the file ```.\example-service\src\main\docker\Dockerfile.jvm``` to the directory ```.\jfr-datasource\src\main\docker``` -* Change [the line](https://github.com/gunnarmorling/jfr-custom-events/blob/9add5939ae91e779c7cf9037fd52421e845e0324/docker-compose.yaml#L78) ```dockerfile: docker/Dockerfile.jvm``` to ```dockerfile: src/main/docker/Dockerfile.jvm``` -### === PREPARATIONS === - * Run the following to build this project: ```shell @@ -30,6 +31,9 @@ mvn clean package -f jfr-datasource/pom.xml docker-compose up --build ``` +If you experience the following error message please scroll up and check the prerequisites +> POM file "jfr-datasource/pom.xml" specified the -f/--file command-line argument does not exist + Open the web application at http://localhost:8080/. You then can connect to the running application on port 1898 using Mission Control, start Flight Recorder and observe "JAX-RS" events in the recording. From 9994b4f9dea1cf4c59a13fbaccfc8d21599bc364 Mon Sep 17 00:00:00 2001 From: eitsch Date: Sat, 13 Mar 2021 14:03:22 +0100 Subject: [PATCH 7/8] changed order and wording a bit --- README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e4821b4..79604ce 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,6 @@ Example code accompanying the [blog post](https://www.morling.dev/blog/rest-api- It shows how to use custom event types with JDK Flight Recorder and Mission Control to gain insight into runtime performance of a JAX-RS based REST API. It also demonstrates how to export Flight Recorder events in realtime via MicroProfile Metrics, using the JDK Flight Recorder event streaming API ([JEP 349](https://openjdk.java.net/jeps/349)) added in Java 14. -### === PREREQUISITES === -* make sure to have Java 15 installed -* :heavy_exclamation_mark: make sure to have a populated jfr-datasource subdirectory after checkout by - * either **git clone** ```--recurse-submodules``` on initial clone - * or ```git submodule update --init --recursive``` if you have already cloned - * jfr-datasource is a referenced git project which stays an empty folder if you just use ```git clone ...``` -### === PREREQUISITES === - ![Custom Flight Recorder Events in JDK Mission Control](jfr_jax_rs_events.png) ![Metrics for Flight Recorder Events in Grafana](jfr_grafana.png) @@ -19,8 +11,14 @@ It also demonstrates how to export Flight Recorder events in realtime via MicroP Update Feb. 8th: the example has been expanded to show the usage of the [JFR datasource](https://github.com/rh-jmc-team/jfr-datasource) for Grafana. ## Build +### === PREREQUISITES === +* make sure to use java 15 for the build +* :heavy_exclamation_mark: make sure to have a populated jfr-datasource subdirectory after checkout by + * either **git clone** ```--recurse-submodules``` on initial clone + * or ```git submodule update --init --recursive``` if you have already cloned + * jfr-datasource is a referenced git project which stays an empty folder if you just use ```git clone ...``` +### === PREREQUISITES === * Run the following to build this project: - ```shell # Example service mvn clean package -f example-service/pom.xml From 565c2c0c143f151cbfbf7d811be89172ce2adf68 Mon Sep 17 00:00:00 2001 From: eitsch Date: Thu, 8 Jul 2021 14:43:39 +0200 Subject: [PATCH 8/8] updating testcontainers dependency to work around https://github.com/testcontainers/testcontainers-java/issues/3574 --- example-service/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example-service/pom.xml b/example-service/pom.xml index dd46ecc..227c19b 100644 --- a/example-service/pom.xml +++ b/example-service/pom.xml @@ -76,12 +76,12 @@ org.testcontainers junit-jupiter - 1.15.0 + 1.15.3 org.testcontainers postgresql - 1.15.0 + 1.15.3 org.skyscreamer