I have a deployment in cloud elastic using for apm:
apm metrics are being pushed from Nodejs(fastify framwork). I need to add a custom property mapping to the transaction index.
I am able to add the mapping using
PUT apm*/_mapping
{
"properties": {
"transaction.custom.body.deviceId": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256,
"index": true
}
},
"index": true
}
}
}
Deployment version: v7.10.1
However during rollover the new index wont have this mapping. I understand that I need to update the mapping in the index template.
{
"apm-7.10.0-transaction" : {
"order" : 2,
"index_patterns" : [
"apm-7.10.0-transaction*"
],
"settings" : {
"index" : {
"lifecycle" : {
"name" : "apm-rollover-30-days",
"rollover_alias" : "apm-7.10.0-transaction"
}
}
},
"mappings" : { },
"aliases" : { }
}
}
The mapping here is seen as empty. Could you help me with adding the mapping to template? Its cloud-elastic, so I am confused if it needs to be added in (user-setting-override)apm-server.yml or directly to template.
Thanks in advance.