# `Prometheus.Registry`
[🔗](https://github.com/prometheus-erl/prometheus.ex/blob/v5.1.0/lib/prometheus/registry.ex#L1)

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](https://github.com/prometheus/pushgateway) from batch jobs.

# `clear`

Unregisters all collectors.

# `collect`

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

# `collector_registered?`

Checks whether `collector` is registered.

# `collectors`

Returns collectors registered in `registry`.

# `deregister_collector`

Unregisters a collector.

# `exists`

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).

# `register_collector`

Registers a collector.

# `register_collectors`

Registers collectors list.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
