diff --git a/prometheus/process_collector_js.go b/prometheus/process_collector_js.go deleted file mode 100644 index 0b42a6f..0000000 --- a/prometheus/process_collector_js.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2019 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build js -// +build js - -package prometheus - -func canCollectProcess() bool { - return false -} - -// describe returns all descriptions of the collector for js. -// Ensure that this list of descriptors is kept in sync with the metrics collected -// in the processCollect method. Any changes to the metrics in processCollect -// (such as adding or removing metrics) should be reflected in this list of descriptors. -func (c *processCollector) processCollect(ch chan<- Metric) { - c.errorCollectFn(ch) -} - -func (c *processCollector) describe(ch chan<- *Desc) { - c.errorDescribeFn(ch) -} diff --git a/prometheus/process_collector_wasip1.go b/prometheus/process_collector_wasip1_js.go similarity index 95% rename from prometheus/process_collector_wasip1.go rename to prometheus/process_collector_wasip1_js.go index 5c74c2c..c68f7f8 100644 --- a/prometheus/process_collector_wasip1.go +++ b/prometheus/process_collector_wasip1_js.go @@ -11,8 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build wasip1 -// +build wasip1 +//go:build wasip1 || js +// +build wasip1 js package prometheus @@ -24,7 +24,7 @@ func (c *processCollector) processCollect(ch chan<- Metric) { c.errorCollectFn(ch) } -// describe returns all descriptions of the collector for wasip1. +// describe returns all descriptions of the collector for wasip1 and js. // Ensure that this list of descriptors is kept in sync with the metrics collected // in the processCollect method. Any changes to the metrics in processCollect // (such as adding or removing metrics) should be reflected in this list of descriptors.