# How to use literal comma on environment variable as a string

**URL:** <https://discuss.elastic.co/t/how-to-use-literal-comma-on-environment-variable-as-a-string/249577>\
**Category:** APM\
**Tags:** server\
**Created:** [September 22, 2020, 7:31pm UTC](https://discuss.elastic.co/t/how-to-use-literal-comma-on-environment-variable-as-a-string/249577 "2020-09-22T19:31:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Factor3](https://avatars.discourse-cdn.com/v4/letter/f/3e96dc/32.png) [@Factor3](https://discuss.elastic.co/u/Factor3)\
**Post date:** [September 22, 2020, 7:31pm UTC](https://discuss.elastic.co/t/how-to-use-literal-comma-on-environment-variable-as-a-string/249577/1 "2020-09-22T19:31:27Z")

</div>

How can I use a literal comma on an environment variable and have it parsed as a string and not an array in the yml configuration file?

I want to pull some information from the environment variable on a string configuration field but when starting the APM server it quits with this error:

`2020-09-22T16:28:24.59-0300 [APP/PROC/WEB/0] ERR Exiting: error initializing processors: fail to unpack the add_observer_metadata configuration: can not convert 'object' into 'string' accessing 'processors.0.add_observer_metadata.geo.location' (source:'/home/vcap/app/config/heartbeat.yml')`

Thanks.

---

<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:** [September 23, 2020, 12:43am UTC](https://discuss.elastic.co/t/how-to-use-literal-comma-on-environment-variable-as-a-string/249577/2 "2020-09-23T00:43:59Z")

</div>

Sorry, but it's unclear (to me at least) what you're trying to achieve, and why the error is occurring.

First I would like to clarify: is this really apm-server, and not heartbeat? I'm asking because your config is called "heartbeat.yml".

Second, please provide:

- the configuration file contents -- make sure to use the "preformatted text" input
- the relevant environment variables you're settting
- how they are related to the error you're seeing

---

<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:** [October 13, 2020, 8:44pm UTC](https://discuss.elastic.co/t/how-to-use-literal-comma-on-environment-variable-as-a-string/249577/3 "2020-10-13T20:44:18Z")

</div>

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