Prometheus.ex v3.0.2 Prometheus.Registry View Source

A registry of Collectors.

The majority of users should use the :default, rather than their own.

Creating a registry other than the default is primarily useful for unit tests, or pushing a subset of metrics to the Pushgateway from batch jobs.

Link to this section Summary

Functions

Unregisters all collectors

Calls callback for each collector with two arguments: registry and collector

Checks whether collector is registered

Returns collectors registered in registry

Tries to find registry with the name. Assumes that registry name is always an atom. If Name is an atom ets:lookup/2 is used If Name is an iolist performs safe search (to avoid interning atoms) and returns atom or false. This operation is O(n)

Link to this section Functions

Link to this macro clear(registry \\ :default) View Source (macro)

Unregisters all collectors.

Link to this macro collect(callback, registry \\ :default) View Source (macro)

Calls callback for each collector with two arguments: registry and collector.

Link to this macro collector_registered?(registry \\ :default, collector) View Source (macro)

Checks whether collector is registered.

Link to this macro collectors(registry \\ :default) View Source (macro)

Returns collectors registered in registry.

Link to this macro deregister_collector(registry \\ :default, collector) View Source (macro)

Unregisters a collector.

Tries to find registry with the name. Assumes that registry name is always an atom. If Name is an atom ets:lookup/2 is used If Name is an iolist performs safe search (to avoid interning atoms) and returns atom or false. This operation is O(n).

Link to this macro register_collector(registry \\ :default, collector) View Source (macro)

Registers a collector.

Link to this macro register_collectors(registry \\ :default, collectors) View Source (macro)

Registers collectors list.