Skip to content

Commit

Permalink
Update fields, tests, generated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
axw committed Aug 24, 2020
1 parent d68f4b6 commit 3bf5cbd
Show file tree
Hide file tree
Showing 27 changed files with 237 additions and 100 deletions.
14 changes: 14 additions & 0 deletions _meta/fields.common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -778,3 +778,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 @@ -43,6 +43,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "success"
},
"host": {
"architecture": "x64",
"hostname": "node-name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@
"ecs": {
"version": "1.5.0"
},
"event": {
"outcome": "success"
},
"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
2 changes: 1 addition & 1 deletion include/fields.go

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions processor/stream/package_tests/error_attrs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func errorFieldsNotInPayloadAttrs() *tests.Set {
return tests.NewSet(
"view errors", "error id icon",
"host.ip", "transaction.name", "source.ip",
tests.Group("event"),
tests.Group("observer"),
tests.Group("user"),
tests.Group("client"),
Expand Down Expand Up @@ -133,6 +134,7 @@ func errorKeywordExceptionKeys() *tests.Set {
return tests.NewSet(
"processor.event", "processor.name", "error.grouping_key",
"context.tags", "transaction.name",
"event.outcome", // not relevant
"view errors", "error id icon",
tests.Group("url"),
tests.Group("http"),
Expand Down
1 change: 1 addition & 0 deletions processor/stream/package_tests/metadata_attrs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ func TestKeywordLimitationOnMetadataAttrs(t *testing.T) {
tests.NewSet("processor.event", "processor.name",
"process.args",
tests.Group("observer"),
tests.Group("event"),
tests.Group("http"),
tests.Group("url"),
tests.Group("context.tags"),
Expand Down
1 change: 1 addition & 0 deletions processor/stream/package_tests/span_attrs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ func spanKeywordExceptionKeys() *tests.Set {
return tests.Union(tests.NewSet(
"processor.event", "processor.name",
"context.tags", "transaction.type", "transaction.name",
"event.outcome",
tests.Group("observer"),

// metadata fields
Expand Down
1 change: 1 addition & 0 deletions processor/stream/package_tests/transaction_attrs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func transactionKeywordExceptionKeys() *tests.Set {
"processor.event", "processor.name",
"transaction.marks",
"context.tags",
"event.outcome",
tests.Group("observer"),
tests.Group("url"),
tests.Group("http"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
"container": {
"id": "container-id"
},
"event": {
"outcome": "success"
},
"host": {
"architecture": "x64",
"hostname": "node-name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@
"container": {
"id": "container-id"
},
"event": {
"outcome": "success"
},
"host": {
"architecture": "x64",
"hostname": "node-name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@
"ip": "192.0.0.1"
},
"event": {
"outcome": "unknown"
"outcome": "success"
},
"labels": {
"testTagKey": "testTagValue"
Expand Down
2 changes: 1 addition & 1 deletion testdata/intake-v2/spans.ndjson
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{"metadata": {"user": {"id": "123", "email": "s@test.com", "username": "john"}, "process": {"ppid": 6789, "pid": 1234,"argv": ["node", "server.js"], "title": "node"}, "system": {"platform": "darwin", "hostname": "prod1.example.com", "architecture": "x64", "container": {"id": "container-id"}, "kubernetes": {"namespace": "namespace1", "pod": {"uid": "pod-uid", "name": "pod-name"}, "node": {"name": "node-name"}}}, "labels": {"tag1": "label1"}, "service": {"name": "backendspans", "language": {"version": "8", "name": "ecmascript"}, "agent": {"version": "3.14.0", "name": "elastic-node"}, "environment": "staging", "framework": {"version": "1.2.3", "name": "Express"}, "version": "5.1.3", "runtime": {"version": "8.0.0", "name": "node"}},"cloud":{"account":{"id":"account_id","name":"account_name"},"availability_zone":"cloud_availability_zone","instance":{"id":"instance_id","name":"instance_name"},"machine":{"type":"machine_type"},"project":{"id":"project_id","name":"project_name"},"provider":"cloud_provider","region":"cloud_region"}}}
{"span": {"trace_id": "fdedef0123456789abcdef9876543210", "parent_id": "abcdef0123456789", "id": "abcdef01234567", "child_ids": ["51234abcdef56789"], "transaction_id": "01af25874dec69dd", "name": "GET /api/types", "type": "db.postgresql.query.custom","start": null, "duration": 141.581, "timestamp": 1532976822281000}}
{"span": {"trace_id": "fdedef0123456789abcdef9876543210", "parent_id": "abcdef0123456789", "id": "abcdef01234567", "child_ids": ["51234abcdef56789"], "transaction_id": "01af25874dec69dd", "name": "GET /api/types", "type": "db.postgresql.query.custom","start": null, "duration": 141.581, "timestamp": 1532976822281000, "outcome": "success"}}
{"span": {"trace_id": "abcdef0123456789abcdef9876543210", "parent_id": "0000000011111111", "id": "1234abcdef567895", "transaction_id": "ab45781d265894fe", "name": "GET /api/types", "type": "request", "start": 22, "duration": 32.592981, "timestamp": 1532976822281000,"context":{"service":{"environment":"prod","agent":{}}}}}
{"span": {"trace_id": "abcdef0123456789abcdef9876543210", "parent_id": "abcdefabcdef7890", "id": "0123456a89012345", "transaction_id": "ab23456a89012345", "name": "GET /api/types", "type": "request.http", "start": 1.845, "duration": 3.5642981, "stacktrace": [], "context":{"tags": {"tag1": "value1", "tag2": 123, "tag3": 12.34, "tag4": true, "tag5": null},"service":{}}}}
{"span": {"trace_id": "abcdef0123456789abcdef9876543210", "parent_id": "ababcdcdefefabde", "id": "abcde56a89012345", "transaction_id": null, "name": "get /api/types", "sync": false, "type": "request", "subtype": "http", "action": "call", "start": 0, "duration": 13.9802981, "stacktrace": null, "context": null }}
Expand Down
Loading

0 comments on commit 3bf5cbd

Please sign in to comment.