Adding custom field in fields.yml in APM

Kibana version: 7.8

Elasticsearch version: 7.8

APM Server version: 7.7

APM Agent language and version: Java 1.9.0

Browser version: chrome

Original install method (e.g. download page, yum, deb, from source, etc.) and version: download page(elastic site)

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
I'm trying to enable http.request.header and add http.request.header.Trackingid to fields.yml.

This is an excerpt of fields.yml:

        - name: request
         type: group
         fields:

          - name: method
            type: keyword
            description: >
              The http method of the request leading to this event.
            overwrite: true

          - name: headers
            type: group
            description: >
              The canonical headers of the monitored HTTP request.
            fields:

             - name: Trackingid
               type: keyword
               description: >
                 My trackingid header
               overwrite: true

Still I can't find http.request.header.Trackingid in index patterns-> apm* fields, so, that i can refresh and field and cache it in ES.

Apm-server.yml has:

setup.template.overwrite: true
setup.template.enabled: true

And I restarted apm server.

This is how it looks in Discover:

And I can't find it in apm index:

What can I do to cache request.header field in ES? What am I doing wrong?
Thanks!

Hi @Shubhangi,
could you please have a look at a previous discuss entry where we explained how to use the configuration option setup.template.append_fields and when templates generally get applied.
Let me know if that helps.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.