Redacting location specific fields in http transactions

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

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

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

Use an ingest pipeline

Is that something I can implement in my SpringBoot service?

no, it's part of the Elastic APM capabilities, for example this tutorial would be close to what you want