diff --git a/apmpackage/apm/changelog.yml b/apmpackage/apm/changelog.yml index 0d97df51bd9..e3cb5b99b24 100644 --- a/apmpackage/apm/changelog.yml +++ b/apmpackage/apm/changelog.yml @@ -3,7 +3,7 @@ - description: Enable synthetic source for metrics data streams type: enhancement link: https://github.com/elastic/apm-server/pull/9756 - - description: Change transaction.success_count type to aggregate_metric_double + - description: Remove `transaction.failure_count` and change `transaction.success_count` type to aggregate_metric_double type: enhancement link: https://github.com/elastic/apm-server/pull/9791 - version: "8.6.0" diff --git a/apmpackage/apm/data_stream/internal_metrics/fields/fields.yml b/apmpackage/apm/data_stream/internal_metrics/fields/fields.yml index 535bf9d029c..09ae3d7ec84 100644 --- a/apmpackage/apm/data_stream/internal_metrics/fields/fields.yml +++ b/apmpackage/apm/data_stream/internal_metrics/fields/fields.yml @@ -126,9 +126,6 @@ type: keyword description: | Keyword of specific relevance in the service's domain (eg: 'db.postgresql.query', 'template.erb', 'cache', etc). -- name: transaction.failure_count - type: long - description: "Count of transactions with 'event.outcome: failure'" - name: transaction.duration.histogram type: histogram description: | diff --git a/changelogs/head.asciidoc b/changelogs/head.asciidoc index 0e0cebada30..c709de97d65 100644 --- a/changelogs/head.asciidoc +++ b/changelogs/head.asciidoc @@ -10,7 +10,7 @@ https://github.com/elastic/apm-server/compare/8.5\...main[View commits] - `context.http.response.*_size` fields now enforce integer values {pull}9429[9429] - `observer.id` and `observer.ephemeral_id` are no longer added to APM documents {pull}9412[9412] - `timeseries.instance` has been removed from transaction metrics docs; it was never used {pull}9565[9565] -- `transaction.success_count` type has changed to `aggregated_metric_double` {pull}9791[9791] +- `transaction.failure_count` has been removed. `transaction.success_count` type has changed to `aggregated_metric_double` {pull}9791[9791] [float] ==== Deprecations diff --git a/internal/model/transaction.go b/internal/model/transaction.go index 88885aa8138..c112b834de8 100644 --- a/internal/model/transaction.go +++ b/internal/model/transaction.go @@ -60,15 +60,6 @@ type Transaction struct { // is subject to removal. DurationSummary SummaryMetric - // FailureCount holds an aggregated count of transactions with the - // outcome "failure". If FailureCount is zero, it will be omitted from - // the output event. - // - // NOTE(axw) this is used only for service metrics, which are in technical - // preview. Do not use this field without discussion, as the field mapping - // is subject to removal. - FailureCount int - // SuccessCount holds an aggregated count of transactions with different // outcomes. A "failure" adds to the Count. A "success" adds to both the // Count and the Sum. An "unknown" has no effect. If Count is zero, it @@ -109,9 +100,6 @@ func (e *Transaction) fields() mapstr.M { if e.DurationSummary.Count != 0 { transaction.maybeSetMapStr("duration.summary", e.DurationSummary.fields()) } - if e.FailureCount != 0 { - transaction.set("failure_count", e.FailureCount) - } if e.SuccessCount.Count != 0 { transaction.maybeSetMapStr("success_count", e.SuccessCount.fields()) } diff --git a/x-pack/apm-server/aggregation/servicemetrics/aggregator.go b/x-pack/apm-server/aggregation/servicemetrics/aggregator.go index a5a56d69ce9..ea31363e748 100644 --- a/x-pack/apm-server/aggregation/servicemetrics/aggregator.go +++ b/x-pack/apm-server/aggregation/servicemetrics/aggregator.go @@ -372,8 +372,7 @@ func makeMetricset(key aggregationKey, metrics serviceMetrics) model.APMEvent { Name: metricsetName, }, Transaction: &model.Transaction{ - Type: key.transactionType, - FailureCount: int(math.Round(metrics.failureCount)), + Type: key.transactionType, SuccessCount: model.SummaryMetric{ Count: int64(math.Round(metrics.successCount + metrics.failureCount)), Sum: metrics.successCount, diff --git a/x-pack/apm-server/aggregation/servicemetrics/aggregator_test.go b/x-pack/apm-server/aggregation/servicemetrics/aggregator_test.go index f31dec18d0c..16135e7056c 100644 --- a/x-pack/apm-server/aggregation/servicemetrics/aggregator_test.go +++ b/x-pack/apm-server/aggregation/servicemetrics/aggregator_test.go @@ -124,7 +124,6 @@ func TestAggregatorRun(t *testing.T) { Count: 5, Sum: 2, }, - FailureCount: 3, }, }, { Processor: model.MetricsetProcessor,