Normal users should use `Prometheus.Metric.Gauge`, `Prometheus.Metric.Counter`,
`Prometheus.Metric.Summary`
and `Prometheus.Metric.Histogram`.
Implementing `:prometheus_collector` behaviour is for advanced uses such as proxying
metrics from another monitoring system.
It is the responsibility of the implementer to ensure produced metrics are valid.
You will be working with Prometheus data model directly (see `Prometheus.Model` ).
Callbacks:
- `collect_mf(registry, callback)` - called by exporters and formats.
Should call `callback` for each `MetricFamily` of this collector;
- `collect_metrics(name, data)` - called by `MetricFamily` constructor.
Should return Metric list for each MetricFamily identified by `name`.
`data` is a term associated with MetricFamily by collect_mf.
- `deregister_cleanup(registry)` - called when collector unregistered by
`registry`. If collector is stateful you can put cleanup code here.
Example (simplified [`:prometheus_vm_memory_collector`](https://github.com/deadtrickster/prometheus.erl/blob/master/doc/prometheus_vm_memory_collector.md)):