# Strip Headers/Environment Variables from payloads

**URL:** <https://discuss.elastic.co/t/strip-headers-environment-variables-from-payloads/161421>\
**Category:** APM\
**Created:** [December 18, 2018, 10:32pm UTC](https://discuss.elastic.co/t/strip-headers-environment-variables-from-payloads/161421 "2018-12-18T22:32:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![krainboltgreene](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krainboltgreene/32/37174_2.png) [@krainboltgreene](https://discuss.elastic.co/u/krainboltgreene)\
**Post date:** [December 18, 2018, 10:32pm UTC](https://discuss.elastic.co/t/strip-headers-environment-variables-from-payloads/161421/1 "2018-12-18T22:32:42Z")

</div>

Currently we're seeing that the Ruby APM agent inserting environment variables and headers. Is there any way to strip this information?

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [December 19, 2018, 7:46am UTC](https://discuss.elastic.co/t/strip-headers-environment-variables-from-payloads/161421/2 "2018-12-19T07:46:49Z")

</div>

Hi and thanks for your question.

Seems like you have already found the corresponding issue: [https://github.com/elastic/apm-agent-ruby/issues/275](https://github.com/elastic/apm-agent-ruby/issues/275)

There is currently no option do disable recording of `env` but it seems to me like it would make a lot of sense. Especially when configuring something like `ELASTIC_APM_SECRET_TOKEN` in environment variables, you'd probably want do disable env recording.

Cheers,  
Felix

---

<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:** [January 9, 2019, 3:47am UTC](https://discuss.elastic.co/t/strip-headers-environment-variables-from-payloads/161421/3 "2019-01-09T03:47:09Z")

</div>

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