Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangtianyu committed Nov 28, 2024
1 parent 752143d commit 71e5ccd
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
import java.util.function.Supplier;

/**
* Registers measurements that generate experimental metrics about file descriptor. This metrics are
* Registers measurements that generate experimental metrics about file descriptor. These metrics are
* experimental, see <a
* href="https://github.com/open-telemetry/semantic-conventions/issues/1275">File Descriptor metrics
* semantic conventions</a>
* semantic conventions</a>.
*
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
* at any time.
Expand Down Expand Up @@ -46,7 +46,7 @@ static List<AutoCloseable> registerObservers(
.buildWithCallback(
observableMeasurement -> {
Long openCount = openFileDescriptorCount.get();
if (openCount != null && openCount >= 0) {
if (openCount != null && openCount > 0) {
observableMeasurement.record(openCount);
}
}));
Expand All @@ -61,7 +61,7 @@ static List<AutoCloseable> registerObservers(
.buildWithCallback(
observableMeasurement -> {
Long maxCount = maxFileDescriptorCount.get();
if (maxCount != null && maxCount >= 0) {
if (maxCount != null && maxCount > 0) {
observableMeasurement.record(maxCount);
}
}));
Expand Down

0 comments on commit 71e5ccd

Please sign in to comment.