Skip to content

Commit 9bcbf44

Browse files
committed
consolidate name on jvm.file_descriptor.count
1 parent 774a310 commit 9bcbf44

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

jmx-metrics/src/integrationTest/java/io/opentelemetry/contrib/jmxmetrics/target_systems/JvmTargetSystemIntegrationTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@
55

66
package io.opentelemetry.contrib.jmxmetrics.target_systems;
77

8+
import io.opentelemetry.contrib.jmxmetrics.AbstractIntegrationTest;
89
import java.util.Arrays;
910
import java.util.List;
10-
1111
import org.junit.jupiter.api.Test;
1212
import org.testcontainers.containers.GenericContainer;
1313
import org.testcontainers.junit.jupiter.Container;
1414

15-
import io.opentelemetry.contrib.jmxmetrics.AbstractIntegrationTest;
16-
1715
class JvmTargetSystemIntegrationTest extends AbstractIntegrationTest {
1816

1917
JvmTargetSystemIntegrationTest() {

jmx-metrics/src/main/resources/target-systems/jvm.groovy

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,8 @@ otel.instrument(memory, "jvm.memory.heap", "current heap usage",
3333
otel.instrument(memory, "jvm.memory.nonheap", "current non-heap usage",
3434
"By", "NonHeapMemoryUsage", otel.&longValueCallback)
3535

36-
def runtime = otel.mbean("java.lang:type=Runtime")
37-
otel.instrument(runtime, "jvm.runtime.uptime", "uptime",
38-
"ms", "Uptime", otel.&longValueCallback)
39-
4036
def os = otel.mbean("java.lang:type=OperatingSystem")
41-
otel.instrument(os, "jvm.fd.open", "open file descriptors",
37+
otel.instrument(os, "jvm.file_descriptor.count", "open file descriptors",
4238
"1", "OpenFileDescriptorCount", otel.&longValueCallback)
4339

4440

jmx-scraper/src/main/resources/jvm.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ rules:
8383
metric: jvm.memory.pool.used
8484
desc: current memory pool usage
8585

86+
- bean: java.lang:type=OperatingSystem
87+
mapping:
88+
OpenFileDescriptorCount:
89+
metric: jvm.file_descriptor.count
90+
unit: 1
91+
desc: open file descriptors
92+
8693
- bean: java.lang:type=Threading
8794
mapping:
8895
ThreadCount:

0 commit comments

Comments
 (0)