|
1 | 1 | { |
2 | | - "version": 1.0, |
3 | | - "url": "https://www.elastic.co/guide/en/ecs/current/index.html", |
4 | | - "ecs": { |
5 | | - "version": "1.x" |
6 | | - }, |
7 | | - "fields": { |
8 | | - "@timestamp": { |
9 | | - "type": "datetime", |
10 | | - "required": true, |
11 | | - "index": 0, |
12 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-base.html" |
13 | | - }, |
14 | | - "log.level": { |
15 | | - "type": "string", |
16 | | - "required": true, |
17 | | - "index": 1, |
18 | | - "top_level_field": true, |
19 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-log.html", |
20 | | - "comment": [ |
21 | | - "This field SHOULD NOT be a nested object field but at the top level with a dot in the property name.", |
22 | | - "This is to make the JSON logs more human-readable.", |
23 | | - "Loggers MAY indent the log level so that the `message` field always starts at the exact same offset,", |
24 | | - "no matter the number of characters the log level has.", |
25 | | - "For example: `'DEBUG'` (5 chars) will not be indented, whereas ` 'WARN'` (4 chars) will be indented by one space character." |
26 | | - ] |
27 | | - }, |
28 | | - "message": { |
29 | | - "type": "string", |
30 | | - "required": true, |
31 | | - "index": 2, |
32 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-base.html" |
33 | | - }, |
34 | | - "ecs.version": { |
35 | | - "type": "string", |
36 | | - "required": true, |
37 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-ecs.html" |
38 | | - }, |
39 | | - "labels": { |
40 | | - "type": "object", |
41 | | - "required": false, |
42 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-base.html", |
43 | | - "sanitization": { |
44 | | - "key": { |
45 | | - "replacements": [".", "*", "\\"], |
46 | | - "substitute": "_" |
| 2 | + "version": 1.0, |
| 3 | + "url": "https://www.elastic.co/guide/en/ecs/current/index.html", |
| 4 | + "ecs": { |
| 5 | + "version": "1.x" |
| 6 | + }, |
| 7 | + "fields": { |
| 8 | + "@timestamp": { |
| 9 | + "type": "datetime", |
| 10 | + "required": true, |
| 11 | + "index": 0, |
| 12 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-base.html", |
| 13 | + "comment": [ |
| 14 | + "Field order, as specified by 'index', is RECOMMENDED.", |
| 15 | + "ECS loggers must implement field order unless the logging framework makes that impossible." |
| 16 | + ] |
| 17 | + }, |
| 18 | + "log.level": { |
| 19 | + "type": "string", |
| 20 | + "required": true, |
| 21 | + "index": 1, |
| 22 | + "top_level_field": true, |
| 23 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-log.html", |
| 24 | + "comment": [ |
| 25 | + "This field SHOULD NOT be a nested object field but at the top level with a dot in the property name.", |
| 26 | + "This is to make the JSON logs more human-readable.", |
| 27 | + "Loggers MAY indent the log level so that the `message` field always starts at the exact same offset,", |
| 28 | + "no matter the number of characters the log level has.", |
| 29 | + "For example: `'DEBUG'` (5 chars) will not be indented, whereas ` 'WARN'` (4 chars) will be indented by one space character." |
| 30 | + ] |
| 31 | + }, |
| 32 | + "message": { |
| 33 | + "type": "string", |
| 34 | + "required": false, |
| 35 | + "index": 2, |
| 36 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-base.html", |
| 37 | + "comment": [ |
| 38 | + "A message field is typically included in all log records, but some logging libraries allow records with no message.", |
| 39 | + "That's typically the case for libraries that allow for structured logging." |
| 40 | + ] |
| 41 | + }, |
| 42 | + "ecs.version": { |
| 43 | + "type": "string", |
| 44 | + "required": true, |
| 45 | + "top_level_field": true, |
| 46 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-ecs.html", |
| 47 | + "comment": [ |
| 48 | + "This field SHOULD NOT be a nested object field but at the top level with a dot in the property name.", |
| 49 | + "This is to make the JSON logs more human-readable." |
| 50 | + ] |
| 51 | + }, |
| 52 | + "labels": { |
| 53 | + "type": "object", |
| 54 | + "required": false, |
| 55 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-base.html", |
| 56 | + "sanitization": { |
| 57 | + "key": { |
| 58 | + "replacements": [".", "*", "\\"], |
| 59 | + "substitute": "_" |
| 60 | + } |
| 61 | + } |
| 62 | + }, |
| 63 | + "trace.id": { |
| 64 | + "type": "string", |
| 65 | + "required": false, |
| 66 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-tracing.html", |
| 67 | + "comment": "When APM agents add this field to the context, ecs loggers should pick it up and add it to the log event." |
| 68 | + }, |
| 69 | + "transaction.id": { |
| 70 | + "type": "string", |
| 71 | + "required": false, |
| 72 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-tracing.html", |
| 73 | + "comment": "When APM agents add this field to the context, ecs loggers should pick it up and add it to the log event." |
| 74 | + }, |
| 75 | + "service.name": { |
| 76 | + "type": "string", |
| 77 | + "required": false, |
| 78 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-service.html", |
| 79 | + "comment": [ |
| 80 | + "Configurable by users.", |
| 81 | + "When an APM agent is active, it should auto-configure this field if not already set." |
| 82 | + ] |
| 83 | + }, |
| 84 | + "service.node.name": { |
| 85 | + "type": "string", |
| 86 | + "required": false, |
| 87 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-service.html", |
| 88 | + "comment": [ |
| 89 | + "Configurable by users.", |
| 90 | + "When an APM agent is active and `service_node_name` is manually configured, the agent should auto-configure this field if not already set." |
| 91 | + ] |
| 92 | + }, |
| 93 | + "service.version": { |
| 94 | + "type": "string", |
| 95 | + "required": false, |
| 96 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-service.html#field-service-version", |
| 97 | + "comment": [ |
| 98 | + "Configurable by users.", |
| 99 | + "When an APM agent is active, it should auto-configure it if not already set." |
| 100 | + ] |
| 101 | + }, |
| 102 | + "event.dataset": { |
| 103 | + "type": "string", |
| 104 | + "required": false, |
| 105 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-event.html", |
| 106 | + "default": "${service.name} OR ${service.name}.${appender.name}", |
| 107 | + "comment": [ |
| 108 | + "Configurable by users.", |
| 109 | + "If the user manually configures the service name,", |
| 110 | + "the logging library should set `event.dataset=${service.name}` if not explicitly configured otherwise.", |
| 111 | + "", |
| 112 | + "When agents auto-configure the app to use an ECS logger,", |
| 113 | + "they should set `event.dataset=${service.name}.${appender.name}` if the appender name is available in the logging library.", |
| 114 | + "Otherwise, agents should also set `event.dataset=${service.name}`", |
| 115 | + "", |
| 116 | + "The field helps to filter for different log streams from the same pod, for example and is required for log anomaly detection." |
| 117 | + ] |
| 118 | + }, |
| 119 | + "service.environment": { |
| 120 | + "type": "string", |
| 121 | + "required": false, |
| 122 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-service.html#field-service-environment", |
| 123 | + "comment": [ |
| 124 | + "Configurable by users.", |
| 125 | + "When an APM agent is active, it should auto-configure it if not already set." |
| 126 | + ] |
| 127 | + }, |
| 128 | + "process.thread.name": { |
| 129 | + "type": "string", |
| 130 | + "required": false, |
| 131 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-process.html" |
| 132 | + }, |
| 133 | + "log.logger": { |
| 134 | + "type": "string", |
| 135 | + "required": false, |
| 136 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-log.html" |
| 137 | + }, |
| 138 | + "log.origin.file.line": { |
| 139 | + "type": "integer", |
| 140 | + "required": false, |
| 141 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-log.html", |
| 142 | + "comment": "Should be opt-in as it requires the logging library to capture a stack trace for each log event." |
| 143 | + }, |
| 144 | + "log.origin.file.name": { |
| 145 | + "type": "string", |
| 146 | + "required": false, |
| 147 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-log.html", |
| 148 | + "comment": "Should be opt-in as it requires the logging library to capture a stack trace for each log event." |
| 149 | + }, |
| 150 | + "log.origin.function": { |
| 151 | + "type": "string", |
| 152 | + "required": false, |
| 153 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-log.html", |
| 154 | + "comment": "Should be opt-in as it requires the logging library to capture a stack trace for each log event." |
| 155 | + }, |
| 156 | + "error.type": { |
| 157 | + "type": "string", |
| 158 | + "required": false, |
| 159 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-error.html", |
| 160 | + "comment": "The exception type or class, such as `java.lang.IllegalArgumentException`." |
| 161 | + }, |
| 162 | + "error.message": { |
| 163 | + "type": "string", |
| 164 | + "required": false, |
| 165 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-error.html", |
| 166 | + "comment": "The message of the exception." |
| 167 | + }, |
| 168 | + "error.stack_trace": { |
| 169 | + "type": "string", |
| 170 | + "required": false, |
| 171 | + "url": "https://www.elastic.co/guide/en/ecs/current/ecs-error.html", |
| 172 | + "comment": "The stack trace of the exception as plain text." |
47 | 173 | } |
48 | | - } |
49 | | - }, |
50 | | - "trace.id": { |
51 | | - "type": "string", |
52 | | - "required": false, |
53 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-tracing.html", |
54 | | - "comment": "When APM agents add this field to the context, ecs loggers should pick it up and add it to the log event." |
55 | | - }, |
56 | | - "transaction.id": { |
57 | | - "type": "string", |
58 | | - "required": false, |
59 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-tracing.html", |
60 | | - "comment": "When APM agents add this field to the context, ecs loggers should pick it up and add it to the log event." |
61 | | - }, |
62 | | - "service.name": { |
63 | | - "type": "string", |
64 | | - "required": false, |
65 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-service.html", |
66 | | - "comment": [ |
67 | | - "Configurable by users.", |
68 | | - "When an APM agent is active, they should auto-configure it if not already set." |
69 | | - ] |
70 | | - }, |
71 | | - "event.dataset": { |
72 | | - "type": "string", |
73 | | - "required": false, |
74 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-event.html", |
75 | | - "default": "${service.name}.log OR ${service.name}.${appender.name}", |
76 | | - "comment": [ |
77 | | - "Configurable by users.", |
78 | | - "If the user manually configures the service name,", |
79 | | - "the logging library should set `event.dataset=${service.name}.log` if not explicitly configured otherwise.", |
80 | | - "", |
81 | | - "When agents auto-configure the app to use an ECS logger,", |
82 | | - "they should set `event.dataset=${service.name}.${appender.name}` if the appender name is available in the logging library.", |
83 | | - "Otherwise, agents should also set `event.dataset=${service.name}.log`", |
84 | | - "", |
85 | | - "The field helps to filter for different log streams from the same pod, for example and is required for log anomaly detection." |
86 | | - ] |
87 | | - }, |
88 | | - "process.thread.name": { |
89 | | - "type": "string", |
90 | | - "required": false, |
91 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-process.html" |
92 | | - }, |
93 | | - "log.logger": { |
94 | | - "type": "string", |
95 | | - "required": false, |
96 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-log.html" |
97 | | - }, |
98 | | - "log.origin.file.line": { |
99 | | - "type": "integer", |
100 | | - "required": false, |
101 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-log.html", |
102 | | - "comment": "Should be opt-in as it requires the logging library to capture a stack trace for each log event." |
103 | | - }, |
104 | | - "log.origin.file.name": { |
105 | | - "type": "string", |
106 | | - "required": false, |
107 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-log.html", |
108 | | - "comment": "Should be opt-in as it requires the logging library to capture a stack trace for each log event." |
109 | | - }, |
110 | | - "log.origin.function": { |
111 | | - "type": "string", |
112 | | - "required": false, |
113 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-log.html", |
114 | | - "comment": "Should be opt-in as it requires the logging library to capture a stack trace for each log event." |
115 | | - }, |
116 | | - "error.type": { |
117 | | - "type": "string", |
118 | | - "required": false, |
119 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-error.html", |
120 | | - "comment": "The exception type or class, such as `java.lang.IllegalArgumentException`." |
121 | | - }, |
122 | | - "error.message": { |
123 | | - "type": "string", |
124 | | - "required": false, |
125 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-error.html", |
126 | | - "comment": "The message of the exception." |
127 | | - }, |
128 | | - "error.stack_trace": { |
129 | | - "type": "string", |
130 | | - "required": false, |
131 | | - "url": "https://www.elastic.co/guide/en/ecs/current/ecs-error.html", |
132 | | - "comment": "The stack trace of the exception as plain text." |
133 | 174 | } |
134 | | - } |
135 | 175 | } |
0 commit comments