# Redacting location specific fields in http transactions

**URL:** <https://discuss.elastic.co/t/redacting-location-specific-fields-in-http-transactions/357838>\
**Category:** APM\
**Tags:** java\
**Created:** [April 20, 2024, 2:16pm UTC](https://discuss.elastic.co/t/redacting-location-specific-fields-in-http-transactions/357838 "2024-04-20T14:16:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaybee](https://avatars.discourse-cdn.com/v4/letter/j/6de8d8/32.png) [@Jaybee](https://discuss.elastic.co/u/Jaybee)\
**Post date:** [April 20, 2024, 2:16pm UTC](https://discuss.elastic.co/t/redacting-location-specific-fields-in-http-transactions/357838/1 "2024-04-20T14:16:24Z")

</div>

When http requests are made to my SpringBoot-based service the APM agent records fields such as client.geo.city\_name/client.geo.location/... in the resulting transaction.

I would like to redact that location information before it's sent to the APM server, but it's not clear from the APM agent configuration documents how I can achieve that. Can anyone help?

**APM Agent language and version** : Java 1.38.0

---

<div class="post-metadata">

**Author:** ![Jaybee](https://avatars.discourse-cdn.com/v4/letter/j/6de8d8/32.png) [@Jaybee](https://discuss.elastic.co/u/Jaybee)\
**Post date:** [April 20, 2024, 2:20pm UTC](https://discuss.elastic.co/t/redacting-location-specific-fields-in-http-transactions/357838/2 "2024-04-20T14:20:48Z")

</div>

I presume the trick is to redact some of the ecs fields

> **[ECS fields | APM Server Reference \[7.2\] | Elastic](https://www.elastic.co/guide/en/apm/server/7.2/exported-fields-ecs.html#_client)**

---

<div class="post-metadata">

**Author:** ![Jaybee](https://avatars.discourse-cdn.com/v4/letter/j/6de8d8/32.png) [@Jaybee](https://discuss.elastic.co/u/Jaybee)\
**Post date:** [April 23, 2024, 4:21pm UTC](https://discuss.elastic.co/t/redacting-location-specific-fields-in-http-transactions/357838/3 "2024-04-23T16:21:53Z")

</div>

From what I understand the location is worked out in the APM Server based off the source.ip? In which case how can we filter the ip address out? I can redact it in the http request header but it still appears under source.ip

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [May 2, 2024, 1:42pm UTC](https://discuss.elastic.co/t/redacting-location-specific-fields-in-http-transactions/357838/4 "2024-05-02T13:42:34Z")

</div>

Use [an ingest pipeline](https://www.elastic.co/guide/en/observability/current/apm-ingest-pipelines.html)

---

<div class="post-metadata">

**Author:** ![Jaybee](https://avatars.discourse-cdn.com/v4/letter/j/6de8d8/32.png) [@Jaybee](https://discuss.elastic.co/u/Jaybee)\
**Post date:** [May 2, 2024, 2:01pm UTC](https://discuss.elastic.co/t/redacting-location-specific-fields-in-http-transactions/357838/5 "2024-05-02T14:01:05Z")

</div>

Is that something I can implement in my SpringBoot service?

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [May 3, 2024, 9:21am UTC](https://discuss.elastic.co/t/redacting-location-specific-fields-in-http-transactions/357838/6 "2024-05-03T09:21:33Z")

</div>

no, it's part of the Elastic APM capabilities, for example [this tutorial](https://www.elastic.co/guide/en/observability/current/apm-custom-filter.html#apm-filters-ingest-pipeline) would be close to what you want
