From 02f0e8964549927d3537b809b7b6ecaf275bdd4b Mon Sep 17 00:00:00 2001 From: cleverchuk Date: Wed, 17 Dec 2025 15:59:58 -0500 Subject: [PATCH] enable JFR metrics by default --- .../extensions/SolarwindsPropertiesSupplier.java | 2 ++ smoke-tests/k6/basic.js | 7 +++++++ smoke-tests/sdk-config.yaml | 2 ++ smoke-tests/src/test/java/com/solarwinds/SmokeTest.java | 9 +++++++++ .../src/test/java/com/solarwinds/SmokeTestV2.java | 9 +++++++++ 5 files changed, 29 insertions(+) diff --git a/custom/src/main/java/com/solarwinds/opentelemetry/extensions/SolarwindsPropertiesSupplier.java b/custom/src/main/java/com/solarwinds/opentelemetry/extensions/SolarwindsPropertiesSupplier.java index 5d52ceb0..cdeed851 100644 --- a/custom/src/main/java/com/solarwinds/opentelemetry/extensions/SolarwindsPropertiesSupplier.java +++ b/custom/src/main/java/com/solarwinds/opentelemetry/extensions/SolarwindsPropertiesSupplier.java @@ -37,10 +37,12 @@ public class SolarwindsPropertiesSupplier implements Supplier check(measurement, {"otel-metrics-17": mrs => mrs.value > 0}), + service + ) + }) + silence(function () { verify_that_metrics_are_reported("trace.jvm.Runtime.Uptime", (measurement) => check(measurement, {"trace.jvm-metrics": mrs => mrs.value === 0}), diff --git a/smoke-tests/sdk-config.yaml b/smoke-tests/sdk-config.yaml index 5ed9408f..20e5b582 100644 --- a/smoke-tests/sdk-config.yaml +++ b/smoke-tests/sdk-config.yaml @@ -116,6 +116,8 @@ logger_provider: instrumentation/development: java: + runtime-telemetry-java17: + enable-all: true common: default-enabled: true solarwinds: diff --git a/smoke-tests/src/test/java/com/solarwinds/SmokeTest.java b/smoke-tests/src/test/java/com/solarwinds/SmokeTest.java index 7a5895a6..fa91c335 100644 --- a/smoke-tests/src/test/java/com/solarwinds/SmokeTest.java +++ b/smoke-tests/src/test/java/com/solarwinds/SmokeTest.java @@ -255,6 +255,15 @@ void assertThatMetricsAreExported() throws IOException { assertTrue(passes > 0, "otel metric export is broken"); } + @Test + void assertThatRuntimeMetrics17AreExported() throws IOException { + String resultJson = new String( + Files.readAllBytes(namingConventions.local.k6Results(Configs.E2E.config.agents().get(0)))); + double passes = ResultsCollector.read(resultJson, + "$.root_group.checks.['otel-metrics-17'].passes"); + assertTrue(passes > 0, "JVM 17+ runtime metric export is broken"); + } + @Test void assertThatSdkTracingIsWorking() throws IOException { String resultJson = new String( diff --git a/smoke-tests/src/test/java/com/solarwinds/SmokeTestV2.java b/smoke-tests/src/test/java/com/solarwinds/SmokeTestV2.java index 629a3a98..0f9eae5c 100644 --- a/smoke-tests/src/test/java/com/solarwinds/SmokeTestV2.java +++ b/smoke-tests/src/test/java/com/solarwinds/SmokeTestV2.java @@ -235,6 +235,15 @@ void assertThatMetricsAreExported() throws IOException { assertTrue(passes > 0, "otel metric export is broken"); } + @Test + void assertThatRuntimeMetrics17AreExported() throws IOException { + String resultJson = new String( + Files.readAllBytes(namingConventions.local.k6Results(Configs.E2E.config.agents().get(0)))); + double passes = ResultsCollector.read(resultJson, + "$.root_group.checks.['otel-metrics-17'].passes"); + assertTrue(passes > 0, "JVM 17+ runtime metric export is broken"); + } + @Test void assertThatSdkTracingIsWorking() throws IOException { String resultJson = new String(