Skip to content

Commit

Permalink
Remove verbose debug logs from acker (#39672)
Browse files Browse the repository at this point in the history
Remove some debug log entries about acked events. Those log entries
turn out to be very verbose and of very little use. They do not carry
any information about the acked events, and we already have metrics
about acked events in the 30s metrics and monitoring HTTP endpoint.

(cherry picked from commit 62b4c18)
  • Loading branch information
belimawr authored and mergify[bot] committed May 23, 2024
1 parent 27ab351 commit 4085439
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-developer.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ The list below covers the major changes between 7.0.0-rc2 and main only.
- `queue.ACKListener` has been removed. Queue configurations now accept an explicit callback function for ACK handling. {pull}35078[35078]
- Split split httpmon out of x-pack/filebeat/input/internal/httplog. {pull}36385[36385]
- Beats publishing pipeline does not propagate the close signal to its clients any more. It's responsibility of the user to close the pipeline client. {issue}38197[38197] {pull}38556[38556]
- Debug log entries from the acker (`stateful ack ...` or `stateless ack ...`) removed. {pull}39672[39672]

==== Bugfixes

Expand Down
5 changes: 0 additions & 5 deletions filebeat/beater/acker.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"github.com/elastic/beats/v7/filebeat/input/file"
"github.com/elastic/beats/v7/libbeat/beat"
"github.com/elastic/beats/v7/libbeat/common/acker"
"github.com/elastic/elastic-agent-libs/logp"
)

type statefulLogger interface {
Expand All @@ -35,8 +34,6 @@ type statelessLogger interface {
// eventAcker handles publisher pipeline ACKs and forwards
// them to the registrar or directly to the stateless logger.
func eventACKer(statelessOut statelessLogger, statefulOut statefulLogger) beat.EventListener {
log := logp.NewLogger("acker")

return acker.EventPrivateReporter(func(_ int, data []interface{}) {
stateless := 0
states := make([]file.State, 0, len(data))
Expand All @@ -56,12 +53,10 @@ func eventACKer(statelessOut statelessLogger, statefulOut statefulLogger) beat.E
}

if len(states) > 0 {
log.Debugw("stateful ack", "count", len(states))
statefulOut.Published(states)
}

if stateless > 0 {
log.Debugw("stateless ack", "count", stateless)
statelessOut.Published(stateless)
}
})
Expand Down

0 comments on commit 4085439

Please sign in to comment.