From d2c362d8eaa57174500f5627606ac1237f47e340 Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Thu, 19 Oct 2023 18:57:07 +0200 Subject: [PATCH 1/4] feat: drop support for 32bit arch (#11871) * feat: drop support for 32bit arch * fix: remove additional i686 target Co-authored-by: Andrew Wilkins --------- Co-authored-by: Andrew Wilkins --- Makefile | 4 ---- internal/beatcmd/beat.go | 6 ------ packaging.mk | 17 +++-------------- x-pack/apm-server/aggregation.go | 2 -- 4 files changed, 3 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index ef501a19afd..a71f48b4045 100644 --- a/Makefile +++ b/Makefile @@ -37,9 +37,7 @@ CURRENT_DIR=$(shell dirname $(shell readlink -f $(firstword $(MAKEFILE_LIST)))) APM_SERVER_BINARIES:= \ build/apm-server-linux-amd64 \ - build/apm-server-linux-386 \ build/apm-server-linux-arm64 \ - build/apm-server-windows-386.exe \ build/apm-server-windows-amd64.exe \ build/apm-server-darwin-amd64 \ build/apm-server-darwin-arm64 @@ -64,7 +62,6 @@ $(APM_SERVER_BINARIES): build/apm-server-linux-%: GOOS=linux build/apm-server-darwin-%: GOOS=darwin build/apm-server-windows-%: GOOS=windows -build/apm-server-%-386 build/apm-server-%-386.exe: GOARCH=386 build/apm-server-%-amd64 build/apm-server-%-amd64.exe: GOARCH=amd64 build/apm-server-%-amd64 build/apm-server-%-amd64.exe: GOFLAGS+=-buildmode=pie build/apm-server-%-arm64 build/apm-server-%-arm64.exe: GOARCH=arm64 @@ -75,7 +72,6 @@ GOVERSIONINFO_FLAGS := \ -product-version "$(APM_SERVER_VERSION)" \ -comment "commit=$(GITCOMMIT)" -build/apm-server-windows-386.exe: x-pack/apm-server/versioninfo_windows_386.syso build/apm-server-windows-amd64.exe: x-pack/apm-server/versioninfo_windows_amd64.syso x-pack/apm-server/versioninfo_windows_amd64.syso: GOVERSIONINFO_FLAGS+=-64 x-pack/apm-server/versioninfo_%.syso: $(GOVERSIONINFO) $(GITREFFILE) packaging/versioninfo.json diff --git a/internal/beatcmd/beat.go b/internal/beatcmd/beat.go index 2ce87c017ec..a14dc566018 100644 --- a/internal/beatcmd/beat.go +++ b/internal/beatcmd/beat.go @@ -260,12 +260,6 @@ func (b *Beat) Run(ctx context.Context) error { defer logp.Info("%s stopped.", b.Info.Beat) logger := logp.NewLogger("") - if runtime.GOARCH == "386" { - logger.Warn("" + - "deprecation notice: support for 32-bit system target " + - "architecture will be removed in an upcoming version", - ) - } if runtime.GOOS == "darwin" { if host, err := sysinfo.Host(); err != nil { diff --git a/packaging.mk b/packaging.mk index 7d9c058088e..dffe5b7ecb5 100644 --- a/packaging.mk +++ b/packaging.mk @@ -106,25 +106,21 @@ WINDOWS_PACKAGE_FILES := \ # so we need to create arch-specific nfpm configuration files. build/nfpm-amd64.yml: PACKAGE_GOARCH=amd64 build/nfpm-arm64.yml: PACKAGE_GOARCH=arm64 -build/nfpm-386.yml: PACKAGE_GOARCH=386 build/nfpm-%.yml: packaging/nfpm.yml sed 's/$${GOARCH}/$(PACKAGE_GOARCH)/' $< | sed 's/$${APM_SERVER_VERSION}/${APM_SERVER_VERSION}/' > $@ -DEB_ARCH := i386 amd64 arm64 +DEB_ARCH := amd64 arm64 DEBS := $(patsubst %, $(DISTDIR)/apm-server-$(APM_SERVER_VERSION)-%.deb, $(DEB_ARCH)) DEBS += $(patsubst %, $(DISTDIR)/apm-server-$(APM_SERVER_VERSION)-SNAPSHOT-%.deb, $(DEB_ARCH)) -DEBS_386 := $(filter %-i386.deb, $(DEBS)) DEBS_AMD64 := $(filter %-amd64.deb, $(DEBS)) DEBS_ARM64 := $(filter %-arm64.deb, $(DEBS)) -RPM_ARCH := i686 x86_64 aarch64 +RPM_ARCH := x86_64 aarch64 RPMS := $(patsubst %, $(DISTDIR)/apm-server-$(APM_SERVER_VERSION)-%.rpm, $(RPM_ARCH)) RPMS += $(patsubst %, $(DISTDIR)/apm-server-$(APM_SERVER_VERSION)-SNAPSHOT-%.rpm, $(RPM_ARCH)) -RPMS_386 := $(filter %-i686.rpm, $(RPMS)) RPMS_AMD64 := $(filter %-x86_64.rpm, $(RPMS)) RPMS_ARM64 := $(filter %-aarch64.rpm, $(RPMS)) -$(DEBS_386) $(RPMS_386): $(NFPM) $(COMMON_PACKAGE_FILES) build/apm-server-linux-386 build/nfpm-386.yml $(DEBS_ARM64) $(RPMS_ARM64): $(NFPM) $(COMMON_PACKAGE_FILES) build/apm-server-linux-arm64 build/nfpm-arm64.yml $(DEBS_AMD64) $(RPMS_AMD64): $(NFPM) $(COMMON_PACKAGE_FILES) build/apm-server-linux-amd64 build/nfpm-amd64.yml @@ -136,19 +132,16 @@ $(DEBS_AMD64) $(RPMS_AMD64): $(NFPM) $(COMMON_PACKAGE_FILES) build/apm-server-li # # ARCHIVES_DIR holds intermediate directories created for building tgz and zip. ARCHIVES_DIR := build/archives -ARCHIVE_PLATFORMS := darwin-x86_64 linux-x86_64 linux-x86 linux-arm64 windows-x86_64 +ARCHIVE_PLATFORMS := darwin-x86_64 linux-x86_64 linux-arm64 windows-x86_64 ARCHIVE_PREFIX := $(ARCHIVES_DIR)/apm-server-$(APM_SERVER_VERSION) ARCHIVES := $(addprefix $(ARCHIVE_PREFIX)-, $(ARCHIVE_PLATFORMS)) ARCHIVES += $(addprefix $(ARCHIVE_PREFIX)-SNAPSHOT-, $(ARCHIVE_PLATFORMS)) $(ARCHIVE_PREFIX)-darwin-x86_64 $(ARCHIVE_PREFIX)-SNAPSHOT-darwin-x86_64: build/apm-server-darwin-amd64 $(COMMON_PACKAGE_FILES) $(ARCHIVE_PREFIX)-linux-x86_64 $(ARCHIVE_PREFIX)-SNAPSHOT-linux-x86_64: build/apm-server-linux-amd64 $(COMMON_PACKAGE_FILES) -$(ARCHIVE_PREFIX)-linux-x86 $(ARCHIVE_PREFIX)-SNAPSHOT-linux-x86: build/apm-server-linux-386 $(COMMON_PACKAGE_FILES) $(ARCHIVE_PREFIX)-linux-arm64 $(ARCHIVE_PREFIX)-SNAPSHOT-linux-arm64: build/apm-server-linux-arm64 $(COMMON_PACKAGE_FILES) $(ARCHIVE_PREFIX)-windows-x86_64 $(ARCHIVE_PREFIX)-SNAPSHOT-windows-x86_64: \ build/apm-server-windows-amd64.exe $(COMMON_PACKAGE_FILES) $(WINDOWS_PACKAGE_FILES) -$(ARCHIVE_PREFIX)-windows-x86 $(ARCHIVE_PREFIX)-SNAPSHOT-windows-x86: \ - build/apm-server-windows-386.exe $(COMMON_PACKAGE_FILES) $(WINDOWS_PACKAGE_FILES) $(ARCHIVE_PREFIX)-%: @rm -fr $@ && mkdir -p $@ @@ -182,15 +175,11 @@ $(DISTDIR)/%-docker-build-context.tar.gz: $(ARCHIVES_DIR)/%-docker-build-context PACKAGE_SUFFIXES := \ darwin-x86_64.tar.gz \ linux-x86_64.tar.gz \ - linux-x86.tar.gz \ linux-arm64.tar.gz \ windows-x86_64.zip \ - windows-x86.zip \ amd64.deb \ - i386.deb \ arm64.deb \ x86_64.rpm \ - i686.rpm \ aarch64.rpm build/dependencies-$(APM_SERVER_VERSION)-SNAPSHOT.csv: build/dependencies-$(APM_SERVER_VERSION).csv diff --git a/x-pack/apm-server/aggregation.go b/x-pack/apm-server/aggregation.go index 71c70e96359..856d4d7449b 100644 --- a/x-pack/apm-server/aggregation.go +++ b/x-pack/apm-server/aggregation.go @@ -2,8 +2,6 @@ // or more contributor license agreements. Licensed under the Elastic License 2.0; // you may not use this file except in compliance with the Elastic License 2.0. -//go:build !386 - package main import ( From 791f582cba26bcf82cb8b6efbc15747049c77a22 Mon Sep 17 00:00:00 2001 From: Carson Ip Date: Fri, 20 Oct 2023 13:41:33 +0800 Subject: [PATCH 2/4] Fix service destination max group scaling based on memory (#11905) * Fix service destination max group scaling based on memory Fix regression introduced in #11739 - Fix bug where code is never executed - Fix wrong log message - Fix failing test --- internal/beater/beater.go | 2 +- internal/beater/config/aggregation.go | 12 ++---------- internal/beater/config/config_test.go | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/internal/beater/beater.go b/internal/beater/beater.go index 2bbd53a1ae2..f6c7f5e4d53 100644 --- a/internal/beater/beater.go +++ b/internal/beater/beater.go @@ -253,7 +253,7 @@ func (s *Runner) Run(ctx context.Context) error { if s.config.Aggregation.ServiceDestinations.MaxGroups <= 0 { s.config.Aggregation.ServiceDestinations.MaxGroups = linearScaledValue(5_000, memLimitGB, 5_000) s.logger.Infof("Aggregation.ServiceDestinations.MaxGroups set to %d based on %0.1fgb of memory", - s.config.Aggregation.Transactions.MaxGroups, memLimitGB, + s.config.Aggregation.ServiceDestinations.MaxGroups, memLimitGB, ) } diff --git a/internal/beater/config/aggregation.go b/internal/beater/config/aggregation.go index 3163d30ba1e..8f4f9c76b57 100644 --- a/internal/beater/config/aggregation.go +++ b/internal/beater/config/aggregation.go @@ -17,10 +17,6 @@ package config -const ( - defaultServiceDestinationAggregationMaxGroups = 10000 -) - // AggregationConfig holds configuration related to various metrics aggregations. type AggregationConfig struct { MaxServices int `config:"max_services"` // if <= 0 then will be set based on memory limits @@ -36,7 +32,7 @@ type TransactionAggregationConfig struct { // ServiceDestinationAggregationConfig holds configuration related to span metrics aggregation for service maps. type ServiceDestinationAggregationConfig struct { - MaxGroups int `config:"max_groups" validate:"min=1"` + MaxGroups int `config:"max_groups"` // if <= 0 then will be set based on memory limits } // ServiceTransactionAggregationConfig holds configuration related to service transaction metrics aggregation. @@ -45,9 +41,5 @@ type ServiceTransactionAggregationConfig struct { } func defaultAggregationConfig() AggregationConfig { - return AggregationConfig{ - ServiceDestinations: ServiceDestinationAggregationConfig{ - MaxGroups: defaultServiceDestinationAggregationMaxGroups, - }, - } + return AggregationConfig{} } diff --git a/internal/beater/config/config_test.go b/internal/beater/config/config_test.go index b43f696dea3..71b4fd03a05 100644 --- a/internal/beater/config/config_test.go +++ b/internal/beater/config/config_test.go @@ -478,7 +478,7 @@ func TestUnpackConfig(t *testing.T) { MaxGroups: 0, // Default value is set as per memory limit }, ServiceDestinations: ServiceDestinationAggregationConfig{ - MaxGroups: 10000, + MaxGroups: 0, // Default value is set as per memory limit }, ServiceTransactions: ServiceTransactionAggregationConfig{ MaxGroups: 0, // Default value is set as per memory limit From 4308a86c235eeffc3c7bb204cf35202366152e72 Mon Sep 17 00:00:00 2001 From: apmmachine <58790750+apmmachine@users.noreply.github.com> Date: Fri, 20 Oct 2023 11:36:08 -0400 Subject: [PATCH 3/4] [updatecli] Bump elastic stack version to 8.12.0-129ce746 (#11908) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Update k8s stack yaml files Made with ❤️️ by updatecli * chore: Update docker-compose.yml Made with ❤️️ by updatecli --------- Co-authored-by: apmmachine --- docker-compose.yml | 6 +++--- testing/infra/k8s/base/stack/apm-server.yaml | 2 +- testing/infra/k8s/base/stack/elasticsearch.yaml | 2 +- testing/infra/k8s/base/stack/kibana.yaml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 63024ccaa41..faf079f8cfc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ x-logging: &default-logging max-size: "1g" services: elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:8.12.0-ac05de1e-SNAPSHOT + image: docker.elastic.co/elasticsearch/elasticsearch:8.12.0-129ce746-SNAPSHOT ports: - 9200:9200 healthcheck: @@ -41,7 +41,7 @@ services: logging: *default-logging kibana: - image: docker.elastic.co/kibana/kibana:8.12.0-ac05de1e-SNAPSHOT + image: docker.elastic.co/kibana/kibana:8.12.0-129ce746-SNAPSHOT ports: - 5601:5601 healthcheck: @@ -60,7 +60,7 @@ services: logging: *default-logging metricbeat: - image: docker.elastic.co/beats/metricbeat:8.12.0-ac05de1e-SNAPSHOT + image: docker.elastic.co/beats/metricbeat:8.12.0-129ce746-SNAPSHOT environment: ELASTICSEARCH_HOSTS: '["http://elasticsearch:9200"]' ELASTICSEARCH_USERNAME: "${KIBANA_ES_USER:-admin}" diff --git a/testing/infra/k8s/base/stack/apm-server.yaml b/testing/infra/k8s/base/stack/apm-server.yaml index 4e9c02e219e..840a3704944 100644 --- a/testing/infra/k8s/base/stack/apm-server.yaml +++ b/testing/infra/k8s/base/stack/apm-server.yaml @@ -3,7 +3,7 @@ kind: ApmServer metadata: name: apm-server spec: - version: 8.12.0-ac05de1e-SNAPSHOT + version: 8.12.0-129ce746-SNAPSHOT count: 1 http: tls: diff --git a/testing/infra/k8s/base/stack/elasticsearch.yaml b/testing/infra/k8s/base/stack/elasticsearch.yaml index 032b902e9ff..241e10d79c0 100644 --- a/testing/infra/k8s/base/stack/elasticsearch.yaml +++ b/testing/infra/k8s/base/stack/elasticsearch.yaml @@ -3,7 +3,7 @@ kind: Elasticsearch metadata: name: elasticsearch spec: - version: 8.12.0-ac05de1e-SNAPSHOT + version: 8.12.0-129ce746-SNAPSHOT auth: fileRealm: - secretName: elasticsearch-admin diff --git a/testing/infra/k8s/base/stack/kibana.yaml b/testing/infra/k8s/base/stack/kibana.yaml index 07af48c96d1..ba883ca3ec0 100644 --- a/testing/infra/k8s/base/stack/kibana.yaml +++ b/testing/infra/k8s/base/stack/kibana.yaml @@ -3,7 +3,7 @@ kind: Kibana metadata: name: kibana spec: - version: 8.12.0-ac05de1e-SNAPSHOT + version: 8.12.0-129ce746-SNAPSHOT count: 1 elasticsearchRef: name: elasticsearch From bc72990119758938c8598e7fb7dbab6f4efa6b30 Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Mon, 23 Oct 2023 02:13:43 +0200 Subject: [PATCH 4/4] changelog: add entry for datastream changes in 8.10 (#11914) --- changelogs/8.10.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/changelogs/8.10.asciidoc b/changelogs/8.10.asciidoc index 36b3381ab72..e7382633e71 100644 --- a/changelogs/8.10.asciidoc +++ b/changelogs/8.10.asciidoc @@ -46,6 +46,7 @@ Fix tail-based sampling discarding low throughput and low sample rate traces {pu ==== Breaking Changes - Aggregated metrics now consider global labels to be part of a service's identity, and high cardinality global labels may cause services to be obscured {pull}11386[11386] - Event protobuf encoding for tail-based sampling changed (to a more efficient encoding) for event timestamp and duration {pull}11386[11386] +- Use object notation for data_stream fields {pull}11311[11311] [float] ==== Bug fixes