Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename transaction span dropped total #1809

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -356,9 +356,7 @@
},
"sampled": true,
"span_count": {
"dropped": {
"total": 55
},
"dropped": 55,
"started": 436
},
"type": "request"
Expand Down
1 change: 1 addition & 0 deletions changelogs/head.asciidoc
Expand Up @@ -9,6 +9,7 @@
- Allow numbers and boolean values for `transaction.tags`, `span.tags`, `metricset.tags` {pull}1712[1712].
- Update response format of the healthcheck handler and prettyfy all JSON responses {pull}1748[1748].
- Add transaction.type to error data {pull}1781[1781].
- Rename transaction.span_count.dropped.total to transaction.span_count.dropped {pull}1809[1809].

[float]
==== Removed
Expand Down
4 changes: 1 addition & 3 deletions docs/data/elasticsearch/generated/transactions.json
Expand Up @@ -320,9 +320,7 @@
},
"sampled": true,
"span_count": {
"dropped": {
"total": 55
},
"dropped": 55,
"started": 436
},
"type": "request"
Expand Down
3 changes: 1 addition & 2 deletions docs/fields.asciidoc
Expand Up @@ -1011,8 +1011,7 @@ type: object
--



*`transaction.span_count.dropped.total`*::
*`transaction.span_count.dropped`*::
+
--
type: long
Expand Down
2 changes: 1 addition & 1 deletion include/fields.go

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions model/transaction/_meta/fields.yml
Expand Up @@ -47,8 +47,5 @@
type: group
fields:
- name: dropped
type: group
fields:
- name: total
type: long
description: The total amount of dropped spans for this transaction.
type: long
description: The total amount of dropped spans for this transaction.
2 changes: 1 addition & 1 deletion model/transaction/event.go
Expand Up @@ -137,7 +137,7 @@ func (t *Event) fields(tctx *transform.Context) common.MapStr {
spanCount := common.MapStr{}

if t.SpanCount.Dropped != nil {
utility.Add(spanCount, "dropped", common.MapStr{"total": *t.SpanCount.Dropped})
utility.Add(spanCount, "dropped", *t.SpanCount.Dropped)
}
if t.SpanCount.Started != nil {
utility.Add(spanCount, "started", *t.SpanCount.Started)
Expand Down
4 changes: 2 additions & 2 deletions model/transaction/event_test.go
Expand Up @@ -166,7 +166,7 @@ func TestEventTransform(t *testing.T) {
"id": id,
"type": "tx",
"duration": common.MapStr{"us": 65980},
"span_count": common.MapStr{"dropped": common.MapStr{"total": 5}},
"span_count": common.MapStr{"dropped": 5},
"sampled": true,
},
Msg: "SpanCount only contains `dropped`",
Expand All @@ -189,7 +189,7 @@ func TestEventTransform(t *testing.T) {
"type": "tx",
"result": "tx result",
"duration": common.MapStr{"us": 65980},
"span_count": common.MapStr{"started": 14, "dropped": common.MapStr{"total": 5}},
"span_count": common.MapStr{"started": 14, "dropped": 5},
"sampled": false,
},
Msg: "Full Event",
Expand Down
Expand Up @@ -320,9 +320,7 @@
},
"sampled": true,
"span_count": {
"dropped": {
"total": 55
},
"dropped": 55,
"started": 436
},
"type": "request"
Expand Down
10 changes: 3 additions & 7 deletions tests/system/transaction.approved.json
Expand Up @@ -127,10 +127,8 @@
"transaction": {
"type": "request",
"span_count": {
"started": 4,
"dropped": {
"total": 2
}
"dropped": 2,
"started": 4
},
"marks": {
"another_mark": {
Expand Down Expand Up @@ -207,9 +205,7 @@
"transaction": {
"type": "request",
"span_count": {
"dropped": {
"total": 258
},
"dropped": 258,
"started": 1
},
"id": "85925e55b43f4342",
Expand Down