<?php

namespace onespace\core\components;

/**
 * Contract for anything that wants to populate metrics at scrape time.
 *
 * MetricsAction (see onespace\core\modules\metrics\actions\MetricsAction)
 * constructs the configured collectors and calls collect() on each of
 * them, in order, before rendering the registry. Implementations should
 * register/mutate whatever counters, gauges, or histograms they own on
 * $metrics - they should not render or touch the response themselves.
 */
interface MetricsCollectorInterface
{
    public function collect(MetricsComponent $metrics): void;
}