# ElasticAPM Unknown Field Mapping

**URL:** <https://discuss.elastic.co/t/elasticapm-unknown-field-mapping/270580>\
**Category:** APM\
**Tags:** rum, server, ui\
**Created:** [April 19, 2021, 12:45pm UTC](https://discuss.elastic.co/t/elasticapm-unknown-field-mapping/270580 "2021-04-19T12:45:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![happyinteger](https://avatars.discourse-cdn.com/v4/letter/h/898d66/32.png) [@happyinteger](https://discuss.elastic.co/u/happyinteger)\
**Post date:** [April 19, 2021, 12:45pm UTC](https://discuss.elastic.co/t/elasticapm-unknown-field-mapping/270580/1 "2021-04-19T12:45:21Z")

</div>

**Kibana version** : 7.11.1

**Elasticsearch version** : 7.11.1

**APM Server version** : 7.9.1

**APM Agent language and version** : rum-js 5.6.3

**Browser version** : Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36 OPR/75.0.3969.171

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

**Fresh install or upgraded from other version?** Fresh Install

I'm using ElasticAPM server with rum-js agent. My application can successfully send data to the APM server. Although some fields have already assigned a type, there are some other fields which are "unknown field" and be able to filter them, I have to do a mapping manually. Using this path in Kibana UI: Stack Management --\> Index Management --\> Index Templates --\> Legacy Index Templates --\> Edit Template (apm-7.9.1)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/2/d2e383a23dfa30a113ad57044d51fbd72661cd64.png)

 ![mapping](https://us1.discourse-cdn.com/elastic/original/3X/f/c/fc17c17f62af590287befeddf7f55ce9070c8987.png)  
The data that I received from my application like below  
 ![span-data](https://us1.discourse-cdn.com/elastic/original/3X/c/0/c019d6b4225a252bda4446bce154b6b63eee5942.png)  
Unknown fields:  
 ![apm](https://us1.discourse-cdn.com/elastic/original/3X/5/d/5d966a275693d04d89b7c2086155797e58a152a7.png)

After mapping process the unknown fields are fixed according to types that I'm selecting. But I wonder why I have to do this, there are another fields in span object and despite I didn't any mapping, they are not "unknown field" type. I want to find out what's the logic behind this mapping process. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [April 20, 2021, 7:50am UTC](https://discuss.elastic.co/t/elasticapm-unknown-field-mapping/270580/2 "2021-04-20T07:50:54Z")

</div>

Hi @happyinteger, welcome to the forum!

> But I wonder why I have to do this, there are another fields in span object and despite I didn't any mapping, they are not "unknown field" type. I want to find out what's the logic behind this mapping process. Thanks in advance.

The reason we don't index every field is because this comes with a cost both in terms of storage size and ingestion speed in Elasticsearch.

Now that Elasticsearch supports [runtime fields](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime.html#runtime), we're considering making these less commonly searched fields runtime fields. This would make them searchable, but more slowly than if they were indexed at ingestion time.

---

<div class="post-metadata">

**Author:** ![happyinteger](https://avatars.discourse-cdn.com/v4/letter/h/898d66/32.png) [@happyinteger](https://discuss.elastic.co/u/happyinteger)\
**Post date:** [April 22, 2021, 8:18am UTC](https://discuss.elastic.co/t/elasticapm-unknown-field-mapping/270580/3 "2021-04-22T08:18:20Z")

</div>

Hello @axw ,  
Thank you for your explanation.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 13, 2021, 4:18am UTC](https://discuss.elastic.co/t/elasticapm-unknown-field-mapping/270580/4 "2021-05-13T04:18:51Z")

</div>

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