Skip to content

Commit 7f1258f

Browse files
authored
Merge pull request #627 from kubescape/no-iouring-exit
do not return an error if iouring tracer doesn't load
2 parents d9fc295 + ea0d76e commit 7f1258f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pkg/containerwatcher/v2/tracers/iouring.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func NewIoUringTracer(
4545
}
4646

4747
// Start initializes and starts the io_uring tracer
48-
func (it *IoUringTracer) Start(ctx context.Context) error {
48+
func (it *IoUringTracer) Start(_ context.Context) error {
4949
if err := it.tracerCollection.AddTracer(iouringTraceName, it.containerSelector); err != nil {
5050
return fmt.Errorf("adding io_uring tracer: %w", err)
5151
}
@@ -62,7 +62,8 @@ func (it *IoUringTracer) Start(ctx context.Context) error {
6262
it.iouringEventCallback,
6363
)
6464
if err != nil {
65-
return fmt.Errorf("creating io_uring tracer: %w", err)
65+
logger.L().Warning("Failed to create io_uring tracer", helpers.Error(err))
66+
return nil
6667
}
6768

6869
it.tracer = tracerIouring
@@ -94,8 +95,8 @@ func (it *IoUringTracer) GetEventType() utils.EventType {
9495

9596
// IsEnabled checks if this tracer should be enabled based on configuration
9697
func (it *IoUringTracer) IsEnabled(cfg interface{}) bool {
97-
if config, ok := cfg.(config.Config); ok {
98-
return config.EnableRuntimeDetection
98+
if conf, ok := cfg.(config.Config); ok {
99+
return conf.EnableRuntimeDetection
99100
}
100101
return false
101102
}

0 commit comments

Comments
 (0)