Skip to content

Commit d20b2f4

Browse files
committed
process_collector: Merge wasip1 and js into a single implementation
Signed-off-by: Ying WANG <ying.wang@grafana.com>
1 parent 93c851f commit d20b2f4

File tree

2 files changed

+6
-39
lines changed

2 files changed

+6
-39
lines changed

prometheus/process_collector_js.go

Lines changed: 0 additions & 33 deletions
This file was deleted.

prometheus/process_collector_wasip1.go renamed to prometheus/process_collector_wasip1_js.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14-
//go:build wasip1
15-
// +build wasip1
14+
//go:build wasip1 || js
15+
// +build wasip1 js
1616

1717
package prometheus
1818

1919
func canCollectProcess() bool {
2020
return false
2121
}
2222

23+
// describe returns all descriptions of the collector for wasip1 and js.
24+
// Ensure that this list of descriptors is kept in sync with the metrics collected
25+
// in the processCollect method. Any changes to the metrics in processCollect
26+
// (such as adding or removing metrics) should be reflected in this list of descriptors.
2327
func (c *processCollector) processCollect(ch chan<- Metric) {
2428
c.errorCollectFn(ch)
2529
}
2630

27-
// describe returns all descriptions of the collector for wasip1.
28-
// Ensure that this list of descriptors is kept in sync with the metrics collected
29-
// in the processCollect method. Any changes to the metrics in processCollect
30-
// (such as adding or removing metrics) should be reflected in this list of descriptors.
3131
func (c *processCollector) describe(ch chan<- *Desc) {
3232
c.errorDescribeFn(ch)
3333
}

0 commit comments

Comments
 (0)