groups:
  - id: metric.jvm.memory.init
    type: metric
    metric_name: jvm.memory.init
    annotations:
      code_generation:
        metric_value_type: int
    stability: development
    extends: attributes.jvm.memory
    brief: "Measure of initial memory requested."
    instrument: updowncounter
    unit: "By"

  - id: metric.jvm.system.cpu.utilization
    type: metric
    metric_name: jvm.system.cpu.utilization
    annotations:
      code_generation:
        metric_value_type: double
    stability: development
    brief: "Recent CPU utilization for the whole system as reported by the JVM."
    note: >
      The value range is [0.0,1.0].
      This utilization is not defined as being for the specific interval since last measurement
      (unlike `system.cpu.utilization`).
      [Reference](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getCpuLoad()).
    instrument: gauge
    unit: "1"

  - id: metric.jvm.system.cpu.load_1m
    type: metric
    metric_name: jvm.system.cpu.load_1m
    annotations:
      code_generation:
        metric_value_type: double
    stability: development
    brief: "Average CPU load of the whole system for the last minute as reported by the JVM."
    note: >
      The value range is [0,n], where n is the number of CPU cores - or a negative number if the value is not available.
      This utilization is not defined as being for the specific interval since last measurement
      (unlike `system.cpu.utilization`).
      [Reference](https://docs.oracle.com/en/java/javase/17/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html#getSystemLoadAverage()).
    instrument: gauge
    unit: "{run_queue_item}"

  - id: attributes.jvm.buffer
    type: attribute_group
    brief: "Describes JVM buffer metric attributes."
    attributes:
      - ref: jvm.buffer.pool.name
        requirement_level: recommended

  - id: metric.jvm.buffer.memory.used
    type: metric
    metric_name: jvm.buffer.memory.used
    annotations:
      code_generation:
        metric_value_type: int
    stability: development
    extends: attributes.jvm.buffer
    brief: "Measure of memory used by buffers."
    instrument: updowncounter
    unit: "By"

  - id: metric.jvm.buffer.memory.limit
    type: metric
    metric_name: jvm.buffer.memory.limit
    annotations:
      code_generation:
        metric_value_type: int
    stability: development
    extends: attributes.jvm.buffer
    brief: "Measure of total memory capacity of buffers."
    instrument: updowncounter
    unit: "By"

  - id: metric.jvm.buffer.count
    type: metric
    metric_name: jvm.buffer.count
    annotations:
      code_generation:
        metric_value_type: int
    stability: development
    extends: attributes.jvm.buffer
    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
    annotations:
      code_generation:
        metric_value_type: int
    stability: development
    brief: "Number of open file descriptors as reported by the JVM."
    instrument: updowncounter
    unit: "{file_descriptor}"
