$labels Default labels, i.e. ['instance' => 'instance_1'] */ public readonly array $labels = [] ) { self::assertValidLabels($labels); $metricName = ($namespace !== '' ? $namespace . '_' : '') . $name; Collector::assertValidMetricName($metricName); $this->metricName = $metricName; } /** @param array $labels */ protected static function assertValidLabels(array $labels): void { foreach ($labels as $labelKey => $_) { Collector::assertValidLabel($labelKey); } } /** * Create a new instance of this collector, with these additional labels. * * @param array $labels */ abstract public function addLabels(array $labels): static; }