APM transaction.custom

I've seen that using OTEL stores transaction.custom as a flattened field, where using an elastic agent stores the content to unmapped fields.

I'm using elastic agents and would like to store transaction.custom as a flattened field. Mapping didn't work, ingest pipeline processor "convert" doesn't support flattened.

Any guidance on how I can store transaction.custom as a flattened field, without using OTEL.

Hello @spaulovich, could you please explain in more details the OTEL setup which you're referring to?

In general for a setup with APM Agent to APM Server, you should be able to just update the mapping using the following requests to change the mappings.

PUT _component_template/traces-apm@custom
{
  "template": {
    "mappings": {
      "properties": {
        "transaction.custom": {
          "type": "flattened"
        }
      }
    }
  }
}
POST traces-apm-default/_rollover

Thanks Kostya_Masliuk!

I forgot rollover for it to take effect.