-
Notifications
You must be signed in to change notification settings - Fork 25k
82 lines (82 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
version: ${xpack.oteldata.template.version}
_meta:
description: Default mappings for OpenTelemetry logs index template installed by x-pack
managed: true
template:
settings:
index:
mode: logsdb
sort:
field: [ "resource.attributes.host.name", "@timestamp" ]
mappings:
properties:
attributes:
type: passthrough
dynamic: true
priority: 20
properties:
exception.type:
type: keyword
ignore_above: 1024
exception.message:
type: keyword
ignore_above: 1024
exception.stacktrace:
type: wildcard
fields:
text:
type: match_only_text
data_stream.type:
type: constant_keyword
value: logs
observed_timestamp:
type: date_nanos
severity_number:
type: byte
severity_text:
type: keyword
log.level:
type: alias
path: severity_text
body:
type: object
properties:
text:
type: match_only_text
flattened:
# this is used for complex bodies of regular log records
# using the flattened field type avoids mapping issues which can be caused by logs containing arbitrary JSON objects
# the tradeoff is that the flattened field type is currently not supported well by Kibana and has other limitations
type: flattened
structured:
# this is used for events
# events are also represented as log records
# the event.name attribute uniquely identifies event structure / type of the payload (body)
# see also https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/events.md
# this makes them less prone to mapping issues, which is why we're enabling dynamic mappings
type: passthrough
dynamic: true
priority: 10
message:
type: alias
path: body.text
trace_id:
type: keyword
trace.id:
type: alias
path: trace_id
span_id:
type: keyword
span.id:
type: alias
path: span_id
error.exception.type:
type: alias
path: attributes.exception.type
error.exception.message:
type: alias
path: attributes.exception.message
error.stack_trace:
type: alias
path: attributes.exception.stacktrace