Skip to content

Commit a268dee

Browse files
authored
Add mapping for event_name for OTel logs (#119495)
1 parent f7178ab commit a268dee

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

docs/changelog/119495.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 119495
2+
summary: Add mapping for `event_name` for OTel logs
3+
area: Data streams
4+
type: enhancement
5+
issues: []

x-pack/plugin/otel-data/src/main/resources/component-templates/[email protected]

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ template:
3939
log.level:
4040
type: alias
4141
path: severity_text
42+
event_name:
43+
type: keyword
4244
body:
4345
type: object
4446
properties:

x-pack/plugin/otel-data/src/yamlRestTest/resources/rest-api-spec/test/20_logs_tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ Event body:
105105
service.name: my-service
106106
attributes:
107107
event.name: foo
108+
event_name: foo
108109
body:
109110
structured:
110111
foo:
@@ -119,6 +120,7 @@ Event body:
119120
index: $datastream-backing-index
120121
- is_true: $datastream-backing-index
121122
- match: { .$datastream-backing-index.mappings.properties.body.properties.structured.properties.foo\.bar.type: "keyword" }
123+
- match: { .$datastream-backing-index.mappings.properties.event_name.type: "keyword" }
122124
---
123125
Structured log body:
124126
- do:

0 commit comments

Comments
 (0)