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)); 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()