Lines 100.00% 2 / 2
Methods 100.00% 2 / 2
Classes 100.00% 1 / 1
Name Lines Methods CRAP
 __construct 100.00% 1 / 1 100.00% 1 / 1 1
 exportMetrics 100.00% 1 / 1 100.00% 1 / 1 1
9final readonly class RuntimeMetricsExporter
10{
11    public function __construct(
12        private SnapshotSource $snapshots,
13        private RuntimeMetricsCollector $collector,
14        private PrometheusTextEncoder $encoder,
15    ) {}
16
17    public function exportMetrics(): string
18    {
19        return $this->encoder->encodeFamilies($this->collector->collectMetrics($this->snapshots->takeSnapshot()));
20    }
21}