From 981fbd4c843b0d611467e0b7054c3fe05f4aa86d Mon Sep 17 00:00:00 2001 From: Vishal Raj Date: Thu, 16 May 2024 13:57:04 +0100 Subject: [PATCH] Upgrade go-docappender to v2 (#13155) --- NOTICE.txt | 10 +++++----- changelogs/head.asciidoc | 7 +++++++ go.mod | 4 ++-- go.sum | 8 ++++---- internal/beater/beater.go | 2 +- internal/beater/beatertest/output.go | 2 +- internal/beater/processors.go | 2 +- x-pack/apm-server/sampling/pubsub/pubsub.go | 2 +- 8 files changed, 22 insertions(+), 15 deletions(-) diff --git a/NOTICE.txt b/NOTICE.txt index 02558051063..05858a82767 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1461,12 +1461,12 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/gmux@v0.3.2/LIC -------------------------------------------------------------------------------- -Dependency : github.com/elastic/go-docappender -Version: v1.1.0 +Dependency : github.com/elastic/go-docappender/v2 +Version: v2.1.1 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/elastic/go-docappender@v1.1.0/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/elastic/go-docappender/v2@v2.1.1/LICENSE: Apache License Version 2.0, January 2004 @@ -16276,11 +16276,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- Dependency : go.elastic.co/apm/module/apmzap/v2 -Version: v2.5.0 +Version: v2.6.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmzap/v2@v2.5.0/LICENSE: +Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmzap/v2@v2.6.0/LICENSE: Apache License Version 2.0, January 2004 diff --git a/changelogs/head.asciidoc b/changelogs/head.asciidoc index a3cf1bf266d..52b4689ed43 100644 --- a/changelogs/head.asciidoc +++ b/changelogs/head.asciidoc @@ -3,6 +3,11 @@ https://github.com/elastic/apm-server/compare/8.14\...main[View commits] +[float] +==== Bug fixes + +- Avoid data race due to reuse of `bytes.Buffer` in ES bulk requests {pull}13155[13155] + [float] ==== Breaking Changes @@ -14,3 +19,5 @@ https://github.com/elastic/apm-server/compare/8.14\...main[View commits] [float] ==== Added + +- Add `elasticsearch.flushed.uncompressed.bytes` metric {pull}13155[13155] diff --git a/go.mod b/go.mod index a9843df3276..098747a7dc1 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/elastic/elastic-agent-libs v0.9.8 github.com/elastic/elastic-agent-system-metrics v0.10.1 github.com/elastic/gmux v0.3.2 - github.com/elastic/go-docappender v1.1.0 + github.com/elastic/go-docappender/v2 v2.1.1 github.com/elastic/go-elasticsearch/v8 v8.13.1 github.com/elastic/go-sysinfo v1.14.0 github.com/elastic/go-ucfg v0.8.8 @@ -145,7 +145,7 @@ require ( github.com/xdg/stringprep v1.0.3 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.elastic.co/apm/module/apmzap/v2 v2.5.0 // indirect + go.elastic.co/apm/module/apmzap/v2 v2.6.0 // indirect go.elastic.co/ecszap v1.0.2 // indirect go.opentelemetry.io/collector/semconv v0.100.0 // indirect go.opentelemetry.io/otel/sdk v1.26.0 // indirect diff --git a/go.sum b/go.sum index 05f067e4cad..3c7d8ba8c0d 100644 --- a/go.sum +++ b/go.sum @@ -163,8 +163,8 @@ github.com/elastic/elastic-transport-go/v8 v8.5.0 h1:v5membAl7lvQgBTexPRDBO/Rdnl github.com/elastic/elastic-transport-go/v8 v8.5.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= github.com/elastic/gmux v0.3.2 h1:cb721R+fe/rt/jVNyBP5HDQsEwLD2wSKfPD2Sk6adDk= github.com/elastic/gmux v0.3.2/go.mod h1:OD6oYrno+SV3pyl1ArdWCjlExZ+FJOfoSaFqnFeldBQ= -github.com/elastic/go-docappender v1.1.0 h1:wuA3Im+Y0PuQQ/FzLZUb0+6eT64oLhGCqQV49OvR9EU= -github.com/elastic/go-docappender v1.1.0/go.mod h1:u0hkrzDr9w81uNFWUxeOyM0IX9aZUag/gHlOnHyCrzA= +github.com/elastic/go-docappender/v2 v2.1.1 h1:iK/l6kpz80p6sUSQCJJtxIOMHrJ8WTvM7rcenDHKCfg= +github.com/elastic/go-docappender/v2 v2.1.1/go.mod h1:oHi6MsHriWaG8W6T9iyJ/PkEo2+182HIzq+0RRAzzgA= github.com/elastic/go-elasticsearch/v8 v8.13.1 h1:du5F8IzUUyCkzxyHdrO9AtopcG95I/qwi2WK8Kf1xlg= github.com/elastic/go-elasticsearch/v8 v8.13.1/go.mod h1:DIn7HopJs4oZC/w0WoJR13uMUxtHeq92eI5bqv5CRfI= github.com/elastic/go-lumber v0.1.2-0.20220819171948-335fde24ea0f h1:TsPpU5EAwlt7YZoupKlxZ093qTZYdGou3EhfTF1U0B4= @@ -556,8 +556,8 @@ go.elastic.co/apm/module/apmhttp/v2 v2.6.0 h1:s8UeNFQmVBCNd4eoz7KDD9rEFhQC0HeUFX go.elastic.co/apm/module/apmhttp/v2 v2.6.0/go.mod h1:D0GLppLuI0Ddwvtl595GUxRgn6Z8L5KaDFVMv2H3GK0= go.elastic.co/apm/module/apmotel/v2 v2.6.0 h1:5z1/kH2FD/K8Yacl04plBy2YVW6cDPTCMNmM6zG4FJk= go.elastic.co/apm/module/apmotel/v2 v2.6.0/go.mod h1:jU0+sy3GUHvM70Pf99BXbxgSZyHBFMaBiMWxiNwaxng= -go.elastic.co/apm/module/apmzap/v2 v2.5.0 h1:COXqVte4i75XQmV+H4m4g+2JubK3Y1WRIzY/ppKa3bQ= -go.elastic.co/apm/module/apmzap/v2 v2.5.0/go.mod h1:PHKFbSROQPFZ2+X3oZyaF8lie5DhK0gtcRMpz//S54g= +go.elastic.co/apm/module/apmzap/v2 v2.6.0 h1:R/iVORzGu3F9uM43iEVHD0nwiRo59O0bIXdayKsgayQ= +go.elastic.co/apm/module/apmzap/v2 v2.6.0/go.mod h1:B3i/8xRkqLgi6zNuV+Bp7Pt4cutaOObvrVSa7wUTAPw= go.elastic.co/apm/v2 v2.6.0 h1:VieBMLQFtXua2YxpYxaSdYGnmmxhLT46gosI5yErJgY= go.elastic.co/apm/v2 v2.6.0/go.mod h1:33rOXgtHwbgZcDgi6I/GtCSMZQqgxkHC0IQT3gudKvo= go.elastic.co/ecszap v1.0.2 h1:iW5OGx8IiokiUzx/shD4AJCPFMC9uUtr7ycaiEIU++I= diff --git a/internal/beater/beater.go b/internal/beater/beater.go index 93a3d67abc0..2e88ae759f1 100644 --- a/internal/beater/beater.go +++ b/internal/beater/beater.go @@ -52,7 +52,7 @@ import ( agentconfig "github.com/elastic/elastic-agent-libs/config" "github.com/elastic/elastic-agent-libs/logp" "github.com/elastic/elastic-agent-libs/monitoring" - "github.com/elastic/go-docappender" + "github.com/elastic/go-docappender/v2" "github.com/elastic/go-ucfg" "github.com/elastic/apm-data/model/modelpb" diff --git a/internal/beater/beatertest/output.go b/internal/beater/beatertest/output.go index 728c9ad6814..6a5f3df125e 100644 --- a/internal/beater/beatertest/output.go +++ b/internal/beater/beatertest/output.go @@ -31,7 +31,7 @@ import ( "github.com/elastic/beats/v7/libbeat/publisher" agentconfig "github.com/elastic/elastic-agent-libs/config" - "github.com/elastic/go-docappender/docappendertest" + "github.com/elastic/go-docappender/v2/docappendertest" ) // ElasticsearchOutputConfig returns "output.elasticsearch" configuration diff --git a/internal/beater/processors.go b/internal/beater/processors.go index 02acc59b351..65e8b07daa0 100644 --- a/internal/beater/processors.go +++ b/internal/beater/processors.go @@ -32,7 +32,7 @@ import ( "github.com/elastic/apm-server/internal/beater/auth" "github.com/elastic/apm-server/internal/beater/ratelimit" "github.com/elastic/apm-server/internal/version" - "github.com/elastic/go-docappender" + "github.com/elastic/go-docappender/v2" ) const ( diff --git a/x-pack/apm-server/sampling/pubsub/pubsub.go b/x-pack/apm-server/sampling/pubsub/pubsub.go index a3cecc45d8a..a703e47441e 100644 --- a/x-pack/apm-server/sampling/pubsub/pubsub.go +++ b/x-pack/apm-server/sampling/pubsub/pubsub.go @@ -21,7 +21,7 @@ import ( "golang.org/x/sync/errgroup" "github.com/elastic/elastic-agent-libs/logp" - "github.com/elastic/go-docappender" + "github.com/elastic/go-docappender/v2" "github.com/elastic/go-elasticsearch/v8/esapi" "github.com/elastic/go-elasticsearch/v8/esutil"