We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c46c15 commit 9801a4eCopy full SHA for 9801a4e
examples/gocollector/main.go
@@ -22,6 +22,7 @@ import (
22
"fmt"
23
"log"
24
"net/http"
25
+ "regexp"
26
27
"github.com/prometheus/client_golang/prometheus"
28
"github.com/prometheus/client_golang/prometheus/collectors"
@@ -39,7 +40,7 @@ func main() {
39
40
// Add Go module build info.
41
reg.MustRegister(collectors.NewBuildInfoCollector())
42
reg.MustRegister(collectors.NewGoCollector(
- collectors.WithGoCollections(collectors.GoRuntimeMemStatsCollection | collectors.GoRuntimeMetricsCollection),
43
+ collectors.WithGoCollectorRuntimeMetrics(collectors.GoRuntimeMetricsRule{Matcher: regexp.MustCompile("/.*")}),
44
))
45
46
// Expose the registered metrics via HTTP.
0 commit comments