From 9d04544358bc72ad8f38e582576a300663e4ea6a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 12:14:46 -0500 Subject: [PATCH] Bump com.diffplug.spotless:spotless-maven-plugin from 2.43.0 to 2.44.0 (#1252) * Bump com.diffplug.spotless:spotless-maven-plugin from 2.43.0 to 2.44.0 Bumps [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless) from 2.43.0 to 2.44.0. - [Release notes](https://github.com/diffplug/spotless/releases) - [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md) - [Commits](https://github.com/diffplug/spotless/compare/lib/2.43.0...lib/2.44.0) --- updated-dependencies: - dependency-name: com.diffplug.spotless:spotless-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * format Signed-off-by: Gregor Zeitlinger * format Signed-off-by: Gregor Zeitlinger --------- Signed-off-by: dependabot[bot] Signed-off-by: Gregor Zeitlinger Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gregor Zeitlinger --- checkstyle.xml | 2 -- integration-tests/it-spring-boot-smoke-test/pom.xml | 2 +- pom.xml | 2 +- .../opentelemetry/otelmodel/PrometheusMetricData.java | 10 +++++----- .../instrumentation/dropwizard5/DropwizardExports.java | 6 ++++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/checkstyle.xml b/checkstyle.xml index ef205414d..fd483abfa 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -255,7 +255,6 @@ - diff --git a/integration-tests/it-spring-boot-smoke-test/pom.xml b/integration-tests/it-spring-boot-smoke-test/pom.xml index 2121c27c0..1a421949d 100644 --- a/integration-tests/it-spring-boot-smoke-test/pom.xml +++ b/integration-tests/it-spring-boot-smoke-test/pom.xml @@ -77,7 +77,7 @@ com.diffplug.spotless spotless-maven-plugin - 2.43.0 + 2.44.0 diff --git a/pom.xml b/pom.xml index c84af0d57..8dc201039 100644 --- a/pom.xml +++ b/pom.xml @@ -223,7 +223,7 @@ com.diffplug.spotless spotless-maven-plugin - 2.43.0 + 2.44.0 diff --git a/prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.java b/prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.java index baca70774..7bf4f5e27 100644 --- a/prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.java +++ b/prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.java @@ -53,7 +53,7 @@ static String convertUnit(Unit unit) { return null; } switch (unit.toString()) { - // Time + // Time case "days": return "d"; case "hours": @@ -68,7 +68,7 @@ static String convertUnit(Unit unit) { return "us"; case "nanoseconds": return "ns"; - // Bytes + // Bytes case "bytes": return "By"; case "kibibytes": @@ -87,7 +87,7 @@ static String convertUnit(Unit unit) { return "GBy"; case "terabytes": return "TBy"; - // SI + // SI case "meters": return "m"; case "volts": @@ -100,14 +100,14 @@ static String convertUnit(Unit unit) { return "W"; case "grams": return "g"; - // Misc + // Misc case "celsius": return "Cel"; case "hertz": return "Hz"; case "percent": return "%"; - // default + // default default: return unit.toString(); } diff --git a/prometheus-metrics-instrumentation-dropwizard5/src/main/java/io/prometheus/metrics/instrumentation/dropwizard5/DropwizardExports.java b/prometheus-metrics-instrumentation-dropwizard5/src/main/java/io/prometheus/metrics/instrumentation/dropwizard5/DropwizardExports.java index bd3a163ac..c050871ce 100644 --- a/prometheus-metrics-instrumentation-dropwizard5/src/main/java/io/prometheus/metrics/instrumentation/dropwizard5/DropwizardExports.java +++ b/prometheus-metrics-instrumentation-dropwizard5/src/main/java/io/prometheus/metrics/instrumentation/dropwizard5/DropwizardExports.java @@ -24,6 +24,7 @@ import java.util.Collections; import java.util.Map; import java.util.Optional; +import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; @@ -196,8 +197,9 @@ MetricSnapshot fromMeter(String dropwizardName, Meter meter) { @Override public MetricSnapshots collect() { MetricSnapshots.Builder metricSnapshots = MetricSnapshots.builder(); - for (@SuppressWarnings("rawtypes") - Map.Entry entry : registry.getGauges(metricFilter).entrySet()) { + @SuppressWarnings("rawtypes") + Set> entries = registry.getGauges(metricFilter).entrySet(); + for (@SuppressWarnings("rawtypes") Map.Entry entry : entries) { Optional.ofNullable(fromGauge(entry.getKey().getKey(), entry.getValue())) .ifPresent(metricSnapshots::metricSnapshot); }