VM Memory Collector

Collects information about memory dynamically allocated by the Erlang emulator using :erlang.memory/0. Also provides basic (D)ETS statistics.

Exported metrics

  • erlang_vm_memory_atom_bytes_total
    Type: gauge.
    Labels:
    • usage="free"|"used".

    The total amount of memory currently allocated for atoms. This memory is part of the memory presented as system memory.
  • erlang_vm_memory_bytes_total
    Type: gauge.
    Labels:
    • kind="system"|"processes".

    The total amount of memory currently allocated. This is the same as the sum of the memory size for processes and system.
  • erlang_vm_dets_tables
    Type: gauge.
    Erlang VM DETS Tables count.
  • erlang_vm_ets_tables
    Type: gauge.
    Erlang VM ETS Tables count.
  • erlang_vm_memory_processes_bytes_total
    Type: gauge.
    Labels:
    • usage="used"|"free".

    The total amount of memory currently allocated for the Erlang processes.
  • erlang_vm_memory_system_bytes_total
    Type: gauge.
    Labels:
    • usage="atom"|"binary"|"code"|"ets"|"other".

    The total amount of memory currently allocated for the emulator that is not directly related to any Erlang process. Memory presented as processes is not included in this memory.

Configuration

Metrics exported by this collector can be configured via :vm_memory_collector_metrics key of :prometheus app environment.

Available options:

  • :atom_bytes_total for erlang_vm_memory_atom_bytes_total;
  • :bytes_total for erlang_vm_memory_bytes_total;
  • :dets_tables for erlang_vm_dets_tables;
  • :ets_tables for erlang_vm_ets_tables;
  • :processes_bytes_total for erlang_vm_memory_processes_bytes_total;
  • :system_bytes_total for erlang_vm_memory_system_bytes_total.

By default all metrics are enabled.