From af575456f222f5d0af852056bca114a75f3db839 Mon Sep 17 00:00:00 2001 From: Dan Kortschak Date: Tue, 12 Nov 2024 18:36:00 +1030 Subject: [PATCH] x-pack/filebeat/input/streaming: fix missing key in streaming input logging --- CHANGELOG.next.asciidoc | 1 + x-pack/filebeat/input/streaming/crowdstrike.go | 2 +- x-pack/filebeat/input/streaming/websocket.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 202784c979e..16f16b3da97 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -170,6 +170,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] - Fix double encoding of client_secret in the Entity Analytics input's Azure Active Directory provider {pull}41393[41393] - Fix aws region in aws-s3 input s3 polling mode. {pull}41572[41572] - Fix the "No such input type exist: 'salesforce'" error on the Windows/AIX platform. {pull}41664[41664] +- Fix missing key in streaming input logging. {pull}41600[41600] *Heartbeat* diff --git a/x-pack/filebeat/input/streaming/crowdstrike.go b/x-pack/filebeat/input/streaming/crowdstrike.go index 3fed6a69c1a..eb1797d2f6d 100644 --- a/x-pack/filebeat/input/streaming/crowdstrike.go +++ b/x-pack/filebeat/input/streaming/crowdstrike.go @@ -241,7 +241,7 @@ func (s *falconHoseStream) followSession(ctx context.Context, cli *http.Client, } s.metrics.receivedBytesTotal.Add(uint64(len(msg))) state["response"] = []byte(msg) - s.log.Debugw("received firehose message", logp.Namespace("falcon_hose"), debugMsg(msg)) + s.log.Debugw("received firehose message", logp.Namespace("falcon_hose"), "msg", debugMsg(msg)) err = s.process(ctx, state, s.cursor, s.now().In(time.UTC)) if err != nil { s.log.Errorw("failed to process and publish data", "error", err) diff --git a/x-pack/filebeat/input/streaming/websocket.go b/x-pack/filebeat/input/streaming/websocket.go index 1deaf8b07fa..0c8de94f5ad 100644 --- a/x-pack/filebeat/input/streaming/websocket.go +++ b/x-pack/filebeat/input/streaming/websocket.go @@ -136,7 +136,7 @@ func (s *websocketStream) FollowStream(ctx context.Context) error { } s.metrics.receivedBytesTotal.Add(uint64(len(message))) state["response"] = message - s.log.Debugw("received websocket message", logp.Namespace("websocket"), string(message)) + s.log.Debugw("received websocket message", logp.Namespace("websocket"), "msg", string(message)) err = s.process(ctx, state, s.cursor, s.now().In(time.UTC)) if err != nil { s.metrics.errorsTotal.Inc()