From a8c6bc3a2fc590ef6b48ad1810aa0d1abf013a81 Mon Sep 17 00:00:00 2001 From: Dan Kortschak <90160302+efd6@users.noreply.github.com> Date: Wed, 25 Oct 2023 20:46:50 +1030 Subject: [PATCH] x-pack/filebeat/input/internal/httplog: fix incorrect append source (#36956) (cherry picked from commit bbf0111c1d50b13e9e2742758ab19e89562ad1a4) --- CHANGELOG.next.asciidoc | 3 +++ x-pack/filebeat/input/internal/httplog/roundtripper.go | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 1a8c59cd3ca..726a753b495 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -109,6 +109,9 @@ is collected by it. - Ensure winlog input retains metric collection when handling recoverable errors. {issue}36479[36479] {pull}36483[36483] - Revert error introduced in {pull}35734[35734] when symlinks can't be resolved in filestream. {pull}36557[36557] - Fix ignoring external input configuration in `take_over: true` mode {issue}36378[36378] {pull}36395[36395] +- Add validation to http_endpoint config for empty URL {pull}36816[36816] {issue}36772[36772] +- Fix merging of array fields(processors, paths, parsers) in configurations generated from hints and default config. {issue}36838[36838] {pull}36857[36857] +- Fix handling of response errors in HTTPJSON and CEL request trace logging. {pull}36956[36956] *Heartbeat* diff --git a/x-pack/filebeat/input/internal/httplog/roundtripper.go b/x-pack/filebeat/input/internal/httplog/roundtripper.go index bbb76cb5045..78e872efa66 100644 --- a/x-pack/filebeat/input/internal/httplog/roundtripper.go +++ b/x-pack/filebeat/input/internal/httplog/roundtripper.go @@ -158,9 +158,9 @@ func (rt *LoggingRoundTripper) RoundTrip(req *http.Request) (*http.Response, err switch len(errorsMessages) { case 0: case 1: - respParts = append(reqParts, zap.String("error.message", errorsMessages[0])) + respParts = append(respParts, zap.String("error.message", errorsMessages[0])) default: - respParts = append(reqParts, zap.Strings("error.message", errorsMessages)) + respParts = append(respParts, zap.Strings("error.message", errorsMessages)) } log.Debug("HTTP response", respParts...)