Skip to content

Commit 564a89f

Browse files
authored
remove unnecessary error log on DI ringbuf close (#36707)
1 parent 8ffa23d commit 564a89f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/dynamicinstrumentation/ringbufconsumer.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@
88
package dynamicinstrumentation
99

1010
import (
11+
"errors"
1112
"fmt"
1213

1314
"github.com/DataDog/datadog-agent/pkg/util/log"
1415

16+
"github.com/cilium/ebpf/ringbuf"
17+
1518
"github.com/DataDog/datadog-agent/pkg/dynamicinstrumentation/ditypes"
1619
"github.com/DataDog/datadog-agent/pkg/dynamicinstrumentation/eventparser"
1720
"github.com/DataDog/datadog-agent/pkg/dynamicinstrumentation/ratelimiter"
18-
"github.com/cilium/ebpf/ringbuf"
1921
)
2022

2123
func (goDI *GoDI) startRingbufferConsumer(rate float64) (func(), error) {
@@ -45,6 +47,9 @@ func (goDI *GoDI) startRingbufferConsumer(rate float64) (func(), error) {
4547
}
4648
err = r.ReadInto(&record)
4749
if err != nil {
50+
if errors.Is(err, ringbuf.ErrClosed) {
51+
return
52+
}
4853
log.Infof("couldn't read event off ringbuffer: %s", err.Error())
4954
continue
5055
}

0 commit comments

Comments
 (0)