# APM Span mappings keep getting back to defaults

**URL:** https://discuss.elastic.co/t/apm-span-mappings-keep-getting-back-to-defaults/273119
**Category:** APM
**Tags:** server
**Created:** [May 17, 2021, 2:44am UTC](https://discuss.elastic.co/t/apm-span-mappings-keep-getting-back-to-defaults/273119 "2021-05-17T02:44:40Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Rodrigo\_Jimenez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rodrigo_jimenez/32/34722_2.png) [@Rodrigo\_Jimenez](https://discuss.elastic.co/u/Rodrigo_Jimenez)
#### Post date: [May 17, 2021, 2:44am UTC](https://discuss.elastic.co/t/apm-span-mappings-keep-getting-back-to-defaults/273119/1 "2021-05-17T02:44:40Z")

</div>

Hi!, I'm running the ElasticStack v7.11.1. Lately I had the need to start indexing a couple of request header values that came to some APM logs I'm collecting.  
To do that I had to mark the http.request.headers object as searchable. I did, then lifecycled the index and all good.  
Couple of days later that change was gone.. tried again thinking that I might have done something wrong the first time, same thing.  
Something keeps refreshing the apm-\* mapping to its default state, could it be the apm-server doing this?

Thanks.  
Rodrigo.

---

<div class="post-metadata">

### Author: ![gil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gil/32/41911_2.png) [@gil](https://discuss.elastic.co/u/gil)
#### Post date: [May 18, 2021, 6:33pm UTC](https://discuss.elastic.co/t/apm-span-mappings-keep-getting-back-to-defaults/273119/2 "2021-05-18T18:33:42Z")

</div>

Do you have template overwrite enabled (with `setup.template.overwrite`)? If so, you'll want to set `setup.template.append_fields`. You probably want that anyway so the setting is retained as you upgrade APM Server.

---

<div class="post-metadata">

### Author: ![Rodrigo\_Jimenez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rodrigo_jimenez/32/34722_2.png) [@Rodrigo\_Jimenez](https://discuss.elastic.co/u/Rodrigo_Jimenez)
#### Post date: [May 18, 2021, 6:40pm UTC](https://discuss.elastic.co/t/apm-span-mappings-keep-getting-back-to-defaults/273119/3 "2021-05-18T18:40:32Z")

</div>

Hi! Thanks for checking this question, but, the config for the apm server is pretty default.

```
# Overwrite existing template.
#setup.template.overwrite: false

```

☹

---

<div class="post-metadata">

### Author: ![Rodrigo\_Jimenez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rodrigo_jimenez/32/34722_2.png) [@Rodrigo\_Jimenez](https://discuss.elastic.co/u/Rodrigo_Jimenez)
#### Post date: [May 18, 2021, 6:44pm UTC](https://discuss.elastic.co/t/apm-span-mappings-keep-getting-back-to-defaults/273119/4 "2021-05-18T18:44:32Z")

</div>

To add some extra data, this is what I'm seeing:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/7/c7ec0b37013887df0241e13fee5b4c4cc16c6f57.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/a/4a22cb54e708944faefe27420403bd1b0f28b482.png)  
The "searchable" flag, keeps getting disabled (after an index lifecycle event)

---

<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: [June 8, 2021, 2:45pm UTC](https://discuss.elastic.co/t/apm-span-mappings-keep-getting-back-to-defaults/273119/5 "2021-06-08T14:45:17Z")

</div>

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