Skip to content

Commit

Permalink
Remove transaction.failure_count
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonip committed Dec 13, 2022
1 parent 96c6544 commit 38efcdf
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 20 deletions.
2 changes: 1 addition & 1 deletion apmpackage/apm/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 0 additions & 3 deletions apmpackage/apm/data_stream/internal_metrics/fields/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion changelogs/head.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 0 additions & 12 deletions internal/model/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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())
}
Expand Down
3 changes: 1 addition & 2 deletions x-pack/apm-server/aggregation/servicemetrics/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ func TestAggregatorRun(t *testing.T) {
Count: 5,
Sum: 2,
},
FailureCount: 3,
},
}, {
Processor: model.MetricsetProcessor,
Expand Down

0 comments on commit 38efcdf

Please sign in to comment.