view = $view; $this->instrument = $instrument; $this->instrumentationLibrary = $instrumentationLibrary; $this->resource = $resource; $this->stream = $stream; $this->metricCollector = $metricCollector; $this->streamId = $streamId; } public function create($temporality): MetricSourceInterface { return new StreamMetricSource($this, $this->stream->register($temporality)); } public function instrumentType() { return $this->instrument->type; } public function name(): string { return $this->view->name; } public function unit(): ?string { return $this->view->unit; } public function description(): ?string { return $this->view->description; } public function temporality() { return $this->stream->temporality(); } }