From dbddc7f7b1935972950268af4ecbf325d06a731a Mon Sep 17 00:00:00 2001 From: Luke Elmers Date: Fri, 1 Oct 2021 12:27:08 -0600 Subject: [PATCH 1/5] Version bump to ECS 8.0.0. --- packages/kbn-logging/src/ecs/agent.ts | 2 +- packages/kbn-logging/src/ecs/autonomous_system.ts | 2 +- packages/kbn-logging/src/ecs/base.ts | 2 +- packages/kbn-logging/src/ecs/client.ts | 2 +- packages/kbn-logging/src/ecs/cloud.ts | 2 +- packages/kbn-logging/src/ecs/code_signature.ts | 2 +- packages/kbn-logging/src/ecs/container.ts | 2 +- packages/kbn-logging/src/ecs/data_stream.ts | 2 +- packages/kbn-logging/src/ecs/destination.ts | 2 +- packages/kbn-logging/src/ecs/dll.ts | 2 +- packages/kbn-logging/src/ecs/dns.ts | 2 +- packages/kbn-logging/src/ecs/elf.ts | 2 +- packages/kbn-logging/src/ecs/error.ts | 2 +- packages/kbn-logging/src/ecs/event.ts | 2 +- packages/kbn-logging/src/ecs/file.ts | 2 +- packages/kbn-logging/src/ecs/geo.ts | 2 +- packages/kbn-logging/src/ecs/group.ts | 2 +- packages/kbn-logging/src/ecs/hash.ts | 2 +- packages/kbn-logging/src/ecs/host.ts | 2 +- packages/kbn-logging/src/ecs/http.ts | 2 +- packages/kbn-logging/src/ecs/index.ts | 6 +++--- packages/kbn-logging/src/ecs/interface.ts | 2 +- packages/kbn-logging/src/ecs/log.ts | 2 +- packages/kbn-logging/src/ecs/network.ts | 2 +- packages/kbn-logging/src/ecs/observer.ts | 2 +- packages/kbn-logging/src/ecs/orchestrator.ts | 2 +- packages/kbn-logging/src/ecs/organization.ts | 2 +- packages/kbn-logging/src/ecs/os.ts | 2 +- packages/kbn-logging/src/ecs/package.ts | 2 +- packages/kbn-logging/src/ecs/pe.ts | 2 +- packages/kbn-logging/src/ecs/process.ts | 2 +- packages/kbn-logging/src/ecs/registry.ts | 2 +- packages/kbn-logging/src/ecs/related.ts | 2 +- packages/kbn-logging/src/ecs/rule.ts | 2 +- packages/kbn-logging/src/ecs/server.ts | 2 +- packages/kbn-logging/src/ecs/service.ts | 2 +- packages/kbn-logging/src/ecs/source.ts | 2 +- packages/kbn-logging/src/ecs/threat.ts | 2 +- packages/kbn-logging/src/ecs/tls.ts | 2 +- packages/kbn-logging/src/ecs/tracing.ts | 2 +- packages/kbn-logging/src/ecs/url.ts | 2 +- packages/kbn-logging/src/ecs/user.ts | 2 +- packages/kbn-logging/src/ecs/user_agent.ts | 2 +- packages/kbn-logging/src/ecs/vlan.ts | 2 +- packages/kbn-logging/src/ecs/vulnerability.ts | 2 +- packages/kbn-logging/src/ecs/x509.ts | 2 +- .../__snapshots__/logging_system.test.ts.snap | 10 +++++----- .../layouts/__snapshots__/json_layout.test.ts.snap | 12 ++++++------ src/core/server/logging/layouts/json_layout.test.ts | 2 +- src/core/server/logging/layouts/json_layout.ts | 2 +- 50 files changed, 61 insertions(+), 61 deletions(-) diff --git a/packages/kbn-logging/src/ecs/agent.ts b/packages/kbn-logging/src/ecs/agent.ts index fc01fc649d266..711880d5989af 100644 --- a/packages/kbn-logging/src/ecs/agent.ts +++ b/packages/kbn-logging/src/ecs/agent.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-agent.html + * https://www.elastic.co/guide/en/ecs/master/ecs-agent.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/autonomous_system.ts b/packages/kbn-logging/src/ecs/autonomous_system.ts index 5e59cb84e198b..ca9841bd4d7a7 100644 --- a/packages/kbn-logging/src/ecs/autonomous_system.ts +++ b/packages/kbn-logging/src/ecs/autonomous_system.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-as.html + * https://www.elastic.co/guide/en/ecs/master/ecs-as.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/base.ts b/packages/kbn-logging/src/ecs/base.ts index 95c67623869f5..382770f6a59de 100644 --- a/packages/kbn-logging/src/ecs/base.ts +++ b/packages/kbn-logging/src/ecs/base.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-base.html + * https://www.elastic.co/guide/en/ecs/master/ecs-base.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/client.ts b/packages/kbn-logging/src/ecs/client.ts index ef4b227593e62..5597ee8080060 100644 --- a/packages/kbn-logging/src/ecs/client.ts +++ b/packages/kbn-logging/src/ecs/client.ts @@ -17,7 +17,7 @@ interface NestedFields { } /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-client.html + * https://www.elastic.co/guide/en/ecs/master/ecs-client.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/cloud.ts b/packages/kbn-logging/src/ecs/cloud.ts index 803fc63bef216..55f43a523cced 100644 --- a/packages/kbn-logging/src/ecs/cloud.ts +++ b/packages/kbn-logging/src/ecs/cloud.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-cloud.html + * https://www.elastic.co/guide/en/ecs/master/ecs-cloud.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/code_signature.ts b/packages/kbn-logging/src/ecs/code_signature.ts index e2e5eaf5c89af..ead0a9dc73570 100644 --- a/packages/kbn-logging/src/ecs/code_signature.ts +++ b/packages/kbn-logging/src/ecs/code_signature.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-code_signature.html + * https://www.elastic.co/guide/en/ecs/master/ecs-code_signature.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/container.ts b/packages/kbn-logging/src/ecs/container.ts index 746b5b917a745..ecd8575f5b75d 100644 --- a/packages/kbn-logging/src/ecs/container.ts +++ b/packages/kbn-logging/src/ecs/container.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-container.html + * https://www.elastic.co/guide/en/ecs/master/ecs-container.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/data_stream.ts b/packages/kbn-logging/src/ecs/data_stream.ts index fae0a30f69cc4..1f941e3ec5f9d 100644 --- a/packages/kbn-logging/src/ecs/data_stream.ts +++ b/packages/kbn-logging/src/ecs/data_stream.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-data_stream.html + * https://www.elastic.co/guide/en/ecs/master/ecs-data_stream.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/destination.ts b/packages/kbn-logging/src/ecs/destination.ts index 00473da4a1e78..7c2facd3dc2f9 100644 --- a/packages/kbn-logging/src/ecs/destination.ts +++ b/packages/kbn-logging/src/ecs/destination.ts @@ -17,7 +17,7 @@ interface NestedFields { } /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-destination.html + * https://www.elastic.co/guide/en/ecs/master/ecs-destination.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/dll.ts b/packages/kbn-logging/src/ecs/dll.ts index 2983361f753e7..3440afa9cfad2 100644 --- a/packages/kbn-logging/src/ecs/dll.ts +++ b/packages/kbn-logging/src/ecs/dll.ts @@ -17,7 +17,7 @@ interface NestedFields { } /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-dll.html + * https://www.elastic.co/guide/en/ecs/master/ecs-dll.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/dns.ts b/packages/kbn-logging/src/ecs/dns.ts index c45f8f6b91fc5..b271999295fe7 100644 --- a/packages/kbn-logging/src/ecs/dns.ts +++ b/packages/kbn-logging/src/ecs/dns.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-dns.html + * https://www.elastic.co/guide/en/ecs/master/ecs-dns.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/elf.ts b/packages/kbn-logging/src/ecs/elf.ts index a1cb2a85038e6..6b2588c63ffaa 100644 --- a/packages/kbn-logging/src/ecs/elf.ts +++ b/packages/kbn-logging/src/ecs/elf.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-elf.html + * https://www.elastic.co/guide/en/ecs/master/ecs-elf.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/error.ts b/packages/kbn-logging/src/ecs/error.ts index a48b03075d469..ad5373b1bfea7 100644 --- a/packages/kbn-logging/src/ecs/error.ts +++ b/packages/kbn-logging/src/ecs/error.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-error.html + * https://www.elastic.co/guide/en/ecs/master/ecs-error.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/event.ts b/packages/kbn-logging/src/ecs/event.ts index 2baf320de8db4..ab4aed15c87e4 100644 --- a/packages/kbn-logging/src/ecs/event.ts +++ b/packages/kbn-logging/src/ecs/event.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-event.html + * https://www.elastic.co/guide/en/ecs/master/ecs-event.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/file.ts b/packages/kbn-logging/src/ecs/file.ts index dbd1653e21190..e406a4f8b1664 100644 --- a/packages/kbn-logging/src/ecs/file.ts +++ b/packages/kbn-logging/src/ecs/file.ts @@ -21,7 +21,7 @@ interface NestedFields { } /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-file.html + * https://www.elastic.co/guide/en/ecs/master/ecs-file.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/geo.ts b/packages/kbn-logging/src/ecs/geo.ts index 2373f4f119dfc..3189e1a5557e3 100644 --- a/packages/kbn-logging/src/ecs/geo.ts +++ b/packages/kbn-logging/src/ecs/geo.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-geo.html + * https://www.elastic.co/guide/en/ecs/master/ecs-geo.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/group.ts b/packages/kbn-logging/src/ecs/group.ts index c0d007d3bea0a..fe91ce82b64cb 100644 --- a/packages/kbn-logging/src/ecs/group.ts +++ b/packages/kbn-logging/src/ecs/group.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-group.html + * https://www.elastic.co/guide/en/ecs/master/ecs-group.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/hash.ts b/packages/kbn-logging/src/ecs/hash.ts index fcf134349d7a4..ead7fc012df81 100644 --- a/packages/kbn-logging/src/ecs/hash.ts +++ b/packages/kbn-logging/src/ecs/hash.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-hash.html + * https://www.elastic.co/guide/en/ecs/master/ecs-hash.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/host.ts b/packages/kbn-logging/src/ecs/host.ts index 6c5046ef458e2..7cbb06c34ea59 100644 --- a/packages/kbn-logging/src/ecs/host.ts +++ b/packages/kbn-logging/src/ecs/host.ts @@ -18,7 +18,7 @@ interface NestedFields { } /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-host.html + * https://www.elastic.co/guide/en/ecs/master/ecs-host.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/http.ts b/packages/kbn-logging/src/ecs/http.ts index 914e35c0f1fd7..809ad19fd6a79 100644 --- a/packages/kbn-logging/src/ecs/http.ts +++ b/packages/kbn-logging/src/ecs/http.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-http.html + * https://www.elastic.co/guide/en/ecs/master/ecs-http.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/index.ts b/packages/kbn-logging/src/ecs/index.ts index 613945d22ad80..08a363ab70275 100644 --- a/packages/kbn-logging/src/ecs/index.ts +++ b/packages/kbn-logging/src/ecs/index.ts @@ -48,13 +48,13 @@ export { EcsEventCategory, EcsEventKind, EcsEventOutcome, EcsEventType } from '. interface EcsField { /** - * These typings were written as of ECS 1.12.0. + * These typings were written as of ECS 8.0.0. * Don't change this value without checking the rest * of the types to conform to that ECS version. * - * https://www.elastic.co/guide/en/ecs/1.12/index.html + * https://www.elastic.co/guide/en/ecs/master/index.html */ - version: '1.12.0'; + version: '8.0.0'; } /** diff --git a/packages/kbn-logging/src/ecs/interface.ts b/packages/kbn-logging/src/ecs/interface.ts index 80c00fe8d8a12..e1129b60efd24 100644 --- a/packages/kbn-logging/src/ecs/interface.ts +++ b/packages/kbn-logging/src/ecs/interface.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-interface.html + * https://www.elastic.co/guide/en/ecs/master/ecs-interface.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/log.ts b/packages/kbn-logging/src/ecs/log.ts index e55915094e528..33d28180889a4 100644 --- a/packages/kbn-logging/src/ecs/log.ts +++ b/packages/kbn-logging/src/ecs/log.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-log.html + * https://www.elastic.co/guide/en/ecs/master/ecs-log.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/network.ts b/packages/kbn-logging/src/ecs/network.ts index 6d00aa10a9968..c736cdeec248a 100644 --- a/packages/kbn-logging/src/ecs/network.ts +++ b/packages/kbn-logging/src/ecs/network.ts @@ -14,7 +14,7 @@ interface NestedFields { } /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-network.html + * https://www.elastic.co/guide/en/ecs/master/ecs-network.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/observer.ts b/packages/kbn-logging/src/ecs/observer.ts index 89e1cbb59880c..77627eed7a6bf 100644 --- a/packages/kbn-logging/src/ecs/observer.ts +++ b/packages/kbn-logging/src/ecs/observer.ts @@ -29,7 +29,7 @@ interface NestedIngressFields { } /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-observer.html + * https://www.elastic.co/guide/en/ecs/master/ecs-observer.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/orchestrator.ts b/packages/kbn-logging/src/ecs/orchestrator.ts index ac92006091a93..bfc9656f869c6 100644 --- a/packages/kbn-logging/src/ecs/orchestrator.ts +++ b/packages/kbn-logging/src/ecs/orchestrator.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-orchestrator.html + * https://www.elastic.co/guide/en/ecs/master/ecs-orchestrator.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/organization.ts b/packages/kbn-logging/src/ecs/organization.ts index e9274f864b7d2..e42e04a33e0bc 100644 --- a/packages/kbn-logging/src/ecs/organization.ts +++ b/packages/kbn-logging/src/ecs/organization.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-organization.html + * https://www.elastic.co/guide/en/ecs/master/ecs-organization.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/os.ts b/packages/kbn-logging/src/ecs/os.ts index 76690bffaf69f..f0fda34606dcc 100644 --- a/packages/kbn-logging/src/ecs/os.ts +++ b/packages/kbn-logging/src/ecs/os.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-os.html + * https://www.elastic.co/guide/en/ecs/master/ecs-os.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/package.ts b/packages/kbn-logging/src/ecs/package.ts index f0e75b3cd2753..fce1415d08c4b 100644 --- a/packages/kbn-logging/src/ecs/package.ts +++ b/packages/kbn-logging/src/ecs/package.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-package.html + * https://www.elastic.co/guide/en/ecs/master/ecs-package.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/pe.ts b/packages/kbn-logging/src/ecs/pe.ts index c017dfa87fb23..53a21ce7662ce 100644 --- a/packages/kbn-logging/src/ecs/pe.ts +++ b/packages/kbn-logging/src/ecs/pe.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-pe.html + * https://www.elastic.co/guide/en/ecs/master/ecs-pe.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/process.ts b/packages/kbn-logging/src/ecs/process.ts index 4e527d0b21d4c..8b2dccca9c389 100644 --- a/packages/kbn-logging/src/ecs/process.ts +++ b/packages/kbn-logging/src/ecs/process.ts @@ -21,7 +21,7 @@ interface NestedFields { } /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-process.html + * https://www.elastic.co/guide/en/ecs/master/ecs-process.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/registry.ts b/packages/kbn-logging/src/ecs/registry.ts index 8cc12de6c136e..27042ae552e82 100644 --- a/packages/kbn-logging/src/ecs/registry.ts +++ b/packages/kbn-logging/src/ecs/registry.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-registry.html + * https://www.elastic.co/guide/en/ecs/master/ecs-registry.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/related.ts b/packages/kbn-logging/src/ecs/related.ts index 6616780177d16..d4556bea24d19 100644 --- a/packages/kbn-logging/src/ecs/related.ts +++ b/packages/kbn-logging/src/ecs/related.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-related.html + * https://www.elastic.co/guide/en/ecs/master/ecs-related.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/rule.ts b/packages/kbn-logging/src/ecs/rule.ts index 5a961302de918..144d93b12a42b 100644 --- a/packages/kbn-logging/src/ecs/rule.ts +++ b/packages/kbn-logging/src/ecs/rule.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-rule.html + * https://www.elastic.co/guide/en/ecs/master/ecs-rule.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/server.ts b/packages/kbn-logging/src/ecs/server.ts index 01b2394c6bccc..2d6666925cb99 100644 --- a/packages/kbn-logging/src/ecs/server.ts +++ b/packages/kbn-logging/src/ecs/server.ts @@ -17,7 +17,7 @@ interface NestedFields { } /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-server.html + * https://www.elastic.co/guide/en/ecs/master/ecs-server.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/service.ts b/packages/kbn-logging/src/ecs/service.ts index 04cff203da961..1d81077f21ed1 100644 --- a/packages/kbn-logging/src/ecs/service.ts +++ b/packages/kbn-logging/src/ecs/service.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-service.html + * https://www.elastic.co/guide/en/ecs/master/ecs-service.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/source.ts b/packages/kbn-logging/src/ecs/source.ts index 2879adb0d996e..10fd3df7efe23 100644 --- a/packages/kbn-logging/src/ecs/source.ts +++ b/packages/kbn-logging/src/ecs/source.ts @@ -17,7 +17,7 @@ interface NestedFields { } /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-source.html + * https://www.elastic.co/guide/en/ecs/master/ecs-source.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/threat.ts b/packages/kbn-logging/src/ecs/threat.ts index 78adf583b0ee2..7c01808a316ba 100644 --- a/packages/kbn-logging/src/ecs/threat.ts +++ b/packages/kbn-logging/src/ecs/threat.ts @@ -23,7 +23,7 @@ interface IndicatorNestedFields { } /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-threat.html + * https://www.elastic.co/guide/en/ecs/master/ecs-threat.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/tls.ts b/packages/kbn-logging/src/ecs/tls.ts index 75667170f6059..a4aa8dce04a98 100644 --- a/packages/kbn-logging/src/ecs/tls.ts +++ b/packages/kbn-logging/src/ecs/tls.ts @@ -17,7 +17,7 @@ interface NestedServerFields { } /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-tls.html + * https://www.elastic.co/guide/en/ecs/master/ecs-tls.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/tracing.ts b/packages/kbn-logging/src/ecs/tracing.ts index ea1ff300e4c3f..05413770ca2d0 100644 --- a/packages/kbn-logging/src/ecs/tracing.ts +++ b/packages/kbn-logging/src/ecs/tracing.ts @@ -12,7 +12,7 @@ * the base fields, we will need to do an intersection with these types at * the root level. * - * https://www.elastic.co/guide/en/ecs/1.12/ecs-tracing.html + * https://www.elastic.co/guide/en/ecs/master/ecs-tracing.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/url.ts b/packages/kbn-logging/src/ecs/url.ts index 069ff6b09aec5..7e4fe59bab4af 100644 --- a/packages/kbn-logging/src/ecs/url.ts +++ b/packages/kbn-logging/src/ecs/url.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-url.html + * https://www.elastic.co/guide/en/ecs/master/ecs-url.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/user.ts b/packages/kbn-logging/src/ecs/user.ts index 6bce3552e23ec..ec6f78473f3e3 100644 --- a/packages/kbn-logging/src/ecs/user.ts +++ b/packages/kbn-logging/src/ecs/user.ts @@ -20,7 +20,7 @@ interface NestedFields { * placed at the root level, but not if it is nested inside another field like * `destination`. A more detailed explanation of these nuances can be found at: * - * https://www.elastic.co/guide/en/ecs/1.12/ecs-user-usage.html + * https://www.elastic.co/guide/en/ecs/master/ecs-user-usage.html * * As a result, we need to export a separate `NestedUser` type to import into * other interfaces internally. This contains the reusable subset of properties diff --git a/packages/kbn-logging/src/ecs/user_agent.ts b/packages/kbn-logging/src/ecs/user_agent.ts index 0ff8aa681d964..b0a97a47eac62 100644 --- a/packages/kbn-logging/src/ecs/user_agent.ts +++ b/packages/kbn-logging/src/ecs/user_agent.ts @@ -13,7 +13,7 @@ interface NestedFields { } /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-user_agent.html + * https://www.elastic.co/guide/en/ecs/master/ecs-user_agent.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/vlan.ts b/packages/kbn-logging/src/ecs/vlan.ts index a2939380ea57f..e2a45f30cb484 100644 --- a/packages/kbn-logging/src/ecs/vlan.ts +++ b/packages/kbn-logging/src/ecs/vlan.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-vlan.html + * https://www.elastic.co/guide/en/ecs/master/ecs-vlan.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/vulnerability.ts b/packages/kbn-logging/src/ecs/vulnerability.ts index a3648a9c5df17..6dec07ff5874f 100644 --- a/packages/kbn-logging/src/ecs/vulnerability.ts +++ b/packages/kbn-logging/src/ecs/vulnerability.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-vulnerability.html + * https://www.elastic.co/guide/en/ecs/master/ecs-vulnerability.html * * @internal */ diff --git a/packages/kbn-logging/src/ecs/x509.ts b/packages/kbn-logging/src/ecs/x509.ts index a38fb93585c83..1b5b9f194923f 100644 --- a/packages/kbn-logging/src/ecs/x509.ts +++ b/packages/kbn-logging/src/ecs/x509.ts @@ -7,7 +7,7 @@ */ /** - * https://www.elastic.co/guide/en/ecs/1.12/ecs-x509.html + * https://www.elastic.co/guide/en/ecs/master/ecs-x509.html * * @internal */ diff --git a/src/core/server/logging/__snapshots__/logging_system.test.ts.snap b/src/core/server/logging/__snapshots__/logging_system.test.ts.snap index 851cfd6cf3bcc..49035cdda3915 100644 --- a/src/core/server/logging/__snapshots__/logging_system.test.ts.snap +++ b/src/core/server/logging/__snapshots__/logging_system.test.ts.snap @@ -16,7 +16,7 @@ exports[`asLoggerFactory() only allows to create new loggers. 1`] = ` Object { "@timestamp": "2012-01-30T22:33:22.011-05:00", "ecs": Object { - "version": "1.12.0", + "version": "8.0.0", }, "log": Object { "level": "TRACE", @@ -33,7 +33,7 @@ exports[`asLoggerFactory() only allows to create new loggers. 2`] = ` Object { "@timestamp": "2012-01-30T17:33:22.011-05:00", "ecs": Object { - "version": "1.12.0", + "version": "8.0.0", }, "log": Object { "level": "INFO", @@ -51,7 +51,7 @@ exports[`asLoggerFactory() only allows to create new loggers. 3`] = ` Object { "@timestamp": "2012-01-30T12:33:22.011-05:00", "ecs": Object { - "version": "1.12.0", + "version": "8.0.0", }, "log": Object { "level": "FATAL", @@ -68,7 +68,7 @@ exports[`flushes memory buffer logger and switches to real logger once config is Object { "@timestamp": "2012-02-01T09:33:22.011-05:00", "ecs": Object { - "version": "1.12.0", + "version": "8.0.0", }, "log": Object { "level": "INFO", @@ -86,7 +86,7 @@ exports[`flushes memory buffer logger and switches to real logger once config is Object { "@timestamp": "2012-01-31T23:33:22.011-05:00", "ecs": Object { - "version": "1.12.0", + "version": "8.0.0", }, "log": Object { "level": "INFO", diff --git a/src/core/server/logging/layouts/__snapshots__/json_layout.test.ts.snap b/src/core/server/logging/layouts/__snapshots__/json_layout.test.ts.snap index e128651e61b40..abd1fda0f9338 100644 --- a/src/core/server/logging/layouts/__snapshots__/json_layout.test.ts.snap +++ b/src/core/server/logging/layouts/__snapshots__/json_layout.test.ts.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`\`format()\` correctly formats record. 1`] = `"{\\"ecs\\":{\\"version\\":\\"1.12.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-1\\",\\"error\\":{\\"message\\":\\"Some error message\\",\\"type\\":\\"Some error name\\",\\"stack_trace\\":\\"Some error stack\\"},\\"log\\":{\\"level\\":\\"FATAL\\",\\"logger\\":\\"context-1\\"},\\"process\\":{\\"pid\\":5355}}"`; +exports[`\`format()\` correctly formats record. 1`] = `"{\\"ecs\\":{\\"version\\":\\"8.0.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-1\\",\\"error\\":{\\"message\\":\\"Some error message\\",\\"type\\":\\"Some error name\\",\\"stack_trace\\":\\"Some error stack\\"},\\"log\\":{\\"level\\":\\"FATAL\\",\\"logger\\":\\"context-1\\"},\\"process\\":{\\"pid\\":5355}}"`; -exports[`\`format()\` correctly formats record. 2`] = `"{\\"ecs\\":{\\"version\\":\\"1.12.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-2\\",\\"log\\":{\\"level\\":\\"ERROR\\",\\"logger\\":\\"context-2\\"},\\"process\\":{\\"pid\\":5355}}"`; +exports[`\`format()\` correctly formats record. 2`] = `"{\\"ecs\\":{\\"version\\":\\"8.0.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-2\\",\\"log\\":{\\"level\\":\\"ERROR\\",\\"logger\\":\\"context-2\\"},\\"process\\":{\\"pid\\":5355}}"`; -exports[`\`format()\` correctly formats record. 3`] = `"{\\"ecs\\":{\\"version\\":\\"1.12.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-3\\",\\"log\\":{\\"level\\":\\"WARN\\",\\"logger\\":\\"context-3\\"},\\"process\\":{\\"pid\\":5355}}"`; +exports[`\`format()\` correctly formats record. 3`] = `"{\\"ecs\\":{\\"version\\":\\"8.0.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-3\\",\\"log\\":{\\"level\\":\\"WARN\\",\\"logger\\":\\"context-3\\"},\\"process\\":{\\"pid\\":5355}}"`; -exports[`\`format()\` correctly formats record. 4`] = `"{\\"ecs\\":{\\"version\\":\\"1.12.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-4\\",\\"log\\":{\\"level\\":\\"DEBUG\\",\\"logger\\":\\"context-4\\"},\\"process\\":{\\"pid\\":5355}}"`; +exports[`\`format()\` correctly formats record. 4`] = `"{\\"ecs\\":{\\"version\\":\\"8.0.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-4\\",\\"log\\":{\\"level\\":\\"DEBUG\\",\\"logger\\":\\"context-4\\"},\\"process\\":{\\"pid\\":5355}}"`; -exports[`\`format()\` correctly formats record. 5`] = `"{\\"ecs\\":{\\"version\\":\\"1.12.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-5\\",\\"log\\":{\\"level\\":\\"INFO\\",\\"logger\\":\\"context-5\\"},\\"process\\":{\\"pid\\":5355}}"`; +exports[`\`format()\` correctly formats record. 5`] = `"{\\"ecs\\":{\\"version\\":\\"8.0.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-5\\",\\"log\\":{\\"level\\":\\"INFO\\",\\"logger\\":\\"context-5\\"},\\"process\\":{\\"pid\\":5355}}"`; -exports[`\`format()\` correctly formats record. 6`] = `"{\\"ecs\\":{\\"version\\":\\"1.12.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-6\\",\\"log\\":{\\"level\\":\\"TRACE\\",\\"logger\\":\\"context-6\\"},\\"process\\":{\\"pid\\":5355}}"`; +exports[`\`format()\` correctly formats record. 6`] = `"{\\"ecs\\":{\\"version\\":\\"8.0.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-6\\",\\"log\\":{\\"level\\":\\"TRACE\\",\\"logger\\":\\"context-6\\"},\\"process\\":{\\"pid\\":5355}}"`; diff --git a/src/core/server/logging/layouts/json_layout.test.ts b/src/core/server/logging/layouts/json_layout.test.ts index 034e2abf46461..fac27b616eec5 100644 --- a/src/core/server/logging/layouts/json_layout.test.ts +++ b/src/core/server/logging/layouts/json_layout.test.ts @@ -94,7 +94,7 @@ test('`format()` correctly formats record with meta-data and correct ECS version }) ) ).toStrictEqual({ - ecs: { version: '1.12.0' }, + ecs: { version: '8.0.0' }, '@timestamp': '2012-02-01T09:30:22.011-05:00', log: { level: 'DEBUG', diff --git a/src/core/server/logging/layouts/json_layout.ts b/src/core/server/logging/layouts/json_layout.ts index 820ed32045f15..f0717f49a6b15 100644 --- a/src/core/server/logging/layouts/json_layout.ts +++ b/src/core/server/logging/layouts/json_layout.ts @@ -43,7 +43,7 @@ export class JsonLayout implements Layout { public format(record: LogRecord): string { const log: Ecs = { - ecs: { version: '1.12.0' }, + ecs: { version: '8.0.0' }, '@timestamp': moment(record.timestamp).format('YYYY-MM-DDTHH:mm:ss.SSSZ'), message: record.message, error: JsonLayout.errorToSerializableObject(record.error), From b799b1c92accaa3d729d522fdacf1544fd74b9c1 Mon Sep 17 00:00:00 2001 From: Luke Elmers Date: Fri, 1 Oct 2021 12:35:51 -0600 Subject: [PATCH 2/5] Remove host.user.* fields per https://github.com/elastic/ecs/pull/1439. --- packages/kbn-logging/src/ecs/host.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/kbn-logging/src/ecs/host.ts b/packages/kbn-logging/src/ecs/host.ts index 7cbb06c34ea59..2c5563120806a 100644 --- a/packages/kbn-logging/src/ecs/host.ts +++ b/packages/kbn-logging/src/ecs/host.ts @@ -8,13 +8,10 @@ import { EcsGeo } from './geo'; import { EcsOs } from './os'; -import { EcsNestedUser } from './user'; interface NestedFields { geo?: EcsGeo; os?: EcsOs; - /** @deprecated */ - user?: EcsNestedUser; } /** From a4ab2f3950c59905d1849a85803e3d208ee565d5 Mon Sep 17 00:00:00 2001 From: Luke Elmers Date: Fri, 1 Oct 2021 12:38:39 -0600 Subject: [PATCH 3/5] Remove log.original field per https://github.com/elastic/ecs/pull/1580. --- packages/kbn-logging/src/ecs/log.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/kbn-logging/src/ecs/log.ts b/packages/kbn-logging/src/ecs/log.ts index 33d28180889a4..4f796d25fa407 100644 --- a/packages/kbn-logging/src/ecs/log.ts +++ b/packages/kbn-logging/src/ecs/log.ts @@ -16,8 +16,6 @@ export interface EcsLog { level?: string; logger?: string; origin?: Origin; - /** @deprecated - use `event.original` instead */ - original?: string; syslog?: Syslog; } From 9aa8e464a941d4898ea7af91019a9a8ba2f2cce6 Mon Sep 17 00:00:00 2001 From: Luke Elmers Date: Fri, 1 Oct 2021 12:40:26 -0600 Subject: [PATCH 4/5] Remove process.ppid field per https://github.com/elastic/ecs/pull/1596. --- packages/kbn-logging/src/ecs/process.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/kbn-logging/src/ecs/process.ts b/packages/kbn-logging/src/ecs/process.ts index 8b2dccca9c389..317d50453d9d5 100644 --- a/packages/kbn-logging/src/ecs/process.ts +++ b/packages/kbn-logging/src/ecs/process.ts @@ -36,7 +36,6 @@ export interface EcsProcess extends NestedFields { name?: string; pgid?: number; pid?: number; - ppid?: number; start?: string; title?: string; uptime?: number; From 54e7a9d5b16b8a0a535b8051b5345827229db8a2 Mon Sep 17 00:00:00 2001 From: Luke Elmers Date: Tue, 5 Oct 2021 13:19:16 -0600 Subject: [PATCH 5/5] Remove ecs version from json layout snapshots. --- .../__snapshots__/json_layout.test.ts.snap | 89 +++++++++++++++++-- .../logging/layouts/json_layout.test.ts | 10 ++- 2 files changed, 89 insertions(+), 10 deletions(-) diff --git a/src/core/server/logging/layouts/__snapshots__/json_layout.test.ts.snap b/src/core/server/logging/layouts/__snapshots__/json_layout.test.ts.snap index abd1fda0f9338..48bbb19447411 100644 --- a/src/core/server/logging/layouts/__snapshots__/json_layout.test.ts.snap +++ b/src/core/server/logging/layouts/__snapshots__/json_layout.test.ts.snap @@ -1,13 +1,90 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`\`format()\` correctly formats record. 1`] = `"{\\"ecs\\":{\\"version\\":\\"8.0.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-1\\",\\"error\\":{\\"message\\":\\"Some error message\\",\\"type\\":\\"Some error name\\",\\"stack_trace\\":\\"Some error stack\\"},\\"log\\":{\\"level\\":\\"FATAL\\",\\"logger\\":\\"context-1\\"},\\"process\\":{\\"pid\\":5355}}"`; +exports[`\`format()\` correctly formats record and includes correct ECS version. 1`] = ` +Object { + "@timestamp": "2012-02-01T09:30:22.011-05:00", + "error": Object { + "message": "Some error message", + "stack_trace": "Some error stack", + "type": "Some error name", + }, + "log": Object { + "level": "FATAL", + "logger": "context-1", + }, + "message": "message-1", + "process": Object { + "pid": 5355, + }, +} +`; -exports[`\`format()\` correctly formats record. 2`] = `"{\\"ecs\\":{\\"version\\":\\"8.0.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-2\\",\\"log\\":{\\"level\\":\\"ERROR\\",\\"logger\\":\\"context-2\\"},\\"process\\":{\\"pid\\":5355}}"`; +exports[`\`format()\` correctly formats record and includes correct ECS version. 2`] = ` +Object { + "@timestamp": "2012-02-01T09:30:22.011-05:00", + "log": Object { + "level": "ERROR", + "logger": "context-2", + }, + "message": "message-2", + "process": Object { + "pid": 5355, + }, +} +`; -exports[`\`format()\` correctly formats record. 3`] = `"{\\"ecs\\":{\\"version\\":\\"8.0.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-3\\",\\"log\\":{\\"level\\":\\"WARN\\",\\"logger\\":\\"context-3\\"},\\"process\\":{\\"pid\\":5355}}"`; +exports[`\`format()\` correctly formats record and includes correct ECS version. 3`] = ` +Object { + "@timestamp": "2012-02-01T09:30:22.011-05:00", + "log": Object { + "level": "WARN", + "logger": "context-3", + }, + "message": "message-3", + "process": Object { + "pid": 5355, + }, +} +`; -exports[`\`format()\` correctly formats record. 4`] = `"{\\"ecs\\":{\\"version\\":\\"8.0.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-4\\",\\"log\\":{\\"level\\":\\"DEBUG\\",\\"logger\\":\\"context-4\\"},\\"process\\":{\\"pid\\":5355}}"`; +exports[`\`format()\` correctly formats record and includes correct ECS version. 4`] = ` +Object { + "@timestamp": "2012-02-01T09:30:22.011-05:00", + "log": Object { + "level": "DEBUG", + "logger": "context-4", + }, + "message": "message-4", + "process": Object { + "pid": 5355, + }, +} +`; -exports[`\`format()\` correctly formats record. 5`] = `"{\\"ecs\\":{\\"version\\":\\"8.0.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-5\\",\\"log\\":{\\"level\\":\\"INFO\\",\\"logger\\":\\"context-5\\"},\\"process\\":{\\"pid\\":5355}}"`; +exports[`\`format()\` correctly formats record and includes correct ECS version. 5`] = ` +Object { + "@timestamp": "2012-02-01T09:30:22.011-05:00", + "log": Object { + "level": "INFO", + "logger": "context-5", + }, + "message": "message-5", + "process": Object { + "pid": 5355, + }, +} +`; -exports[`\`format()\` correctly formats record. 6`] = `"{\\"ecs\\":{\\"version\\":\\"8.0.0\\"},\\"@timestamp\\":\\"2012-02-01T09:30:22.011-05:00\\",\\"message\\":\\"message-6\\",\\"log\\":{\\"level\\":\\"TRACE\\",\\"logger\\":\\"context-6\\"},\\"process\\":{\\"pid\\":5355}}"`; +exports[`\`format()\` correctly formats record and includes correct ECS version. 6`] = ` +Object { + "@timestamp": "2012-02-01T09:30:22.011-05:00", + "log": Object { + "level": "TRACE", + "logger": "context-6", + }, + "message": "message-6", + "process": Object { + "pid": 5355, + }, +} +`; diff --git a/src/core/server/logging/layouts/json_layout.test.ts b/src/core/server/logging/layouts/json_layout.test.ts index fac27b616eec5..56184ebd67aee 100644 --- a/src/core/server/logging/layouts/json_layout.test.ts +++ b/src/core/server/logging/layouts/json_layout.test.ts @@ -66,15 +66,17 @@ test('`createConfigSchema()` creates correct schema.', () => { expect(layoutSchema.validate({ type: 'json' })).toEqual({ type: 'json' }); }); -test('`format()` correctly formats record.', () => { +test('`format()` correctly formats record and includes correct ECS version.', () => { const layout = new JsonLayout(); for (const record of records) { - expect(layout.format(record)).toMatchSnapshot(); + const { ecs, ...restOfRecord } = JSON.parse(layout.format(record)); + expect(ecs).toStrictEqual({ version: '8.0.0' }); + expect(restOfRecord).toMatchSnapshot(); } }); -test('`format()` correctly formats record with meta-data and correct ECS version', () => { +test('`format()` correctly formats record with meta-data', () => { const layout = new JsonLayout(); expect( @@ -94,7 +96,7 @@ test('`format()` correctly formats record with meta-data and correct ECS version }) ) ).toStrictEqual({ - ecs: { version: '8.0.0' }, + ecs: { version: expect.any(String) }, '@timestamp': '2012-02-01T09:30:22.011-05:00', log: { level: 'DEBUG',