@@ -48,12 +48,13 @@ The following measurements are supported:
4848 * `memory` (default)
4949 * `total_run_queue_lengths` (default)
5050 * `system_counts` (default)
51+ * `persistent_term` (default)
5152 * `{process_info, Proplist}`
5253 * `{Module, Function, Args}`
5354
5455We will discuss each measurement in detail. Also note that the
5556`telemetry_poller` application ships with a built-in poller that
56- measures `memory`, `total_run_queue_lengths` and `system_counts `. This takes
57+ measures `memory`, `total_run_queue_lengths`, `system_counts`, and `persistent_term `. This takes
5758the VM measurement out of the way so your application can focus
5859on what is specific to its behaviour.
5960
@@ -83,6 +84,14 @@ The measurement includes:
8384 * `atom_count` - the number of atoms currently existing at the local node
8485 * `port_count` - the number of ports currently existing at the local node
8586
87+ ### Persistent term (since 1.2.0)
88+
89+ An event emitted as `[vm, persistent_term]`. The measurement includes information
90+ about persistent terms in the system, as returned by `persistent_term:info/0`:
91+
92+ * `count` - The number of persistent terms
93+ * `memory` - The total amount of memory (measured in bytes) used by all persistent terms
94+
8695### Process info
8796
8897A measurement with information about a given process. It must be specified
@@ -315,6 +324,7 @@ A measurement for the poller.
315324 memory
316325 | total_run_queue_lengths
317326 | system_counts
327+ | persistent_term
318328 | {process_info , [{name , atom ()} | {event , [atom ()]} | {keys , [atom ()]}]}
319329 | {module (), atom (), list ()}.
320330
@@ -425,6 +435,8 @@ parse_measurement(total_run_queue_lengths) ->
425435 {telemetry_poller_builtin , total_run_queue_lengths , []};
426436parse_measurement (system_counts ) ->
427437 {telemetry_poller_builtin , system_counts , []};
438+ parse_measurement (persistent_term ) ->
439+ {telemetry_poller_builtin , persistent_term , []};
428440parse_measurement ({process_info , List }) when is_list (List ) ->
429441 Name = case proplists :get_value (name , List ) of
430442 undefined -> erlang :error ({badarg , " Expected `name' key to be given under process_info measurement" });
0 commit comments