# APM Index Template with numeric\_detection

**URL:** <https://discuss.elastic.co/t/apm-index-template-with-numeric-detection/187579>\
**Category:** APM\
**Tags:** go, server\
**Created:** [June 26, 2019, 1:38pm UTC](https://discuss.elastic.co/t/apm-index-template-with-numeric-detection/187579 "2019-06-26T13:38:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yozel](https://avatars.discourse-cdn.com/v4/letter/y/b3f665/32.png) [@yozel](https://discuss.elastic.co/u/yozel)\
**Post date:** [June 26, 2019, 1:38pm UTC](https://discuss.elastic.co/t/apm-index-template-with-numeric-detection/187579/1 "2019-06-26T13:38:12Z")

</div>

I'm trying to use my template labels as integer/float data and aggregate them in some dashboards but all labels have the type of string since Elastic APM sends them as a string. Is there a way to create APM index templates on the setup with numeric\_detection: true parameter? I know that we have can something on templates like `setup.template.settings.index.number_of_shards: 100` but can't we `setup.template.settings.index.mapping.numeric_detection: true`?

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [June 26, 2019, 2:15pm UTC](https://discuss.elastic.co/t/apm-index-template-with-numeric-detection/187579/2 "2019-06-26T14:15:20Z")

</div>

Welcome to the forum!

Number and Boolean labels are supported since APM server version 6.7 - [see documentation](https://www.elastic.co/guide/en/apm/get-started/7.2/metadata.html).

I hope this helps.

---

<div class="post-metadata">

**Author:** ![yozel](https://avatars.discourse-cdn.com/v4/letter/y/b3f665/32.png) [@yozel](https://discuss.elastic.co/u/yozel)\
**Post date:** [June 27, 2019, 1:34pm UTC](https://discuss.elastic.co/t/apm-index-template-with-numeric-detection/187579/3 "2019-06-27T13:34:57Z")

</div>

Thank you for your answer. This would absolutely help but unfortunately, I can't find a way to use this in Golang client. `SetTag` method allows only string value. Do you have any suggestions?

---

<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:** [June 28, 2019, 1:57am UTC](https://discuss.elastic.co/t/apm-index-template-with-numeric-detection/187579/4 "2019-06-28T01:57:57Z")

</div>

Hi Yasin,

It doesn't look like it's possible to set this template mapping attribute at the moment, but someone from the APM Server team may be able to find a way.

I've just opened [https://github.com/elastic/apm-agent-go/issues/572](https://github.com/elastic/apm-agent-go/issues/572) to add support directly in the agent. I think that's probably the best way forward.

Cheers,  
Andrew

---

<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:** [July 18, 2019, 9:58pm UTC](https://discuss.elastic.co/t/apm-index-template-with-numeric-detection/187579/5 "2019-07-18T21:58:07Z")

</div>

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