From 1025df136b21063090fd2978e63e77d921e73c96 Mon Sep 17 00:00:00 2001 From: val06 Date: Mon, 24 Jun 2024 14:50:57 +0100 Subject: [PATCH] [EBPF] - fixed LockContentionCollector init (#26992) --- cmd/system-probe/subcommands/run/command.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/system-probe/subcommands/run/command.go b/cmd/system-probe/subcommands/run/command.go index 88b9d0cf32196..e41104902116d 100644 --- a/cmd/system-probe/subcommands/run/command.go +++ b/cmd/system-probe/subcommands/run/command.go @@ -338,7 +338,9 @@ func startSystemProbe(log log.Component, statsd compstatsd.Component, telemetry if pc := ebpftelemetry.NewPerfUsageCollector(); pc != nil { telemetry.RegisterCollector(pc) } - telemetry.RegisterCollector(ddebpf.NewLockContentionCollector()) + if lcc := ddebpf.NewLockContentionCollector(); lcc != nil { + telemetry.RegisterCollector(lcc) + } } go func() { common.ExpvarServer = &http.Server{