title: APM - Remove/hide user.name from Transaction-request Metadata
body: <p>We have a web Java + angular project that we once build with Spring-Boot. We've configured Kibana for it, and we also have an APM to analyse and see requests, so we can check which requests might contain performance issues.</p>
  <p>When we look at some APM Transaction-requests in the Metadata tab, we see of course a transaction-id, the HTTP header information, etc. (<a href="https://www.elastic.co/guide/en/apm/guide/current/exported-fields-ecs.html" rel="nofollow noreferrer">Here a list with all possible things to see in the metadata tab.</a>) For the User, we currently see the <code>user.id</code> and <code>user.name</code>.</p>
  <p>We want to change this so it'll only show the <code>user.id</code> here, and it should no longer show the <code>user.name</code> anywhere in APM.</p>
  <p>For this I see two possible directions towards a solution:</p>
  <ol>
  <li>Add a config to the APM. (I tried to see if there is an option to exclude certain meta fields within the <code>elasticapm.properties</code> file, but I was unfortunately unable to find any. <a href="https://www.elastic.co/guide/en/apm/agent/java/current/configuration.html#_option_reference" rel="nofollow noreferrer">Here a list with all possible config options for this file that I could find.</a>)</li>
  <li>Make a workaround within our Java Spring-Boot project to overwrite the default, and somehow remove the APM logging of <code>user.name</code> through that. I could find some ways to configure a Spring project with the ElasticSearch classes <a href="https://docs.spring.io/spring-data/elasticsearch/docs/current/reference/html/#reference" rel="nofollow noreferrer">here</a>, but I'm afraid it might have unwanted side effects on the existing APM logging by introducing this from scratch.</li>
  </ol>
  <p>My preference would be option 1, since we might step away from APM in the future for the project, so I'd prefer to not have any workarounds within our project just to remove something from APM. It also seems less impactful overall. So if anyone knows any Kibana-APM config properties to exclude the usage/logging of <code>user.name</code> within APM, that would be much appreciated.</p>