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/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 diff --git a/docker-compose.yml b/docker-compose.yml index 63024ccaa41..57f5906b95c 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-0f0dbad4-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-0f0dbad4-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-0f0dbad4-SNAPSHOT environment: ELASTICSEARCH_HOSTS: '["http://elasticsearch:9200"]' ELASTICSEARCH_USERNAME: "${KIBANA_ES_USER:-admin}" diff --git a/docs/api-info.asciidoc b/docs/api-info.asciidoc index 3bd7544ed54..4287e7da44a 100644 --- a/docs/api-info.asciidoc +++ b/docs/api-info.asciidoc @@ -8,22 +8,56 @@ This lightweight endpoint is useful as a server up/down health check. [[api-info-endpoint]] === Server Information endpoint -Send an `HTTP GET` request to the server information endpoint: +This is the server information endpoint: [source,bash] ------------------------------------------------------------ http(s)://{hostname}:{port}/ ------------------------------------------------------------ -This endpoint always returns an HTTP 200. +Sending an `HTTP GET` or `HTTP POST` request to the server information endpoint +will return an HTTP 200, indicating that the server is up. -If <> or a <> is configured, requests to this endpoint must be authenticated. +To configure authenticated access to the APM server, +the instructions at <> or <>, +must be followed to configure the correct permissions for APM access. + +If an <> or a <> is passed along with +the `HTTP GET` or `HTTP POST` request, in addition to an HTTP 200, +the response payload will include some information about the APM server. + +[float] +[[api-info-example-get-without-credentials]] +==== Example: GET, without credentials + +Example APM Server status request with GET, without credentials: + +["source","sh",subs="attributes"] +--------------------------------------------------------------------------- +curl --verbose -X GET http://127.0.0.1:8200 + +* Trying 127.0.0.1:8200... +* TCP_NODELAY set +* Connected to 127.0.0.1 (10.244.3.40) port 8200 (#0) +> GET / HTTP/1.1 +> Host: 127.0.0.1:8200 +> User-Agent: curl/7.68.0 +> Accept: */* +> +* Mark bundle as not supporting multiuse +< HTTP/1.1 200 OK +< X-Content-Type-Options: nosniff +< Date: Tue, 17 Oct 2023 22:04:05 GMT +< Content-Length: 0 +< +* Connection #0 to host 127.0.0.1 left intact +--------------------------------------------------------------------------- [float] -[[api-info-examples]] -==== Example +[[api-info-example-post-with-secret-token]] +==== Example: POST, with secret token -Example APM Server information request: +Example APM Server information request with POST, with a <>: ["source","sh",subs="attributes"] --------------------------------------------------------------------------- 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/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 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/testing/infra/k8s/base/stack/apm-server.yaml b/testing/infra/k8s/base/stack/apm-server.yaml index 4e9c02e219e..aee70d413eb 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-0f0dbad4-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..4611d946c47 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-0f0dbad4-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..0c7cbbd8271 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-0f0dbad4-SNAPSHOT count: 1 elasticsearchRef: name: elasticsearch 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 (