From 8b7aa6d6b13b6d1f3507bdbb64d2c24a6d69327a Mon Sep 17 00:00:00 2001 From: Marc Lopez Rubio Date: Thu, 7 Dec 2023 17:43:49 +0800 Subject: [PATCH 1/5] Fix systemtest (#12182) Signed-off-by: Marc Lopez Rubio --- systemtest/approvals/TestIntake/Errors.approved.json | 6 ++++++ systemtest/approvals/TestIntake/Events.approved.json | 6 ++++++ .../approvals/TestIntake/Transactions.approved.json | 6 ++++++ .../TestIntake/TransactionsHugeTraces.approved.json | 6 ++++++ .../approvals/TestOTLPGRPCLogsClientIP.approved.json | 9 --------- 5 files changed, 24 insertions(+), 9 deletions(-) diff --git a/systemtest/approvals/TestIntake/Errors.approved.json b/systemtest/approvals/TestIntake/Errors.approved.json index 466be37c138..95efbeba3f6 100644 --- a/systemtest/approvals/TestIntake/Errors.approved.json +++ b/systemtest/approvals/TestIntake/Errors.approved.json @@ -27,6 +27,12 @@ "client.geo.location": [ "dynamic" ], + "client.geo.region_iso_code": [ + "dynamic" + ], + "client.geo.region_name": [ + "dynamic" + ], "client.ip": [ "12.53.12.1" ], diff --git a/systemtest/approvals/TestIntake/Events.approved.json b/systemtest/approvals/TestIntake/Events.approved.json index e03a5c1f8ea..01730dcfb7b 100644 --- a/systemtest/approvals/TestIntake/Events.approved.json +++ b/systemtest/approvals/TestIntake/Events.approved.json @@ -791,6 +791,12 @@ "client.geo.location": [ "dynamic" ], + "client.geo.region_iso_code": [ + "dynamic" + ], + "client.geo.region_name": [ + "dynamic" + ], "client.ip": [ "12.53.12.1" ], diff --git a/systemtest/approvals/TestIntake/Transactions.approved.json b/systemtest/approvals/TestIntake/Transactions.approved.json index a3df939ae5d..83281a6eb7b 100644 --- a/systemtest/approvals/TestIntake/Transactions.approved.json +++ b/systemtest/approvals/TestIntake/Transactions.approved.json @@ -445,6 +445,12 @@ "client.geo.location": [ "dynamic" ], + "client.geo.region_iso_code": [ + "dynamic" + ], + "client.geo.region_name": [ + "dynamic" + ], "client.ip": [ "12.53.12.1" ], diff --git a/systemtest/approvals/TestIntake/TransactionsHugeTraces.approved.json b/systemtest/approvals/TestIntake/TransactionsHugeTraces.approved.json index c3b48460971..6507c06df7b 100644 --- a/systemtest/approvals/TestIntake/TransactionsHugeTraces.approved.json +++ b/systemtest/approvals/TestIntake/TransactionsHugeTraces.approved.json @@ -24,6 +24,12 @@ "client.geo.location": [ "dynamic" ], + "client.geo.region_iso_code": [ + "dynamic" + ], + "client.geo.region_name": [ + "dynamic" + ], "client.ip": [ "12.53.12.1" ], diff --git a/systemtest/approvals/TestOTLPGRPCLogsClientIP.approved.json b/systemtest/approvals/TestOTLPGRPCLogsClientIP.approved.json index b8aab6b00e8..b89526debf6 100644 --- a/systemtest/approvals/TestOTLPGRPCLogsClientIP.approved.json +++ b/systemtest/approvals/TestOTLPGRPCLogsClientIP.approved.json @@ -9,9 +9,6 @@ "agent.version": [ "unknown" ], - "client.geo.city_name": [ - "Berlin" - ], "client.geo.continent_name": [ "Europe" ], @@ -24,12 +21,6 @@ "client.geo.location": [ "dynamic" ], - "client.geo.region_iso_code": [ - "DE-BE" - ], - "client.geo.region_name": [ - "Land Berlin" - ], "client.ip": [ "178.162.206.244" ], From 19c869099aac46063c0517dd0343b2c1f166e24e Mon Sep 17 00:00:00 2001 From: Marc Lopez Rubio Date: Thu, 7 Dec 2023 18:02:15 +0800 Subject: [PATCH 2/5] Update `go-docappender` dependency to latest (#12179) Includes a fix to remove the contents of a field that failed to index due to mapping issues. --------- Signed-off-by: Marc Lopez Rubio Co-authored-by: kruskall <99559985+kruskall@users.noreply.github.com> --- NOTICE.txt | 64 ++++++++++++++-------------- apm-server.docker.yml | 10 ++--- go.mod | 32 +++++++------- go.sum | 65 ++++++++++++++--------------- internal/beater/checkintegration.go | 2 +- 5 files changed, 84 insertions(+), 89 deletions(-) diff --git a/NOTICE.txt b/NOTICE.txt index 9564fce47d0..e2d20764e6b 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1462,11 +1462,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/gmux@v0.3.1/LIC -------------------------------------------------------------------------------- Dependency : github.com/elastic/go-docappender -Version: v0.2.1-0.20230829163624-c69a1cf8ce35 +Version: v0.2.1-0.20231207080152-44217001fa53 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/elastic/go-docappender@v0.2.1-0.20230829163624-c69a1cf8ce35/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/elastic/go-docappender@v0.2.1-0.20231207080152-44217001fa53/LICENSE: Apache License Version 2.0, January 2004 @@ -1673,11 +1673,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/go-docappender@ -------------------------------------------------------------------------------- Dependency : github.com/elastic/go-elasticsearch/v8 -Version: v8.10.0 +Version: v8.11.1 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/elastic/go-elasticsearch/v8@v8.10.0/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/elastic/go-elasticsearch/v8@v8.11.1/LICENSE: Apache License Version 2.0, January 2004 @@ -4227,11 +4227,11 @@ SOFTWARE. -------------------------------------------------------------------------------- Dependency : go.elastic.co/apm/module/apmelasticsearch/v2 -Version: v2.4.4 +Version: v2.4.7 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmelasticsearch/v2@v2.4.4/LICENSE: +Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmelasticsearch/v2@v2.4.7/LICENSE: Apache License Version 2.0, January 2004 @@ -4438,11 +4438,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmelasti -------------------------------------------------------------------------------- Dependency : go.elastic.co/apm/module/apmgorilla/v2 -Version: v2.4.4 +Version: v2.4.7 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmgorilla/v2@v2.4.4/LICENSE: +Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmgorilla/v2@v2.4.7/LICENSE: Apache License Version 2.0, January 2004 @@ -4649,11 +4649,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmgorill -------------------------------------------------------------------------------- Dependency : go.elastic.co/apm/module/apmgrpc/v2 -Version: v2.4.4 +Version: v2.4.7 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmgrpc/v2@v2.4.4/LICENSE: +Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmgrpc/v2@v2.4.7/LICENSE: Apache License Version 2.0, January 2004 @@ -4860,11 +4860,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmgrpc/v -------------------------------------------------------------------------------- Dependency : go.elastic.co/apm/module/apmhttp/v2 -Version: v2.4.4 +Version: v2.4.7 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmhttp/v2@v2.4.4/LICENSE: +Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmhttp/v2@v2.4.7/LICENSE: Apache License Version 2.0, January 2004 @@ -5071,11 +5071,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmhttp/v -------------------------------------------------------------------------------- Dependency : go.elastic.co/apm/module/apmotel/v2 -Version: v2.4.4 +Version: v2.4.7 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmotel/v2@v2.4.4/LICENSE: +Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmotel/v2@v2.4.7/LICENSE: Apache License Version 2.0, January 2004 @@ -5950,11 +5950,11 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/pdat -------------------------------------------------------------------------------- Dependency : go.opentelemetry.io/otel -Version: v1.19.0 +Version: v1.21.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel@v1.19.0/LICENSE: +Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel@v1.21.0/LICENSE: Apache License Version 2.0, January 2004 @@ -6161,11 +6161,11 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel@v1.19.0/L -------------------------------------------------------------------------------- Dependency : go.opentelemetry.io/otel/metric -Version: v1.19.0 +Version: v1.21.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/metric@v1.19.0/LICENSE: +Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/metric@v1.21.0/LICENSE: Apache License Version 2.0, January 2004 @@ -6372,11 +6372,11 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/metric@v1 -------------------------------------------------------------------------------- Dependency : go.opentelemetry.io/otel/sdk/metric -Version: v1.19.0 +Version: v1.21.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/sdk/metric@v1.19.0/LICENSE: +Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/sdk/metric@v1.21.0/LICENSE: Apache License Version 2.0, January 2004 @@ -6677,11 +6677,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- Dependency : golang.org/x/sync -Version: v0.4.0 +Version: v0.5.0 Licence type (autodetected): BSD-3-Clause -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/golang.org/x/sync@v0.4.0/LICENSE: +Contents of probable licence file $GOMODCACHE/golang.org/x/sync@v0.5.0/LICENSE: Copyright (c) 2009 The Go Authors. All rights reserved. @@ -10377,11 +10377,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- Dependency : github.com/go-logr/logr -Version: v1.2.4 +Version: v1.3.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/go-logr/logr@v1.2.4/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/go-logr/logr@v1.3.0/LICENSE: Apache License Version 2.0, January 2004 @@ -17218,11 +17218,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- Dependency : go.elastic.co/apm/module/apmzap/v2 -Version: v2.4.4 +Version: v2.4.7 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmzap/v2@v2.4.4/LICENSE: +Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmzap/v2@v2.4.7/LICENSE: Apache License Version 2.0, January 2004 @@ -17852,11 +17852,11 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/semc -------------------------------------------------------------------------------- Dependency : go.opentelemetry.io/otel/sdk -Version: v1.19.0 +Version: v1.21.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/sdk@v1.19.0/LICENSE: +Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/sdk@v1.21.0/LICENSE: Apache License Version 2.0, January 2004 @@ -18063,11 +18063,11 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/sdk@v1.19 -------------------------------------------------------------------------------- Dependency : go.opentelemetry.io/otel/trace -Version: v1.19.0 +Version: v1.21.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/trace@v1.19.0/LICENSE: +Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/trace@v1.21.0/LICENSE: Apache License Version 2.0, January 2004 @@ -18406,11 +18406,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- Dependency : golang.org/x/sys -Version: v0.13.0 +Version: v0.14.0 Licence type (autodetected): BSD-3-Clause -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/golang.org/x/sys@v0.13.0/LICENSE: +Contents of probable licence file $GOMODCACHE/golang.org/x/sys@v0.14.0/LICENSE: Copyright (c) 2009 The Go Authors. All rights reserved. diff --git a/apm-server.docker.yml b/apm-server.docker.yml index 60ddf447b88..f5fba96ea9d 100644 --- a/apm-server.docker.yml +++ b/apm-server.docker.yml @@ -170,14 +170,10 @@ apm-server: # Note that values configured without a time unit will be interpreted as seconds. #cache.expiration: 5m - # Source maps may be fetched from Elasticsearch by using the output.elasticsearch configuration, - # and running apm-server standalone. + # Source map retrieval location. # - # Note: fetching source maps from Elasticsearch is not supported if apm-server is being managed by - # Fleet. This configuration is only applicable to standalone apm-servers, for backwards compatibility - # with source maps stored in Elasticsearch by older versions of apm-server. New source maps must now - # be uploaded via Kibana, and `apm-server.kibana` configured in standalone apm-servers for fetching - # them. + # If using an output other than Elasticsearch that is writing to Elasticsearch, you must + # set this option. If not set, the standard output elasticsearch configuration is used. #elasticsearch: # Array of hosts to connect to. # Scheme and port can be left out and will be set to the default (`http` and `9200`). diff --git a/go.mod b/go.mod index 0253137bf6d..10146be6e82 100644 --- a/go.mod +++ b/go.mod @@ -15,8 +15,8 @@ require ( github.com/elastic/elastic-agent-libs v0.7.2 github.com/elastic/elastic-agent-system-metrics v0.9.0 github.com/elastic/gmux v0.3.1 - github.com/elastic/go-docappender v0.2.1-0.20230829163624-c69a1cf8ce35 - github.com/elastic/go-elasticsearch/v8 v8.10.0 + github.com/elastic/go-docappender v0.2.1-0.20231207080152-44217001fa53 + github.com/elastic/go-elasticsearch/v8 v8.11.1 github.com/elastic/go-sysinfo v1.11.1 github.com/elastic/go-ucfg v0.8.6 github.com/go-sourcemap/sourcemap v2.1.3+incompatible @@ -37,22 +37,22 @@ require ( github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 - go.elastic.co/apm/module/apmelasticsearch/v2 v2.4.4 - go.elastic.co/apm/module/apmgorilla/v2 v2.4.4 - go.elastic.co/apm/module/apmgrpc/v2 v2.4.4 - go.elastic.co/apm/module/apmhttp/v2 v2.4.4 - go.elastic.co/apm/module/apmotel/v2 v2.4.4 + go.elastic.co/apm/module/apmelasticsearch/v2 v2.4.7 + go.elastic.co/apm/module/apmgorilla/v2 v2.4.7 + go.elastic.co/apm/module/apmgrpc/v2 v2.4.7 + go.elastic.co/apm/module/apmhttp/v2 v2.4.7 + go.elastic.co/apm/module/apmotel/v2 v2.4.7 go.elastic.co/apm/v2 v2.4.7 go.elastic.co/fastjson v1.3.0 go.opentelemetry.io/collector/consumer v0.87.0 go.opentelemetry.io/collector/pdata v1.0.0-rcv0016 - go.opentelemetry.io/otel v1.19.0 - go.opentelemetry.io/otel/metric v1.19.0 - go.opentelemetry.io/otel/sdk/metric v1.19.0 + go.opentelemetry.io/otel v1.21.0 + go.opentelemetry.io/otel/metric v1.21.0 + go.opentelemetry.io/otel/sdk/metric v1.21.0 go.uber.org/automaxprocs v1.5.2 go.uber.org/zap v1.26.0 golang.org/x/net v0.17.0 - golang.org/x/sync v0.4.0 + golang.org/x/sync v0.5.0 golang.org/x/term v0.13.0 golang.org/x/time v0.3.0 google.golang.org/grpc v1.58.3 @@ -96,7 +96,7 @@ require ( github.com/elastic/gosigar v0.14.2 // indirect github.com/fatih/color v1.14.1 // indirect github.com/frankban/quicktest v1.14.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.3.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/gogo/googleapis v1.4.1 // indirect @@ -150,17 +150,17 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.elastic.co/apm/module/apmzap/v2 v2.4.4 // indirect + go.elastic.co/apm/module/apmzap/v2 v2.4.7 // indirect go.elastic.co/ecszap v1.0.2 // indirect go.opentelemetry.io/collector/semconv v0.87.0 // indirect - go.opentelemetry.io/otel/sdk v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.opentelemetry.io/otel/sdk v1.21.0 // indirect + go.opentelemetry.io/otel/trace v1.21.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.14.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.13.0 // indirect - golang.org/x/sys v0.13.0 // indirect + golang.org/x/sys v0.14.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/tools v0.14.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect diff --git a/go.sum b/go.sum index 7025ac9d1c5..a60e7a158f9 100644 --- a/go.sum +++ b/go.sum @@ -146,15 +146,14 @@ github.com/elastic/elastic-agent-shipper-client v0.5.1-0.20230228231646-f04347b6 github.com/elastic/elastic-agent-shipper-client v0.5.1-0.20230228231646-f04347b666f3/go.mod h1:rWarFM7qYxJKsi9WcV6ONcFjH/NA3niDNpTxO+8/GVI= github.com/elastic/elastic-agent-system-metrics v0.9.0 h1:sA3pSk+awH4g45M8tjcwd9U6uVQvNzUpKS8ajS3DuUk= github.com/elastic/elastic-agent-system-metrics v0.9.0/go.mod h1:9C1UEfj0P687HAzZepHszN6zXA+2tN2Lx3Osvq1zby8= -github.com/elastic/elastic-transport-go/v8 v8.0.0-20230329154755-1a3c63de0db6/go.mod h1:87Tcz8IVNe6rVSLdBux1o/PEItLtyabHU3naC7IoqKI= github.com/elastic/elastic-transport-go/v8 v8.3.0 h1:DJGxovyQLXGr62e9nDMPSxRyWION0Bh6d9eCFBriiHo= github.com/elastic/elastic-transport-go/v8 v8.3.0/go.mod h1:87Tcz8IVNe6rVSLdBux1o/PEItLtyabHU3naC7IoqKI= github.com/elastic/gmux v0.3.1 h1:ghT+5Y9jW5udQTBrhDeMOtQVdRBwk9Y2h1o+4Rb7mhE= github.com/elastic/gmux v0.3.1/go.mod h1:IBFLojLnACU9tsUnoSavOaMdhq63/HOH/Aeiiha36jA= -github.com/elastic/go-docappender v0.2.1-0.20230829163624-c69a1cf8ce35 h1:zBB2RqyEcPlJ16psSXIV6qhhbFB+Bf9RZrgcCk2vCiY= -github.com/elastic/go-docappender v0.2.1-0.20230829163624-c69a1cf8ce35/go.mod h1:QddPogzCYGtzbR8ZFGRG2kvQ+vRG4A4JGMoH82G1dT8= -github.com/elastic/go-elasticsearch/v8 v8.10.0 h1:ALg3DMxSrx07YmeMNcfPf7cFh1Ep2+Qa19EOXTbwr2k= -github.com/elastic/go-elasticsearch/v8 v8.10.0/go.mod h1:NGmpvohKiRHXI0Sw4fuUGn6hYOmAXlyCphKpzVBiqDE= +github.com/elastic/go-docappender v0.2.1-0.20231207080152-44217001fa53 h1:3jOfdobdHlfwC4yeTpljD6Ul+IWmhHHGHoUtn/Cb/UY= +github.com/elastic/go-docappender v0.2.1-0.20231207080152-44217001fa53/go.mod h1:v+pGb4IkluqgnVN4Qu3o9a2WC1jve91NCu19oKNK/tM= +github.com/elastic/go-elasticsearch/v8 v8.11.1 h1:1VgTgUTbpqQZ4uE+cPjkOvy/8aw1ZvKcU0ZUE5Cn1mc= +github.com/elastic/go-elasticsearch/v8 v8.11.1/go.mod h1:GU1BJHO7WeamP7UhuElYwzzHtvf9SDmeVpSSy9+o6Qg= github.com/elastic/go-lumber v0.1.2-0.20220819171948-335fde24ea0f h1:TsPpU5EAwlt7YZoupKlxZ093qTZYdGou3EhfTF1U0B4= github.com/elastic/go-lumber v0.1.2-0.20220819171948-335fde24ea0f/go.mod h1:HHaWnZamYKWsR9/eZNHqRHob8iQDKnchHmmskT/SKko= github.com/elastic/go-structform v0.0.10 h1:oy08o/Ih2hHTkNcRY/1HhaYvIp5z6t8si8gnCJPDo1w= @@ -194,8 +193,8 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= @@ -530,18 +529,18 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.elastic.co/apm/module/apmelasticsearch/v2 v2.4.4 h1:TVcEjy/gs/DVk3aaBYNGm6B7uOkC6BTlDFRzyvBkMlw= -go.elastic.co/apm/module/apmelasticsearch/v2 v2.4.4/go.mod h1:xWKnT5lKqFwNgT3nkWumBCXCt597cHkSuyIWWMXpv78= -go.elastic.co/apm/module/apmgorilla/v2 v2.4.4 h1:J/J5po3bdCJD6NhnJ+qjC6tvnVT3L/x2iun4RXSQjbc= -go.elastic.co/apm/module/apmgorilla/v2 v2.4.4/go.mod h1:TFgGtb72KWjXDBuTkX+SWwSZipqHJYTQ5qIVlKvZkyg= -go.elastic.co/apm/module/apmgrpc/v2 v2.4.4 h1:l4eMUb9H9Rj6CvQIbrVCDLnI0dkwEwTo6qeirBaBKus= -go.elastic.co/apm/module/apmgrpc/v2 v2.4.4/go.mod h1:SSYfue+dyE7QKnXsvYhNu49U6vH+iG+R3cOYlkX9/og= -go.elastic.co/apm/module/apmhttp/v2 v2.4.4 h1:BcJDLFztZByHiJRXXvAHY7bue9+vhzMLn2OBK5N8HDw= -go.elastic.co/apm/module/apmhttp/v2 v2.4.4/go.mod h1:694qsHWRPVkfYqQ224ZSeRx9Dt2FS/xF1igNBGkHi6o= -go.elastic.co/apm/module/apmotel/v2 v2.4.4 h1:DTIGTLiAZTjshCco2ljLnf35Q9m1MiWXBctCGKeQhzE= -go.elastic.co/apm/module/apmotel/v2 v2.4.4/go.mod h1:F14e5+BF+fmKs7jUH5i6C0tjzRUVrK4AbaNGw0z3mWk= -go.elastic.co/apm/module/apmzap/v2 v2.4.4 h1:t1Ml4R5KapIoCJzem3d/bEaG0X7Gij0QijFPuf8wba8= -go.elastic.co/apm/module/apmzap/v2 v2.4.4/go.mod h1:iYOVJKZEIWYr+VdD3IO0zjhC8j6my+v5vZNePNSgmIY= +go.elastic.co/apm/module/apmelasticsearch/v2 v2.4.7 h1:Gfp+wxPotE1s5X5ufn3W28zYaSunKEWE/x9Xo+5WzoI= +go.elastic.co/apm/module/apmelasticsearch/v2 v2.4.7/go.mod h1:taxw6rHuZtTF0p0DAv1xAg0fkvGprVIJu92JvbcgifU= +go.elastic.co/apm/module/apmgorilla/v2 v2.4.7 h1:KKVofZksT6fQ6SRd78t5B2Q0s7NXcQ2na99yFZ++QLw= +go.elastic.co/apm/module/apmgorilla/v2 v2.4.7/go.mod h1:1f5MubV9IprFxjZ4Q+j/nUtomBNncE0pO43/fBkPcGo= +go.elastic.co/apm/module/apmgrpc/v2 v2.4.7 h1:DfRlVWcp8gMMwhuZ6mb3ronGG/zr7xERLr4q3SaDqSQ= +go.elastic.co/apm/module/apmgrpc/v2 v2.4.7/go.mod h1:619rUMohJOS56ugiQ3gzQN00m2+AdSW05Y5zwc+fXoA= +go.elastic.co/apm/module/apmhttp/v2 v2.4.7 h1:IL+DRK8ODO791ai/l1g/8dk6E3VPomiV0jbRIxBWbqM= +go.elastic.co/apm/module/apmhttp/v2 v2.4.7/go.mod h1:Itj4PGNVO33Tpp/9UPf4A6pCezTmADRRi/ytLAGms24= +go.elastic.co/apm/module/apmotel/v2 v2.4.7 h1:Mg2AePM29uTutZzs+zySGUnzVuidadWX4icW/iPZQWs= +go.elastic.co/apm/module/apmotel/v2 v2.4.7/go.mod h1:nKceke8YXubeEZMIKkKKAc8xomkTopKD/p2jHL+xnAM= +go.elastic.co/apm/module/apmzap/v2 v2.4.7 h1:j96pvon+IhbFpzV4IflXwxOKD+l5rApyyN2ycarJG6Y= +go.elastic.co/apm/module/apmzap/v2 v2.4.7/go.mod h1:bi0A6hYYwModJI70LJDB8IHqw7291Ub16LRdEXNcOcU= go.elastic.co/apm/v2 v2.4.7 h1:m5B2m59KgbiupuzFUkKqEvwHABIZxl2Ob0tCgc0XG9w= go.elastic.co/apm/v2 v2.4.7/go.mod h1:+CiBUdrrAGnGCL9TNx7tQz3BrfYV23L8Ljvotoc87so= go.elastic.co/ecszap v1.0.2 h1:iW5OGx8IiokiUzx/shD4AJCPFMC9uUtr7ycaiEIU++I= @@ -554,16 +553,16 @@ go.opentelemetry.io/collector/pdata v1.0.0-rcv0016 h1:qCPXSQCoD3qeWFb1RuIks8fw9A go.opentelemetry.io/collector/pdata v1.0.0-rcv0016/go.mod h1:OdN0alYOlYhHXu6BDlGehrZWgtBuiDsz/rlNeJeXiNg= go.opentelemetry.io/collector/semconv v0.87.0 h1:BsG1jdLLRCBRlvUujk4QA86af7r/ZXnizczQpEs/gg8= go.opentelemetry.io/collector/semconv v0.87.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= -go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= -go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= -go.opentelemetry.io/otel/sdk/metric v1.19.0 h1:EJoTO5qysMsYCa+w4UghwFV/ptQgqSL/8Ni+hx+8i1k= -go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhsJzCzV5210euduKcKY= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= +go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= +go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= +go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= +go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= +go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= +go.opentelemetry.io/otel/sdk/metric v1.21.0 h1:smhI5oD714d6jHE6Tie36fPx4WDFIg+Y6RfAY4ICcR0= +go.opentelemetry.io/otel/sdk/metric v1.21.0/go.mod h1:FJ8RAsoPGv/wYMgBdUJXOm+6pzFY3YdljnXtv1SBE8Q= +go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= +go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= @@ -634,8 +633,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -664,8 +663,8 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= diff --git a/internal/beater/checkintegration.go b/internal/beater/checkintegration.go index a86edb4b120..1db8bf3e84c 100644 --- a/internal/beater/checkintegration.go +++ b/internal/beater/checkintegration.go @@ -112,7 +112,7 @@ func checkIntegrationInstalled(ctx context.Context, kibanaClient *kibana.Client, // returning an error if it could not be created. This will fail if there is no // index template matching the pattern. func checkCreateDataStream(ctx context.Context, esClient *elasticsearch.Client, namespace string) (bool, error) { - if _, err := createdatastream.New(esClient).Name("traces-apm-" + namespace).Do(ctx); err != nil { + if _, err := createdatastream.NewCreateDataStreamFunc(esClient)("traces-apm-" + namespace).Do(ctx); err != nil { var esError *types.ElasticsearchError if errors.As(err, &esError) { cause := esError.ErrorCause From 4e5dcf23640010e6ed62c329993ac3d3919b3c09 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Thu, 7 Dec 2023 22:26:45 +1100 Subject: [PATCH 3/5] backport: Add 8.12 branch (#12171) * docs: update docs * [Release] update version * Fix broken version --------- Co-authored-by: simitt Co-authored-by: Marc Lopez Rubio --- .mergify.yml | 14 ++++++++++++++ apmpackage/apm/changelog.yml | 5 +++++ cmd/intake-receiver/version.go | 2 +- internal/version/version.go | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index 1f3ae86e04f..173043031e2 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -304,3 +304,17 @@ pull_request_rules: labels: - "backport" title: "[{{ destination_branch }}] {{ title }} (backport #{{ number }})" + - name: backport patches to 8.12 branch + conditions: + - merged + - base=main + - label=backport-8.12 + actions: + backport: + assignees: + - "{{ author }}" + branches: + - "8.12" + labels: + - "backport" + title: "[{{ destination_branch }}] {{ title }} (backport #{{ number }})" diff --git a/apmpackage/apm/changelog.yml b/apmpackage/apm/changelog.yml index 841afb1123d..cc4b88d81a4 100644 --- a/apmpackage/apm/changelog.yml +++ b/apmpackage/apm/changelog.yml @@ -1,4 +1,9 @@ - version: generated + changes: + - description: Placeholder + type: enhancement + link: https://github.com/elastic/apm-server/pull/123 +- version: 8.12.0 changes: - description: Add missing mappings for various fields type: enhancement diff --git a/cmd/intake-receiver/version.go b/cmd/intake-receiver/version.go index dbe4d25625d..bddb4af2de5 100644 --- a/cmd/intake-receiver/version.go +++ b/cmd/intake-receiver/version.go @@ -18,4 +18,4 @@ package main // version matches the APM Server's version -const version = "8.12.0" +const version = "8.13.0" diff --git a/internal/version/version.go b/internal/version/version.go index 1e734dbbe66..e9b837e114b 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -18,4 +18,4 @@ package version // Version holds the APM Server version. -const Version = "8.12.0" +const Version = "8.13.0" From a561db301f1decec556a964e1cdc048f2fbcd94c Mon Sep 17 00:00:00 2001 From: Marc Lopez Rubio Date: Thu, 7 Dec 2023 19:59:22 +0800 Subject: [PATCH 4/5] tilt: Enable Stack Monitoring by default (#12177) Signed-off-by: Marc Lopez Rubio Co-authored-by: kruskall <99559985+kruskall@users.noreply.github.com> --- testing/infra/k8s/base/stack/apm-server.yaml | 7 +++++++ testing/infra/k8s/base/stack/elasticsearch.yaml | 9 +++++++++ testing/infra/k8s/base/stack/kibana.yaml | 9 +++++++++ 3 files changed, 25 insertions(+) diff --git a/testing/infra/k8s/base/stack/apm-server.yaml b/testing/infra/k8s/base/stack/apm-server.yaml index a4d5c3b1074..7815c07e525 100644 --- a/testing/infra/k8s/base/stack/apm-server.yaml +++ b/testing/infra/k8s/base/stack/apm-server.yaml @@ -17,6 +17,13 @@ spec: enabled: true logging: level: debug + monitoring: + enabled: true + elasticsearch: + username: admin + password: changeme + hosts: [http://elasticsearch-es-http.default.svc:9200] + protocol: "http" output: elasticsearch: username: admin diff --git a/testing/infra/k8s/base/stack/elasticsearch.yaml b/testing/infra/k8s/base/stack/elasticsearch.yaml index 09441f11a97..88ae897326f 100644 --- a/testing/infra/k8s/base/stack/elasticsearch.yaml +++ b/testing/infra/k8s/base/stack/elasticsearch.yaml @@ -7,6 +7,15 @@ spec: auth: fileRealm: - secretName: elasticsearch-admin + monitoring: + metrics: + elasticsearchRefs: + - name: elasticsearch + namespace: default + logs: + elasticsearchRefs: + - name: elasticsearch + namespace: default nodeSets: - name: default count: 1 diff --git a/testing/infra/k8s/base/stack/kibana.yaml b/testing/infra/k8s/base/stack/kibana.yaml index 4e5a4a4a0a2..233a7cd492a 100644 --- a/testing/infra/k8s/base/stack/kibana.yaml +++ b/testing/infra/k8s/base/stack/kibana.yaml @@ -12,6 +12,15 @@ spec: tls: selfSignedCertificate: disabled: true + monitoring: + metrics: + elasticsearchRefs: + - name: elasticsearch + namespace: default + logs: + elasticsearchRefs: + - name: elasticsearch + namespace: default podTemplate: spec: containers: From a56c6054df6743aeb49b136c98564322eeee70ca Mon Sep 17 00:00:00 2001 From: Marc Lopez Rubio Date: Thu, 7 Dec 2023 20:36:19 +0800 Subject: [PATCH 5/5] Beat: Allow setting beat name in configuration (#12176) Uses the beat name if set in the configuration file. Restores what used to work on 7.x and perhaps prior to #9149 being introduced. This undoes an unwanted breaking change that caused beat.name to be ignored. Signed-off-by: Marc Lopez Rubio Co-authored-by: kruskall <99559985+kruskall@users.noreply.github.com> --- changelogs/head.asciidoc | 1 + internal/beatcmd/beat.go | 6 +++++- internal/beatcmd/beat_test.go | 4 +++- internal/beatcmd/config.go | 4 ++++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/changelogs/head.asciidoc b/changelogs/head.asciidoc index 637fc1f5df9..37ff7d0ef18 100644 --- a/changelogs/head.asciidoc +++ b/changelogs/head.asciidoc @@ -7,6 +7,7 @@ https://github.com/elastic/apm-server/compare/8.11\...main[View commits] ==== Breaking Changes - The unsupported apm_data_stream_migration ingest pipeline has been removed {pull}12102[12102]. - "publish_ready" is always false in the "GET /" response until events are received by apm-server {pull}12150[12150] +- Reverts a breaking change that ignored the beat name. This is visible in Stack Monitoring {pull}12176[12176] [float] ==== Bug fixes diff --git a/internal/beatcmd/beat.go b/internal/beatcmd/beat.go index a14dc566018..865adfb9521 100644 --- a/internal/beatcmd/beat.go +++ b/internal/beatcmd/beat.go @@ -102,6 +102,10 @@ func NewBeat(args BeatParams) (*Beat, error) { return nil, err } + beatName := cfg.Name + if beatName == "" { + beatName = hostname + } b := &Beat{ Beat: beat.Beat{ Info: beat.Info{ @@ -109,7 +113,7 @@ func NewBeat(args BeatParams) (*Beat, error) { ElasticLicensed: args.ElasticLicensed, IndexPrefix: "apm-server", Version: version.Version, - Name: hostname, + Name: beatName, Hostname: hostname, StartTime: time.Now(), EphemeralID: metricreport.EphemeralID(), diff --git a/internal/beatcmd/beat_test.go b/internal/beatcmd/beat_test.go index e676b645464..9285a018ae5 100644 --- a/internal/beatcmd/beat_test.go +++ b/internal/beatcmd/beat_test.go @@ -75,7 +75,7 @@ func TestRunMaxProcs(t *testing.T) { func TestRunnerParams(t *testing.T) { calls := make(chan RunnerParams, 1) - b := newBeat(t, "output.console.enabled: true", func(args RunnerParams) (Runner, error) { + b := newBeat(t, "output.console.enabled: true\nname: my-custom-name", func(args RunnerParams) (Runner, error) { calls <- args return newNopRunner(args), nil }) @@ -86,6 +86,7 @@ func TestRunnerParams(t *testing.T) { assert.Equal(t, "apm-server", args.Info.Beat) assert.Equal(t, version.Version, args.Info.Version) assert.True(t, args.Info.ElasticLicensed) + assert.Equal(t, "my-custom-name", b.Beat.Info.Name) assert.NotZero(t, args.Info.ID) assert.NotZero(t, args.Info.EphemeralID) assert.NotZero(t, args.Info.FirstStart) @@ -100,6 +101,7 @@ func TestRunnerParams(t *testing.T) { err := args.Config.Unpack(&m) require.NoError(t, err) assert.Equal(t, map[string]interface{}{ + "name": "my-custom-name", "output": map[string]interface{}{ "console": map[string]interface{}{ "enabled": true, diff --git a/internal/beatcmd/config.go b/internal/beatcmd/config.go index 48f76db5f9d..8b84263e6ca 100644 --- a/internal/beatcmd/config.go +++ b/internal/beatcmd/config.go @@ -35,6 +35,10 @@ type Config struct { // APMServer holds apm-server.* configuration. APMServer *config.C `config:"apm-server"` + // Allow overwriting beat.Info.Name. This is mainly for stack monitoring + // and reporting purposes. + Name string `config:"name"` + MaxProcs int `config:"max_procs"` GCPercent int `config:"gc_percent"`