From 943a4edc9a43beb876b13d38cb41aa0fe458abf3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 06:45:28 +0000 Subject: [PATCH 1/2] fix(deps): bump org.springframework.boot:spring-boot-dependencies Bumps [org.springframework.boot:spring-boot-dependencies](https://github.com/spring-projects/spring-boot) from 3.2.5 to 3.3.0. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.5...v3.3.0) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-dependencies dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- sda-commons-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sda-commons-dependencies/build.gradle b/sda-commons-dependencies/build.gradle index 36dd5e3d7..e5f8680e4 100644 --- a/sda-commons-dependencies/build.gradle +++ b/sda-commons-dependencies/build.gradle @@ -10,7 +10,7 @@ ext { awaitalityVersion = '4.2.0' bouncycastleVersion = '1.78.1' logbackContribVersion = '0.1.5' - springBootVersion = '3.2.5' + springBootVersion = '3.3.0' springCloudVersion = '2023.0.1' scalaVersion = '2.13.14' swaggerCoreVersion = '2.2.22' From eb2cb36b358fea0c94214e768e1ef9022e039aac Mon Sep 17 00:00:00 2001 From: elbiocaetano Date: Mon, 27 May 2024 13:47:12 +0200 Subject: [PATCH 2/2] fix: renaming changed metrics --- docs/starter-web.md | 2 ++ .../sdase/commons/spring/boot/web/monitoring/MetricsIT.java | 4 ++-- .../spring/boot/web/monitoring/testing/MetricsConstants.java | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/starter-web.md b/docs/starter-web.md index ef50b1ed7..b265d662b 100644 --- a/docs/starter-web.md +++ b/docs/starter-web.md @@ -528,6 +528,7 @@ Spring Boot is using [micrometer](https://micrometer.io/) to instrument code usi | `jvm_memory_used_bytes` | `id`, `area` | The amount of used memory. | | `jvm_memory_committed_bytes` | `id`, `area` | The amount of memory in bytes that is committed for the Java virtual machine to use. | | `jvm_memory_max_bytes` | `id`, `area` | The maximum amount of memory in bytes that can be used for memory management. | +| `jvm_memory_usage_after_gc` | | The amount of memory used by the JVM after garbage collection (GC) has occurred. | | `jvm_gc_max_data_size_bytes` | | Max size of long-lived heap memory pool. | | `jvm_gc_live_data_size_bytes` | | Size of long-lived heap memory pool after reclamation. | | `jvm_gc_memory_allocated_bytes_total` | | Incremented for an increase in the size of the (young) heap memory pool after one GC to before the next. | @@ -538,6 +539,7 @@ Spring Boot is using [micrometer](https://micrometer.io/) to instrument code usi | `jvm_gc_pause_seconds_count` | `gc`, `action`, `cause` | Time spent in GC pause. | | `jvm_gc_pause_seconds_sum` | `gc`, `action`, `cause` | | | `jvm_gc_pause_seconds_max` | `gc`, `action`, `cause` | | +| `jvm_gc_overhead` | | The percentage of total CPU time that is spent in garbage collection activities. | | `system_cpu_count` | | The number of processors available to the Java virtual machine. | | `system_load_average_1m` | | The sum of the number of runnable entities queued to available processors and the number of runnable entities running on the available processors averaged over a period of time. | | `system_cpu_usage` | | The "recent cpu usage" of the system the application is running in. | diff --git a/sda-commons-starter-web/src/test/java/org/sdase/commons/spring/boot/web/monitoring/MetricsIT.java b/sda-commons-starter-web/src/test/java/org/sdase/commons/spring/boot/web/monitoring/MetricsIT.java index 8a027b8d6..1ff7c3cbf 100644 --- a/sda-commons-starter-web/src/test/java/org/sdase/commons/spring/boot/web/monitoring/MetricsIT.java +++ b/sda-commons-starter-web/src/test/java/org/sdase/commons/spring/boot/web/monitoring/MetricsIT.java @@ -118,9 +118,9 @@ void shouldProduceHttpServerMetricWithPathVariable() { assertThat(metrics) .contains( - "http_server_requests_seconds_count{error=\"none\",exception=\"none\",method=\"GET\",outcome=\"SUCCESS\",status=\"200\",uri=\"/add-custom-metrics/{name}\",} ") + "http_server_requests_seconds_count{error=\"none\",exception=\"none\",method=\"GET\",outcome=\"SUCCESS\",status=\"200\",uri=\"/add-custom-metrics/{name}\"} ") .contains( - "http_server_requests_seconds_sum{error=\"none\",exception=\"none\",method=\"GET\",outcome=\"SUCCESS\",status=\"200\",uri=\"/add-custom-metrics/{name}\",} "); + "http_server_requests_seconds_sum{error=\"none\",exception=\"none\",method=\"GET\",outcome=\"SUCCESS\",status=\"200\",uri=\"/add-custom-metrics/{name}\"} "); } @Test diff --git a/sda-commons-starter-web/src/test/java/org/sdase/commons/spring/boot/web/monitoring/testing/MetricsConstants.java b/sda-commons-starter-web/src/test/java/org/sdase/commons/spring/boot/web/monitoring/testing/MetricsConstants.java index eef85102e..091d59a01 100644 --- a/sda-commons-starter-web/src/test/java/org/sdase/commons/spring/boot/web/monitoring/testing/MetricsConstants.java +++ b/sda-commons-starter-web/src/test/java/org/sdase/commons/spring/boot/web/monitoring/testing/MetricsConstants.java @@ -17,7 +17,7 @@ private MetricsConstants() {} public static final List PROMETHEUS_METRICS_NAMES = List.of( "tomcat_sessions_created_sessions_total", - "jvm_memory_usage_after_gc_percent", + "jvm_memory_usage_after_gc", "http_client_requests_seconds_count", "http_client_requests_seconds_sum", "http_client_requests_seconds_max", @@ -51,7 +51,7 @@ private MetricsConstants() {} "jvm_buffer_count_buffers", "jvm_memory_used_bytes", "executor_queue_remaining_tasks", - "jvm_gc_overhead_percent", + "jvm_gc_overhead", "disk_free_bytes", "tomcat_sessions_active_max_sessions", "disk_total_bytes",