diff --git a/changelogs/head.asciidoc b/changelogs/head.asciidoc index 8d9d6b48c18..d1cb19979a2 100644 --- a/changelogs/head.asciidoc +++ b/changelogs/head.asciidoc @@ -9,6 +9,7 @@ https://github.com/elastic/apm-server/compare/8.6\...main[View commits] - `transaction.success_count` has been moved to `event.success_count` {pull}9819[9819] - Stop indexing transaction metrics to `metrics-apm.internal` {pull}9846[9846] - Stop indexing span destination metrics to `metrics-apm.internal` {pull}9926[9926] +- Service metrics and service summary aggregations are always enabled {pull}9926[9926] [float] ==== Deprecations diff --git a/internal/beater/config/aggregation.go b/internal/beater/config/aggregation.go index 4cf0fee75ff..938a9800228 100644 --- a/internal/beater/config/aggregation.go +++ b/internal/beater/config/aggregation.go @@ -45,9 +45,8 @@ type ServiceDestinationAggregationConfig struct { // ServiceAggregationConfig holds configuration related to service metrics aggregation. type ServiceAggregationConfig struct { - Enabled bool `config:"enabled"` - MaxGroups int `config:"max_groups"` // if <= 0 then will be set based on memory limits - HDRHistogramSignificantFigures int `config:"hdrhistogram_significant_figures" validate:"min=1, max=5"` + MaxGroups int `config:"max_groups"` // if <= 0 then will be set based on memory limits + HDRHistogramSignificantFigures int `config:"hdrhistogram_significant_figures" validate:"min=1, max=5"` } func defaultAggregationConfig() AggregationConfig { @@ -59,10 +58,6 @@ func defaultAggregationConfig() AggregationConfig { MaxGroups: defaultServiceDestinationAggregationMaxGroups, }, Service: ServiceAggregationConfig{ - // NOTE(axw) service metrics are in technical preview, - // disabled by default. Once proven, they may be always - // enabled in a future release, without configuration. - Enabled: false, HDRHistogramSignificantFigures: defaultServiceAggregationHDRHistogramSignificantFigures, }, } diff --git a/x-pack/apm-server/main.go b/x-pack/apm-server/main.go index 27014fbd54b..aba0f3e5e2b 100644 --- a/x-pack/apm-server/main.go +++ b/x-pack/apm-server/main.go @@ -137,34 +137,32 @@ func newProcessors(args beater.ServerParams) ([]namedProcessor, error) { } processors = append(processors, namedProcessor{name: spanName, processor: spanAggregator}) - if args.Config.Aggregation.Service.Enabled { - const serviceName = "service metrics aggregation" - args.Logger.Infof("creating %s with config: %+v", serviceName, args.Config.Aggregation.Service) - serviceAggregator, err := servicemetrics.NewAggregator(servicemetrics.AggregatorConfig{ - BatchProcessor: args.BatchProcessor, - Interval: metricsInterval, - RollUpIntervals: rollUpMetricsIntervals, - MaxGroups: args.Config.Aggregation.Service.MaxGroups, - HDRHistogramSignificantFigures: args.Config.Aggregation.Service.HDRHistogramSignificantFigures, - }) - if err != nil { - return nil, errors.Wrapf(err, "error creating %s", serviceName) - } - processors = append(processors, namedProcessor{name: serviceName, processor: serviceAggregator}) - - const serviceSummaryName = "service summary aggregation" - args.Logger.Infof("creating %s with config: %+v", serviceSummaryName, args.Config.Aggregation.Service) - serviceSummaryAggregator, err := servicesummarymetrics.NewAggregator(servicesummarymetrics.AggregatorConfig{ - BatchProcessor: args.BatchProcessor, - Interval: metricsInterval, - RollUpIntervals: rollUpMetricsIntervals, - MaxGroups: args.Config.Aggregation.Service.MaxGroups, - }) - if err != nil { - return nil, errors.Wrapf(err, "error creating %s", serviceSummaryName) - } - processors = append(processors, namedProcessor{name: serviceSummaryName, processor: serviceSummaryAggregator}) + const serviceName = "service metrics aggregation" + args.Logger.Infof("creating %s with config: %+v", serviceName, args.Config.Aggregation.Service) + serviceAggregator, err := servicemetrics.NewAggregator(servicemetrics.AggregatorConfig{ + BatchProcessor: args.BatchProcessor, + Interval: metricsInterval, + RollUpIntervals: rollUpMetricsIntervals, + MaxGroups: args.Config.Aggregation.Service.MaxGroups, + HDRHistogramSignificantFigures: args.Config.Aggregation.Service.HDRHistogramSignificantFigures, + }) + if err != nil { + return nil, errors.Wrapf(err, "error creating %s", serviceName) + } + processors = append(processors, namedProcessor{name: serviceName, processor: serviceAggregator}) + + const serviceSummaryName = "service summary aggregation" + args.Logger.Infof("creating %s with config: %+v", serviceSummaryName, args.Config.Aggregation.Service) + serviceSummaryAggregator, err := servicesummarymetrics.NewAggregator(servicesummarymetrics.AggregatorConfig{ + BatchProcessor: args.BatchProcessor, + Interval: metricsInterval, + RollUpIntervals: rollUpMetricsIntervals, + MaxGroups: args.Config.Aggregation.Service.MaxGroups, + }) + if err != nil { + return nil, errors.Wrapf(err, "error creating %s", serviceSummaryName) } + processors = append(processors, namedProcessor{name: serviceSummaryName, processor: serviceSummaryAggregator}) if args.Config.Sampling.Tail.Enabled { const name = "tail sampler"