Skip to content

Commit 94c63ca

Browse files
authored
Update [email protected] with new GenAI fields (#129122)
1 parent 19a4ed0 commit 94c63ca

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed

docs/changelog/129122.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 129122
2+
summary: Update [email protected] with new GenAI fields
3+
area: Data streams
4+
type: feature
5+
issues: []

x-pack/plugin/core/template-resources/src/main/resources/[email protected]

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"doc_values": false
3232
},
3333
"path_match": [
34-
"*event.original"
34+
"*event.original",
35+
"*gen_ai.agent.description"
3536
]
3637
}
3738
},
@@ -210,6 +211,34 @@
210211
"match_mapping_type": "object"
211212
}
212213
},
214+
{
215+
"ecs_gen_ai_integers": {
216+
"mapping": {
217+
"type": "integer"
218+
},
219+
"path_match": [
220+
"*gen_ai.request.max_tokens",
221+
"*gen_ai.usage.input_tokens",
222+
"*gen_ai.usage.output_tokens",
223+
"*gen_ai.request.choice.count",
224+
"*gen_ai.request.seed"
225+
]
226+
}
227+
},
228+
{
229+
"ecs_gen_ai_doubles": {
230+
"mapping": {
231+
"type": "double"
232+
},
233+
"path_match": [
234+
"*gen_ai.request.temperature",
235+
"*gen_ai.request.top_k",
236+
"*gen_ai.request.frequency_penalty",
237+
"*gen_ai.request.presence_penalty",
238+
"*gen_ai.request.top_p"
239+
]
240+
}
241+
},
213242
{
214243
"all_strings_to_keywords": {
215244
"mapping": {

x-pack/plugin/stack/src/javaRestTest/java/org/elasticsearch/xpack/stack/EcsDynamicTemplatesIT.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,12 @@ private Object generateTestValue(String type) {
376376
case "long" -> {
377377
return randomLong();
378378
}
379-
case "int" -> {
379+
case "integer" -> {
380380
return randomInt();
381381
}
382+
case "double" -> {
383+
return randomDouble();
384+
}
382385
case "float", "scaled_float" -> {
383386
return randomFloat();
384387
}

0 commit comments

Comments
 (0)