Skip to content

Commit

Permalink
[7.x] Add event.outcome to transactions and spans (#4064) (#4125)
Browse files Browse the repository at this point in the history
  • Loading branch information
jalvz committed Sep 1, 2020
1 parent 7450ee9 commit f25d084
Show file tree
Hide file tree
Showing 75 changed files with 557 additions and 108 deletions.
14 changes: 14 additions & 0 deletions _meta/fields.common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -777,3 +777,17 @@
description: Cloud region name
example: us-east1
overwrite: true

- name: event
type: group
fields:

- name: outcome
level: core
type: keyword
ignore_above: 1024
description: >
`event.outcome` simply denotes whether the event represents a success or a
failure from the perspective of the entity that produced the event.
example: success
overwrite: true
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"host": {
"architecture": "amd64",
"hostname": "node-name",
Expand Down Expand Up @@ -218,6 +221,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"host": {
"architecture": "amd64",
"hostname": "node-name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"host": {
"ip": "127.0.0.1"
},
Expand Down Expand Up @@ -69,6 +72,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"host": {
"ip": "127.0.0.1"
},
Expand Down Expand Up @@ -123,6 +129,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"host": {
"ip": "127.0.0.1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "success"
},
"host": {
"architecture": "x64",
"hostname": "node-name",
Expand Down Expand Up @@ -172,6 +175,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"host": {
"architecture": "x64",
"hostname": "node-name",
Expand Down Expand Up @@ -302,6 +308,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"host": {
"architecture": "x64",
"hostname": "node-name",
Expand Down Expand Up @@ -436,6 +445,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"host": {
"architecture": "x64",
"hostname": "node-name",
Expand Down Expand Up @@ -572,6 +584,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"host": {
"architecture": "x64",
"hostname": "node-name",
Expand Down Expand Up @@ -780,6 +795,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"host": {
"architecture": "x64",
"hostname": "node-name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"host": {
"architecture": "x64",
"hostname": "node-name",
Expand Down Expand Up @@ -170,6 +173,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "success"
},
"host": {
"architecture": "x64",
"hostname": "node-name",
Expand Down Expand Up @@ -393,6 +399,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"host": {
"architecture": "x64",
"hostname": "node-name",
Expand Down Expand Up @@ -543,6 +552,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"host": {
"architecture": "x64",
"hostname": "node-name",
Expand Down
39 changes: 27 additions & 12 deletions docs/data/elasticsearch/generated/spans.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"labels": {
"span_tag": "something"
},
Expand Down Expand Up @@ -121,10 +124,13 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"observer": {
"ephemeral_id": "c0cea3b6-97d7-4e15-9e35-c868e7a3c869",
"hostname": "ix.lan",
"id": "a49b4a08-689a-4724-8050-8bd0ae043281",
"ephemeral_id": "2f13d8fa-83cd-4356-8123-aabfb47a1808",
"hostname": "goat",
"id": "17ad47dd-5671-4c89-979f-ef4533565ba2",
"type": "apm-server",
"version": "8.0.0",
"version_major": 8
Expand Down Expand Up @@ -187,10 +193,13 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"observer": {
"ephemeral_id": "c0cea3b6-97d7-4e15-9e35-c868e7a3c869",
"hostname": "ix.lan",
"id": "a49b4a08-689a-4724-8050-8bd0ae043281",
"ephemeral_id": "2f13d8fa-83cd-4356-8123-aabfb47a1808",
"hostname": "goat",
"id": "17ad47dd-5671-4c89-979f-ef4533565ba2",
"type": "apm-server",
"version": "8.0.0",
"version_major": 8
Expand Down Expand Up @@ -237,10 +246,13 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"observer": {
"ephemeral_id": "c0cea3b6-97d7-4e15-9e35-c868e7a3c869",
"hostname": "ix.lan",
"id": "a49b4a08-689a-4724-8050-8bd0ae043281",
"ephemeral_id": "2f13d8fa-83cd-4356-8123-aabfb47a1808",
"hostname": "goat",
"id": "17ad47dd-5671-4c89-979f-ef4533565ba2",
"type": "apm-server",
"version": "8.0.0",
"version_major": 8
Expand Down Expand Up @@ -293,10 +305,13 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "unknown"
},
"observer": {
"ephemeral_id": "c0cea3b6-97d7-4e15-9e35-c868e7a3c869",
"hostname": "ix.lan",
"id": "a49b4a08-689a-4724-8050-8bd0ae043281",
"ephemeral_id": "2f13d8fa-83cd-4356-8123-aabfb47a1808",
"hostname": "goat",
"id": "17ad47dd-5671-4c89-979f-ef4533565ba2",
"type": "apm-server",
"version": "8.0.0",
"version_major": 8
Expand Down
30 changes: 17 additions & 13 deletions docs/data/elasticsearch/generated/transactions.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"version": "1.5.0"
},
"event": {
"ingested": "2020-04-22T14:49:24.899906Z"
"ingested": "2020-08-11T09:55:04.391451Z",
"outcome": "unknown"
},
"host": {
"architecture": "x64",
Expand Down Expand Up @@ -107,7 +108,8 @@
"version": "1.5.0"
},
"event": {
"ingested": "2020-04-22T14:49:24.900309Z"
"ingested": "2020-08-11T09:55:04.391568Z",
"outcome": "unknown"
},
"host": {
"architecture": "x64",
Expand All @@ -124,9 +126,9 @@
}
},
"observer": {
"ephemeral_id": "f78f6762-2157-4322-95aa-aecd2f486c1a",
"hostname": "ix.lan",
"id": "80b79979-4a7d-450d-b2ce-75c589f7fffd",
"ephemeral_id": "fb037b97-0027-401a-9dc4-17d162f2687f",
"hostname": "goat",
"id": "a4daf4ca-b280-4ede-90df-bf62482cec37",
"type": "apm-server",
"version": "8.0.0",
"version_major": 8
Expand Down Expand Up @@ -202,7 +204,8 @@
"version": "1.5.0"
},
"event": {
"ingested": "2020-04-22T14:49:24.900644Z"
"ingested": "2020-08-11T09:55:04.391639Z",
"outcome": "unknown"
},
"host": {
"architecture": "x64",
Expand All @@ -219,9 +222,9 @@
}
},
"observer": {
"ephemeral_id": "f78f6762-2157-4322-95aa-aecd2f486c1a",
"hostname": "ix.lan",
"id": "80b79979-4a7d-450d-b2ce-75c589f7fffd",
"ephemeral_id": "fb037b97-0027-401a-9dc4-17d162f2687f",
"hostname": "goat",
"id": "a4daf4ca-b280-4ede-90df-bf62482cec37",
"type": "apm-server",
"version": "8.0.0",
"version_major": 8
Expand Down Expand Up @@ -309,7 +312,8 @@
"version": "1.5.0"
},
"event": {
"ingested": "2020-04-22T14:49:24.844687Z"
"ingested": "2020-08-11T09:55:04.338986Z",
"outcome": "unknown"
},
"host": {
"architecture": "x64",
Expand Down Expand Up @@ -388,9 +392,9 @@
"organization_uuid": "9f0e9d64-c185-4d21-a6f4-4673ed561ec8"
},
"observer": {
"ephemeral_id": "f78f6762-2157-4322-95aa-aecd2f486c1a",
"hostname": "ix.lan",
"id": "80b79979-4a7d-450d-b2ce-75c589f7fffd",
"ephemeral_id": "fb037b97-0027-401a-9dc4-17d162f2687f",
"hostname": "goat",
"id": "a4daf4ca-b280-4ede-90df-bf62482cec37",
"type": "apm-server",
"version": "8.0.0",
"version_major": 8
Expand Down
2 changes: 1 addition & 1 deletion docs/data/intake-api/generated/rum_v3_events.ndjson
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{"m": {"se": {"n": "apm-a-rum-test-e2e-general-usecase","ve": "0.0.1","en": "prod","a": {"n": "js-base","ve": "4.8.1"},"ru": {"n": "v8","ve": "8.0"},"la": {"n": "javascript","ve": "6"},"fw": {"n": "angular","ve": "2"}},"u": {"id": 123,"em": "user@email.com","un": "John Doe"},"l": {"testTagKey": "testTagValue"}}}
{"x": {"id": "ec2e280be8345240","tid": "286ac3ad697892c406528f13c82e0ce1","pid": "1ef08ac234fca23b455d9e27c660f1ab","n": "general-usecase-initial-p-load","t": "p-load","d": 295,"me": [{"sa": {"xdc": {"v": 1},"xds": {"v": 295},"xbc": {"v": 1}}},{"y": {"t": "Request"},"sa": {"ysc": {"v": 1},"yss": {"v": 1}}},{"y": {"t": "Response"},"sa": {"ysc": {"v": 1},"yss": {"v": 1}}}],"y": [{"id": "bbd8bcc3be14d814","n": "Requesting and receiving the document","t": "hard-navigation","su": "browser-timing","s": 4,"d": 2},{"id": "fc546e87a90a774f","n": "Parsing the document, executing sy. scripts","t": "hard-navigation","su": "browser-timing","s": 14,"d": 106},{"id": "fb8f717930697299","n": "http://localhost:8000/test/e2e/general-usecase/app.e2e-bundle.min.js","t": "rc","su": "script","s": 22.53499999642372,"d": 35.060000023804605,"c": {"h": {"url": "http://localhost:8000/test/e2e/general-usecase/app.e2e-bundle.min.js?token=REDACTED","r": {"ts": 677175,"ebs": 676864,"dbs": 676864}},"dt": {"se": {"n": "http://localhost:8000","rc": "localhost:8000","t": "rc"},"ad": "localhost","po": 8000}}},{"id": "9b80535c4403c9fb","n": "OpenTracing y","t": "cu","s": 96.92999999970198,"d": 198.07000000029802},{"id": "5ecb8ee030749715","n": "GET /test/e2e/common/data.json","t": "external","su": "h","sy": true,"s": 98.94000005442649,"d": 6.72499998472631,"c": {"h": {"mt": "GET","url": "http://localhost:8000/test/e2e/common/data.json?test=hamid","sc": 200},"dt": {"se": {"n": "http://localhost:8000","rc": "localhost:8000","t": "external"},"ad": "localhost","po": 8000}}},{"id": "27f45fd274f976d4","n": "POST http://localhost:8003/data","t": "external","su": "h","sy": true,"s": 106.52000003028661,"d": 11.584999971091747,"c": {"h": {"mt": "POST","url": "http://localhost:8003/data","sc": 200},"dt": {"se": {"n": "http://localhost:8003","rc": "localhost:8003","t": "external"},"ad": "localhost","po": 8003}}},{"id": "a3c043330bc2015e","pi": 0,"n": "POST http://localhost:8003/fetch","t": "external","su": "h","ac": "action","sy": false,"s": 119.93500008247793,"d": 15.949999913573265,"c": {"h": {"mt": "POST","url": "http://localhost:8003/fetch","sc": 200},"dt": {"se": {"n": "http://localhost:8003","rc": "localhost:8003","t": "external"},"ad": "localhost","po": 8003}}},{"id": "bc7665dc25629379","st": [{"ap": "http://localhost:8000/test/e2e/general-usecase/app.e2e-bundle.min.js?token=secret","f": "test/e2e/general-usecase/app.e2e-bundle.min.js?token=secret","fn": "generateError","li": 7662,"co": 9},{"ap": "http://localhost:8000/test/e2e/general-usecase/app.e2e-bundle.min.js?token=secret","f": "test/e2e/general-usecase/app.e2e-bundle.min.js?token=secret","fn": "<anonymous>","li": 7666,"co": 3}],"n": "Fire \"DOMContentLoaded\" event","t": "hard-navigation","su": "browser-timing","s": 120,"d": 2}],"c": {"p": {"rf": "http://localhost:8000/test/e2e/","url": "http://localhost:8000/test/e2e/general-usecase/"},"r": {"sc": 200,"ts": 983,"ebs": 690,"dbs": 690,"he": {"Content-Type": "application/json"}},"q": {"he": {"Accept": "application/json"},"hve": "1.1","mt": "GET"},"u": {"id": "uId","un": "un","em": "em"},"cu": {"testContext": "testContext"},"g": {"testTagKey": "testTagValue"}},"k": {"a": {"lp": 131.03000004775822,"fb": 5,"di": 120,"dc": 138,"ds": 100,"de": 110,"fp": 70.82500003930181},"nt": {"fs": 0,"ls": 0,"le": 0,"cs": 0,"ce": 0,"qs": 4,"rs": 5,"re": 6,"dl": 14,"di": 120,"ds": 120,"de": 122,"dc": 138,"es": 138,"ee": 138}},"yc": {"sd": 8,"dd": 1},"sm": true,"exp":{"cls":1,"fid":2.0,"tbt":3.4,"ignored":5,"also":"ignored"}}}
{"x": {"id": "ec2e280be8345240","tid": "286ac3ad697892c406528f13c82e0ce1","pid": "1ef08ac234fca23b455d9e27c660f1ab","n": "general-usecase-initial-p-load","t": "p-load","d": 295,"me": [{"sa": {"xdc": {"v": 1},"xds": {"v": 295},"xbc": {"v": 1}}},{"y": {"t": "Request"},"sa": {"ysc": {"v": 1},"yss": {"v": 1}}},{"y": {"t": "Response"},"sa": {"ysc": {"v": 1},"yss": {"v": 1}}}],"y": [{"id": "bbd8bcc3be14d814","n": "Requesting and receiving the document","t": "hard-navigation","su": "browser-timing","s": 4,"d": 2},{"id": "fc546e87a90a774f","n": "Parsing the document, executing sy. scripts","t": "hard-navigation","su": "browser-timing","s": 14,"d": 106},{"id": "fb8f717930697299","n": "http://localhost:8000/test/e2e/general-usecase/app.e2e-bundle.min.js","t": "rc","su": "script","s": 22.53499999642372,"d": 35.060000023804605,"c": {"h": {"url": "http://localhost:8000/test/e2e/general-usecase/app.e2e-bundle.min.js?token=REDACTED","r": {"ts": 677175,"ebs": 676864,"dbs": 676864}},"dt": {"se": {"n": "http://localhost:8000","rc": "localhost:8000","t": "rc"},"ad": "localhost","po": 8000}}},{"id": "9b80535c4403c9fb","n": "OpenTracing y","t": "cu","s": 96.92999999970198,"d": 198.07000000029802},{"id": "5ecb8ee030749715","n": "GET /test/e2e/common/data.json","t": "external","su": "h","sy": true,"s": 98.94000005442649,"d": 6.72499998472631,"c": {"h": {"mt": "GET","url": "http://localhost:8000/test/e2e/common/data.json?test=hamid","sc": 200},"dt": {"se": {"n": "http://localhost:8000","rc": "localhost:8000","t": "external"},"ad": "localhost","po": 8000}}},{"id": "27f45fd274f976d4","n": "POST http://localhost:8003/data","t": "external","su": "h","sy": true,"s": 106.52000003028661,"d": 11.584999971091747,"c": {"h": {"mt": "POST","url": "http://localhost:8003/data","sc": 200},"dt": {"se": {"n": "http://localhost:8003","rc": "localhost:8003","t": "external"},"ad": "localhost","po": 8003}}},{"id": "a3c043330bc2015e","pi": 0,"n": "POST http://localhost:8003/fetch","t": "external","su": "h","ac": "action","sy": false,"s": 119.93500008247793,"d": 15.949999913573265,"c": {"h": {"mt": "POST","url": "http://localhost:8003/fetch","sc": 200},"dt": {"se": {"n": "http://localhost:8003","rc": "localhost:8003","t": "external"},"ad": "localhost","po": 8003}}},{"id": "bc7665dc25629379","st": [{"ap": "http://localhost:8000/test/e2e/general-usecase/app.e2e-bundle.min.js?token=secret","f": "test/e2e/general-usecase/app.e2e-bundle.min.js?token=secret","fn": "generateError","li": 7662,"co": 9},{"ap": "http://localhost:8000/test/e2e/general-usecase/app.e2e-bundle.min.js?token=secret","f": "test/e2e/general-usecase/app.e2e-bundle.min.js?token=secret","fn": "<anonymous>","li": 7666,"co": 3}],"n": "Fire \"DOMContentLoaded\" event","t": "hard-navigation","su": "browser-timing","s": 120,"d": 2,"o":"success"}],"c": {"p": {"rf": "http://localhost:8000/test/e2e/","url": "http://localhost:8000/test/e2e/general-usecase/"},"r": {"sc": 200,"ts": 983,"ebs": 690,"dbs": 690,"he": {"Content-Type": "application/json"}},"q": {"he": {"Accept": "application/json"},"hve": "1.1","mt": "GET"},"u": {"id": "uId","un": "un","em": "em"},"cu": {"testContext": "testContext"},"g": {"testTagKey": "testTagValue"}},"k": {"a": {"lp": 131.03000004775822,"fb": 5,"di": 120,"dc": 138,"ds": 100,"de": 110,"fp": 70.82500003930181},"nt": {"fs": 0,"ls": 0,"le": 0,"cs": 0,"ce": 0,"qs": 4,"rs": 5,"re": 6,"dl": 14,"di": 120,"ds": 120,"de": 122,"dc": 138,"es": 138,"ee": 138}},"yc": {"sd": 8,"dd": 1},"sm": true,"exp":{"cls":1,"fid":2.0,"tbt":3.4,"ignored":5,"also":"ignored"}}}
{"me": {"y": {"t": "Processing","su": "subtype"},"sa": {"ysc": {"v": 1},"yss": {"v": 124}},"g": {"tag1": "value1"}}}
13 changes: 13 additions & 0 deletions docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,19 @@ example: us-east1
--
*`event.outcome`*::
+
--
`event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event.
type: keyword
example: success
--
[[exported-fields-apm-error]]
== APM Error fields
Expand Down
7 changes: 7 additions & 0 deletions docs/spec/outcome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$id": "docs/spec/outcome.json",
"title": "Outcome",
"type": ["string", "null"],
"enum": [null, "success", "failure", "unknown"],
"description": "The outcome of the transaction: success, failure, or unknown. This is similar to 'result', but has a limited set of permitted values describing the success or failure of the transaction from the service's perspective. This field can be used for calculating error rates."
}
4 changes: 4 additions & 0 deletions docs/spec/spans/rum_v3_span.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
"description": "The specific kind of event within the sub-type represented by the span (e.g. query, connect)",
"maxLength": 1024
},
"o": {
"$ref": "../outcome.json",
"description": "The outcome of the span: success, failure, or unknown. Outcome may be one of a limited set of permitted values describing the success or failure of the span. This field can be used for calculating error rates for outgoing requests."
},
"c": {
"type": [
"object",
Expand Down
4 changes: 4 additions & 0 deletions docs/spec/spans/span.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
"description": "The specific kind of event within the sub-type represented by the span (e.g. query, connect)",
"maxLength": 1024
},
"outcome": {
"$ref": "../outcome.json",
"description": "The outcome of the span: success, failure, or unknown. Outcome may be one of a limited set of permitted values describing the success or failure of the span. This field can be used for calculating error rates for outgoing requests."
},
"context": {
"type": ["object", "null"],
"description": "Any other arbitrary data captured by the agent, optionally provided by the user",
Expand Down
4 changes: 4 additions & 0 deletions docs/spec/transactions/rum_v3_transaction.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
"description": "The result of the transaction. For HTTP-related transactions, this should be the status code formatted like 'HTTP 2xx'.",
"maxLength": 1024
},
"o": {
"$ref": "../outcome.json",
"description": "The outcome of the transaction: success, failure, or unknown. This is similar to 'result', but has a limited set of permitted values describing the success or failure of the transaction from the service's perspective. This field can be used for calculating error rates for incoming requests."
},
"k": {
"type": [
"object",
Expand Down
Loading

0 comments on commit f25d084

Please sign in to comment.