Skip to content

Commit 9ba40d4

Browse files
authored
Fix timestamp as object at root level for APM Server (#97401)
1 parent 6f56752 commit 9ba40d4

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

docs/changelog/97401.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 97401
2+
summary: Accept timestamp as object at root level
3+
area: Data streams
4+
type: bug
5+
issues: []

modules/data-streams/src/yamlRestTest/resources/rest-api-spec/test/data_stream/240_logs_ecs_mappings.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ Test general mockup ECS mappings:
197197
{
198198
"start_timestamp": "not a date",
199199
"start-timestamp": "not a date",
200+
"timestamp.us": 1688550340718000,
200201
"test": "mockup-ecs-log",
201202
"registry": {
202203
"data": {
@@ -234,6 +235,7 @@ Test general mockup ECS mappings:
234235
"path": "/path/to/my/file",
235236
"target_path": "/path/to/my/file"
236237
},
238+
"code_signature.timestamp": "2023-07-05",
237239
"registry.data.strings": ["C:\\rta\\red_ttp\\bin\\myapp.exe"]
238240
},
239241
"error": {
@@ -376,6 +378,8 @@ Test general mockup ECS mappings:
376378
- match: { .$idx0name.mappings.properties.start_timestamp.type: "date" }
377379
# testing the default mapping of string input fields to keyword if not matching any pattern
378380
- match: { .$idx0name.mappings.properties.start-timestamp.type: "keyword" }
381+
- match: { .$idx0name.mappings.properties.timestamp.properties.us.type: "long" }
382+
- match: { .$idx0name.mappings.properties.parent.properties.code_signature.properties.timestamp.type: "date" }
379383
- match: { .$idx0name.mappings.properties.vulnerability.properties.score.properties.base.type: "float" }
380384
- match: { .$idx0name.mappings.properties.vulnerability.properties.score.properties.temporal.type: "float" }
381385
- match: { .$idx0name.mappings.properties.vulnerability.properties.score.properties.version.type: "keyword" }

x-pack/plugin/core/src/main/resources/ecs-dynamic-mappings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@
124124
"type": "date"
125125
},
126126
"path_match": [
127-
"timestamp",
128127
"*.timestamp",
129128
"*_timestamp",
130129
"*.not_after",

0 commit comments

Comments
 (0)