diff --git a/instrumentation/runtime-telemetry/runtime-telemetry-java8/library/src/main/java/io/opentelemetry/instrumentation/runtimemetrics/java8/internal/ExperimentalFileDescriptor.java b/instrumentation/runtime-telemetry/runtime-telemetry-java8/library/src/main/java/io/opentelemetry/instrumentation/runtimemetrics/java8/internal/ExperimentalFileDescriptor.java index 72ac9939eafc..381a3b2e6a13 100644 --- a/instrumentation/runtime-telemetry/runtime-telemetry-java8/library/src/main/java/io/opentelemetry/instrumentation/runtimemetrics/java8/internal/ExperimentalFileDescriptor.java +++ b/instrumentation/runtime-telemetry/runtime-telemetry-java8/library/src/main/java/io/opentelemetry/instrumentation/runtimemetrics/java8/internal/ExperimentalFileDescriptor.java @@ -61,7 +61,7 @@ static List registerObservers( .buildWithCallback( observableMeasurement -> { Long maxCount = maxFileDescriptorCount.get(); - if (maxCount != null && maxCount > 0) { + if (maxCount != null && maxCount >= 0) { observableMeasurement.record(maxCount); } }));