Skip to content

Commit

Permalink
Merge branch 'main' into apm-clarify
Browse files Browse the repository at this point in the history
  • Loading branch information
axw authored Oct 23, 2023
2 parents 9fff4f5 + bc72990 commit a6265e1
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 44 deletions.
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions changelogs/8.10.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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}"
Expand Down
6 changes: 0 additions & 6 deletions internal/beatcmd/beat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion internal/beater/beater.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
}

Expand Down
12 changes: 2 additions & 10 deletions internal/beater/config/aggregation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -45,9 +41,5 @@ type ServiceTransactionAggregationConfig struct {
}

func defaultAggregationConfig() AggregationConfig {
return AggregationConfig{
ServiceDestinations: ServiceDestinationAggregationConfig{
MaxGroups: defaultServiceDestinationAggregationMaxGroups,
},
}
return AggregationConfig{}
}
2 changes: 1 addition & 1 deletion internal/beater/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 3 additions & 14 deletions packaging.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 $@
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion testing/infra/k8s/base/stack/apm-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion testing/infra/k8s/base/stack/elasticsearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion testing/infra/k8s/base/stack/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions x-pack/apm-server/aggregation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit a6265e1

Please sign in to comment.