Skip to content

Commit bf0ef29

Browse files
committed
default add all go runtime metrics
Signed-off-by: dongjiang <[email protected]>
1 parent 85fc176 commit bf0ef29

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

pkg/internal/controller/metrics/metrics.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ limitations under the License.
1717
package metrics
1818

1919
import (
20-
"regexp"
21-
2220
"github.com/prometheus/client_golang/prometheus"
2321
"github.com/prometheus/client_golang/prometheus/collectors"
2422
"sigs.k8s.io/controller-runtime/pkg/metrics"
@@ -90,14 +88,7 @@ func init() {
9088
ActiveWorkers,
9189
// expose process metrics like CPU, Memory, file descriptor usage etc.
9290
collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}),
93-
// expose Go runtime metrics like GC stats, memory stats etc.
94-
collectors.NewGoCollector(
95-
collectors.WithGoCollectorRuntimeMetrics(
96-
collectors.MetricsGC,
97-
collectors.MetricsScheduler,
98-
collectors.MetricsMemory,
99-
collectors.GoRuntimeMetricsRule{Matcher: regexp.MustCompile(`^/sync/.*`)},
100-
),
101-
),
91+
// expose all Go runtime metrics like GC stats, memory stats etc.
92+
collectors.NewGoCollector(collectors.WithGoCollectorRuntimeMetrics(collectors.MetricsAll)),
10293
)
10394
}

0 commit comments

Comments
 (0)