diff --git a/.chloggen/add-file-descriptor-metric-to-jvm.yaml b/.chloggen/add-file-descriptor-metric-to-jvm.yaml new file mode 100644 index 000000000..c697eee5c --- /dev/null +++ b/.chloggen/add-file-descriptor-metric-to-jvm.yaml @@ -0,0 +1,22 @@ +# Use this changelog template to create an entry for release notes. +# +# If your change doesn't affect end users you should instead start +# your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: jvm + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add `jvm.file_descriptor.count` as an in-development metric to track the number of open file descriptors as reported by the JVM. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +# The values here must be integers. +issues: [1838] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/docs/runtime/jvm-metrics.md b/docs/runtime/jvm-metrics.md index f569074d9..6fc64ae8e 100644 --- a/docs/runtime/jvm-metrics.md +++ b/docs/runtime/jvm-metrics.md @@ -34,6 +34,7 @@ This document describes semantic conventions for JVM metrics in OpenTelemetry. - [Metric: `jvm.buffer.memory.used`](#metric-jvmbuffermemoryused) - [Metric: `jvm.buffer.memory.limit`](#metric-jvmbuffermemorylimit) - [Metric: `jvm.buffer.count`](#metric-jvmbuffercount) + - [Metric: `jvm.file_descriptor.count`](#metric-jvmfile_descriptorcount) @@ -600,6 +601,27 @@ This metric is obtained from [`BufferPoolMXBean#getCount()`](https://docs.oracle +### Metric: `jvm.file_descriptor.count` + +This metric is [Opt-In][MetricOptIn]. +This metric is obtained from [`UnixOperatingSystemMXBean#getOpenFileDescriptorCount()`](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/UnixOperatingSystemMXBean.html#getOpenFileDescriptorCount()). + + + + + + + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| -------- | --------------- | ----------- | -------------- | --------- | +| `jvm.file_descriptor.count` | UpDownCounter | `{file_descriptor}` | Number of open file descriptors as reported by the JVM. | ![Development](https://img.shields.io/badge/-development-blue) | + + + + + + [DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status [MetricOptIn]: /docs/general/metric-requirement-level.md#opt-in [MetricRecommended]: /docs/general/metric-requirement-level.md#recommended diff --git a/model/jvm/metrics-experimental.yaml b/model/jvm/metrics-experimental.yaml index be4ed11de..62b02c5fc 100644 --- a/model/jvm/metrics-experimental.yaml +++ b/model/jvm/metrics-experimental.yaml @@ -67,3 +67,11 @@ groups: brief: "Number of buffers in the pool." instrument: updowncounter unit: "{buffer}" + + - id: metric.jvm.file_descriptor.count + type: metric + metric_name: jvm.file_descriptor.count + stability: development + brief: "Number of open file descriptors as reported by the JVM." + instrument: updowncounter + unit: "{file_descriptor}"