From 2cbe2dfb67d9900b398073ac3f6840b9ae129b61 Mon Sep 17 00:00:00 2001 From: jack-berg Date: Fri, 10 Jun 2022 13:39:36 -0500 Subject: [PATCH 1/2] Rename p.r.j.memory.max to p.r.j.memory.limit --- .../javaagent/runtimemetrics/RuntimeMetricsTest.groovy | 2 +- .../instrumentation/runtimemetrics/MemoryPools.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/instrumentation/runtime-metrics/javaagent/src/test/groovy/io/opentelemetry/instrumentation/javaagent/runtimemetrics/RuntimeMetricsTest.groovy b/instrumentation/runtime-metrics/javaagent/src/test/groovy/io/opentelemetry/instrumentation/javaagent/runtimemetrics/RuntimeMetricsTest.groovy index 1d8e1ad6ec03..d846e2bd7d3a 100644 --- a/instrumentation/runtime-metrics/javaagent/src/test/groovy/io/opentelemetry/instrumentation/javaagent/runtimemetrics/RuntimeMetricsTest.groovy +++ b/instrumentation/runtime-metrics/javaagent/src/test/groovy/io/opentelemetry/instrumentation/javaagent/runtimemetrics/RuntimeMetricsTest.groovy @@ -27,7 +27,7 @@ class RuntimeMetricsTest extends AgentInstrumentationSpecification { assert getMetrics().any { it.name == "process.runtime.jvm.memory.init" } assert getMetrics().any { it.name == "process.runtime.jvm.memory.usage" } assert getMetrics().any { it.name == "process.runtime.jvm.memory.committed" } - assert getMetrics().any { it.name == "process.runtime.jvm.memory.max" } + assert getMetrics().any { it.name == "process.runtime.jvm.memory.limit" } assert getMetrics().any { it.name == "process.runtime.jvm.threads.count" } } } diff --git a/instrumentation/runtime-metrics/library/src/main/java/io/opentelemetry/instrumentation/runtimemetrics/MemoryPools.java b/instrumentation/runtime-metrics/library/src/main/java/io/opentelemetry/instrumentation/runtimemetrics/MemoryPools.java index 35f040b08b3a..d47ecec6bca8 100644 --- a/instrumentation/runtime-metrics/library/src/main/java/io/opentelemetry/instrumentation/runtimemetrics/MemoryPools.java +++ b/instrumentation/runtime-metrics/library/src/main/java/io/opentelemetry/instrumentation/runtimemetrics/MemoryPools.java @@ -83,7 +83,7 @@ public static void registerObservers(OpenTelemetry openTelemetry) { .buildWithCallback(callback(poolBeans, MemoryUsage::getCommitted)); meter - .upDownCounterBuilder("process.runtime.jvm.memory.max") + .upDownCounterBuilder("process.runtime.jvm.memory.limit") .setDescription("Measure of max obtainable memory") .setUnit("By") .buildWithCallback(callback(poolBeans, MemoryUsage::getMax)); From 6a2d219d996ba93f3b11537f48bacbf5894db979 Mon Sep 17 00:00:00 2001 From: jack-berg Date: Fri, 10 Jun 2022 14:16:55 -0500 Subject: [PATCH 2/2] Fix build --- .../io/opentelemetry/smoketest/SpringBootSmokeTest.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smoke-tests/src/test/groovy/io/opentelemetry/smoketest/SpringBootSmokeTest.groovy b/smoke-tests/src/test/groovy/io/opentelemetry/smoketest/SpringBootSmokeTest.groovy index 2c438bbb8553..b013a87a0a73 100644 --- a/smoke-tests/src/test/groovy/io/opentelemetry/smoketest/SpringBootSmokeTest.groovy +++ b/smoke-tests/src/test/groovy/io/opentelemetry/smoketest/SpringBootSmokeTest.groovy @@ -80,7 +80,7 @@ class SpringBootSmokeTest extends SmokeTest { metrics.hasMetricsNamed("process.runtime.jvm.memory.init") metrics.hasMetricsNamed("process.runtime.jvm.memory.usage") metrics.hasMetricsNamed("process.runtime.jvm.memory.committed") - metrics.hasMetricsNamed("process.runtime.jvm.memory.max") + metrics.hasMetricsNamed("process.runtime.jvm.memory.limit") cleanup: stopTarget()