Commit 5e62859
authored
[EXPORTER] Elastic Search exporter follow ECS guidelines (#3107)
* [EXPORTERS]: elastic search log message within `message` key instead of
`body`
According to ECS logging reference
https://www.elastic.co/guide/en/ecs/8.11/ecs-base.html#field-message
Refs #3091
* [EXPORTERS]: elastic search set severity within `log.level` key instead of
`severity`
According to ECS logging reference
https://www.elastic.co/guide/en/ecs/8.11/ecs-log.html#field-log-level
Refs #3091
* [EXPORTERS]: elastic search set timestamp within `@timestamp` instead of
`timestamp`
Also changes the format to be a Date string.
According to ECS logging reference
https://www.elastic.co/guide/en/ecs/8.11/ecs-base.html#field-timestamp
Refs #3091
* [EXPORTERS]: elastic search set instrumentation scope within `log.logger` instead of
`name`
According to ECS logging reference
https://www.elastic.co/guide/en/ecs/8.11/ecs-log.html#field-log-logger
Refs #3091
* EXPORTERS]: elastic search recorable constructor sets `ecs.version` field
to 8.11.0
According to ECS guidelines this field is mandatory
https://www.elastic.co/guide/en/ecs/8.11/ecs-guidelines.html
Refs #3091
* [EXPORTERS]: elastic search put attributes in json root instead of under
`attributes`
This allows user to set other fields that are part of the [ECS log documentation](https://www.elastic.co/guide/en/ecs/8.11/ecs-log.html).
For instance, it allows to have an attribute with key `log.file`, that
will, thanks to `nlohmann::json`, appear as :
```
{
"log": {
"file": "xxx"
}
}
```
Closes #30911 parent 2c912d5 commit 5e62859
File tree
2 files changed
+46
-6
lines changed- exporters/elasticsearch
- include/opentelemetry/exporters/elasticsearch
- src
2 files changed
+46
-6
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
200 | 205 | | |
201 | 206 | | |
202 | 207 | | |
| |||
205 | 210 | | |
206 | 211 | | |
207 | 212 | | |
208 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
209 | 245 | | |
210 | 246 | | |
211 | 247 | | |
| |||
216 | 252 | | |
217 | 253 | | |
218 | 254 | | |
| 255 | + | |
| 256 | + | |
219 | 257 | | |
220 | 258 | | |
221 | 259 | | |
222 | 260 | | |
223 | 261 | | |
224 | 262 | | |
225 | | - | |
| 263 | + | |
226 | 264 | | |
227 | 265 | | |
228 | 266 | | |
229 | | - | |
| 267 | + | |
230 | 268 | | |
231 | 269 | | |
232 | 270 | | |
233 | 271 | | |
234 | 272 | | |
235 | | - | |
| 273 | + | |
236 | 274 | | |
237 | 275 | | |
238 | 276 | | |
| |||
275 | 313 | | |
276 | 314 | | |
277 | 315 | | |
278 | | - | |
| 316 | + | |
279 | 317 | | |
280 | 318 | | |
281 | 319 | | |
| |||
291 | 329 | | |
292 | 330 | | |
293 | 331 | | |
294 | | - | |
| 332 | + | |
295 | 333 | | |
296 | 334 | | |
297 | 335 | | |
| |||
0 commit comments