diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6d9865a..fea427a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,9 +12,9 @@ jobs: canSkip: ${{ steps.Checker.outputs.canSkip }} steps: - name: Get files - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Get tools - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: path: tools/ repository: openliberty/guides-common @@ -45,10 +45,11 @@ jobs: working-directory: finish steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: 'semeru' java-version: 11 - run: unset _JAVA_OPTIONS diff --git a/README.adoc b/README.adoc index 8228b8a..a04dafd 100644 --- a/README.adoc +++ b/README.adoc @@ -1,4 +1,4 @@ -// Copyright (c) 2018, 2024 IBM Corporation and others. +// Copyright (c) 2018, 2025 IBM Corporation and others. // Licensed under Creative Commons Attribution-NoDerivatives // 4.0 International (CC BY-ND 4.0) // https://creativecommons.org/licenses/by-nd/4.0/ @@ -96,34 +96,47 @@ See the following sample outputs for the `@Timed`, `@Gauge`, and `@Counted` metr [role="no_copy"] ---- -# TYPE application_inventoryProcessingTime_rate_per_second gauge -application_inventoryProcessingTime_rate_per_second{method="get"} 0.0019189661542898407 +# TYPE inventoryProcessingTime_seconds_max gauge +inventoryProcessingTime_seconds_max{method="list",mp_scope="application",} 3.0375E-5 +inventoryProcessingTime_seconds_max{method="get",mp_scope="application",} 0.1997325 +# HELP inventoryProcessingTime_seconds Time needed to process the inventory +# TYPE inventoryProcessingTime_seconds summary +inventoryProcessingTime_seconds{method="list",mp_scope="application",quantile="0.5",} 0.0 +inventoryProcessingTime_seconds{method="list",mp_scope="application",quantile="0.75",} 0.0 ... -# TYPE application_inventoryProcessingTime_seconds summary -# HELP application_inventoryProcessingTime_seconds Time needed to process the inventory -application_inventoryProcessingTime_seconds_count{method="get"} 1 -application_inventoryProcessingTime_seconds{method="get",quantile="0.5"} 0.127965469 +inventoryProcessingTime_seconds_count{method="list",mp_scope="application",} 2.0 +inventoryProcessingTime_seconds_sum{method="list",mp_scope="application",} 3.6792E-5 +inventoryProcessingTime_seconds{method="get",mp_scope="application",quantile="0.5",} 0.0 +inventoryProcessingTime_seconds{method="get",mp_scope="application",quantile="0.75",} 0.0 ... -# TYPE application_inventoryProcessingTime_rate_per_second gauge -application_inventoryProcessingTime_rate_per_second{method="list"} 0.0038379320982686884 +inventoryProcessingTime_seconds_count{method="get",mp_scope="application",} 1.0 +inventoryProcessingTime_seconds_sum{method="get",mp_scope="application",} 0.1997325 ... -# TYPE application_inventoryProcessingTime_seconds summary -# HELP application_inventoryProcessingTime_seconds Time needed to process the inventory -application_inventoryProcessingTime_seconds_count{method="list"} 2 -application_inventoryProcessingTime_seconds{method="list",quantile="0.5"} 2.2185000000000002E-5 +# HELP inventoryAddingTime_seconds_max Time needed to add system properties to the inventory +# TYPE inventoryAddingTime_seconds_max gauge +inventoryAddingTime_seconds_max{mp_scope="application",} 3.1E-5 +# HELP inventoryAddingTime_seconds Time needed to add system properties to the inventory +# TYPE inventoryAddingTime_seconds summary +inventoryAddingTime_seconds{mp_scope="application",quantile="0.5",} 0.0 +inventoryAddingTime_seconds{mp_scope="application",quantile="0.75",} 0.0 +... +inventoryAddingTime_seconds_count{mp_scope="application",} 1.0 +inventoryAddingTime_seconds_sum{mp_scope="application",} 3.1E-5 ... ---- + [role="no_copy"] ---- -# TYPE application_inventorySizeGauge gauge -# HELP application_inventorySizeGauge Number of systems in the inventory -application_inventorySizeGauge 1 +# HELP inventorySizeGauge Number of systems in the inventory +# TYPE inventorySizeGauge gauge +inventorySizeGauge{mp_scope="application",} 1.0 ---- + [role="no_copy"] ---- -# TYPE application_inventoryAccessCount_total counter -# HELP application_inventoryAccessCount_total Number of times the list of systems method is requested -application_inventoryAccessCount_total 1 +# HELP inventoryAccessCount_total Number of times the list of systems method is requested +# TYPE inventoryAccessCount_total counter +inventoryAccessCount_total{mp_scope="application",} 2.0 ---- // static guide instructions: @@ -143,15 +156,15 @@ See the following sample output: [role="no_copy"] ---- -# TYPE base_jvm_uptime_seconds gauge -# HELP base_jvm_uptime_seconds Displays the start time of the Java virtual machine in milliseconds. This attribute displays the approximate time when the Java virtual machine started. -base_jvm_uptime_seconds 30.342000000000002 +# HELP jvm_uptime_seconds Displays the time from the start of the Java virtual machine in seconds. +# TYPE jvm_uptime_seconds gauge +jvm_uptime_seconds{mp_scope="base",} 730.705 ---- [role="no_copy"] ---- -# TYPE base_classloader_loadedClasses_count gauge -# HELP base_classloader_loadedClasses_count Displays the number of classes that are currently loaded in the Java virtual machine. -base_classloader_loadedClasses_count 11231 +# HELP classloader_loadedClasses_count Displays the number of classes that are currently loaded in the Java virtual machine. +# TYPE classloader_loadedClasses_count gauge +classloader_loadedClasses_count{mp_scope="base",} 13033.0 ---- // static guide instructions: @@ -171,15 +184,17 @@ See the following sample output: [role="no_copy"] ---- -# TYPE vendor_threadpool_size gauge -# HELP vendor_threadpool_size The size of the thread pool. -vendor_threadpool_size{pool="Default_Executor"} 32 +# HELP threadpool_size The size of the thread pool. +# TYPE threadpool_size gauge +threadpool_size{mp_scope="vendor",pool="Default_Executor",} 24.0 ---- [role="no_copy"] ---- -# TYPE vendor_servlet_request_total counter -# HELP vendor_servlet_request_total The number of visits to this servlet from the start of the server. -vendor_servlet_request_total{servlet="microprofile_metrics_io_openliberty_guides_inventory_InventoryApplication"} 1 +# HELP servlet_request_total The number of visits to this servlet ... the start of the server. +# TYPE servlet_request_total counter +servlet_request_total{mp_scope="vendor",servlet="guide_microprofile_metrics_io_openliberty_guides_system_SystemApplication",} 1.0 +servlet_request_total{mp_scope="vendor",servlet="guide_microprofile_metrics_io_openliberty_guides_inventory_InventoryApplication",} 3.0 +servlet_request_total{mp_scope="vendor",servlet="io_openliberty_microprofile_metrics_5_0_private_internal_PrivateMetricsRESTProxyServlet",} 3.0 ---- include::{common-includes}/twyb-end.adoc[] @@ -277,7 +292,7 @@ Apply the [hotspot=gaugeForGetTotal]`@Gauge` annotation to the [hotspot=getTotal |=== Additional information about these annotations, relevant metadata fields, and more are available at -the https://openliberty.io/docs/latest/reference/javadoc/microprofile-6.1-javadoc.html?class=org/eclipse/microprofile/metrics/annotation/package-summary.html&package=allclasses-frame.html[MicroProfile Metrics Annotation Javadoc^]. +the https://openliberty.io/docs/latest/reference/javadoc/microprofile-6.1-javadoc.html?class=org/eclipse/microprofile/metrics/annotation/package-summary.html&package=allclasses-frame.html&path=microprofile-6.1-javadoc/org/eclipse/microprofile/metrics/annotation/package-summary.html[MicroProfile Metrics Annotation Javadoc^]. == Enabling vendor metrics for the microservices diff --git a/finish/pom.xml b/finish/pom.xml index 0ec5324..c8bc98f 100644 --- a/finish/pom.xml +++ b/finish/pom.xml @@ -31,7 +31,7 @@ microprofile - 6.1 + 7.0 pom provided diff --git a/finish/src/main/liberty/config/server.xml b/finish/src/main/liberty/config/server.xml index a297b5f..5062c98 100755 --- a/finish/src/main/liberty/config/server.xml +++ b/finish/src/main/liberty/config/server.xml @@ -1,13 +1,15 @@ - restfulWS-3.1 - jsonp-2.1 - jsonb-3.0 - cdi-4.0 - mpConfig-3.1 - mpMetrics-5.1 - mpRestClient-3.0 + jakartaee-10.0 + microprofile-7.0 + restfulWS + jsonp + jsonb + cdi + mpConfig + mpMetrics + mpRestClient diff --git a/finish/src/main/webapp/index.html b/finish/src/main/webapp/index.html index 7034634..b03ff41 100755 --- a/finish/src/main/webapp/index.html +++ b/finish/src/main/webapp/index.html @@ -30,14 +30,14 @@

Eclipse MicroProfile

For more information about the features used in this application, see the Open Liberty documentation:

diff --git a/start/pom.xml b/start/pom.xml index 0ec5324..c8bc98f 100644 --- a/start/pom.xml +++ b/start/pom.xml @@ -31,7 +31,7 @@ microprofile - 6.1 + 7.0 pom provided diff --git a/start/src/main/liberty/config/server.xml b/start/src/main/liberty/config/server.xml index 3734965..2e11d5a 100644 --- a/start/src/main/liberty/config/server.xml +++ b/start/src/main/liberty/config/server.xml @@ -1,12 +1,14 @@ - restfulWS-3.1 - jsonp-2.1 - jsonb-3.0 - cdi-4.0 - mpConfig-3.1 - mpRestClient-3.0 + jakartaee-10.0 + microprofile-7.0 + restfulWS + jsonp + jsonb + cdi + mpConfig + mpRestClient diff --git a/start/src/main/webapp/index.html b/start/src/main/webapp/index.html index 7034634..b03ff41 100755 --- a/start/src/main/webapp/index.html +++ b/start/src/main/webapp/index.html @@ -30,14 +30,14 @@

Eclipse MicroProfile

For more information about the features used in this application, see the Open Liberty documentation: