Skip to content

Commit 71e5ccd

Browse files
committed
fix
1 parent 752143d commit 71e5ccd

File tree

1 file changed

+4
-4
lines changed
  • instrumentation/runtime-telemetry/runtime-telemetry-java8/library/src/main/java/io/opentelemetry/instrumentation/runtimemetrics/java8/internal

1 file changed

+4
-4
lines changed

instrumentation/runtime-telemetry/runtime-telemetry-java8/library/src/main/java/io/opentelemetry/instrumentation/runtimemetrics/java8/internal/ExperimentalFileDescriptor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
import java.util.function.Supplier;
1313

1414
/**
15-
* Registers measurements that generate experimental metrics about file descriptor. This metrics are
15+
* Registers measurements that generate experimental metrics about file descriptor. These metrics are
1616
* experimental, see <a
1717
* href="https://github.com/open-telemetry/semantic-conventions/issues/1275">File Descriptor metrics
18-
* semantic conventions</a>
18+
* semantic conventions</a>.
1919
*
2020
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
2121
* at any time.
@@ -46,7 +46,7 @@ static List<AutoCloseable> registerObservers(
4646
.buildWithCallback(
4747
observableMeasurement -> {
4848
Long openCount = openFileDescriptorCount.get();
49-
if (openCount != null && openCount >= 0) {
49+
if (openCount != null && openCount > 0) {
5050
observableMeasurement.record(openCount);
5151
}
5252
}));
@@ -61,7 +61,7 @@ static List<AutoCloseable> registerObservers(
6161
.buildWithCallback(
6262
observableMeasurement -> {
6363
Long maxCount = maxFileDescriptorCount.get();
64-
if (maxCount != null && maxCount >= 0) {
64+
if (maxCount != null && maxCount > 0) {
6565
observableMeasurement.record(maxCount);
6666
}
6767
}));

0 commit comments

Comments
 (0)