This PR adds support for Elastic APM for APM and Tracing in self-hosted installations. Configuration can be done via the ELASTIC_APM_SERVER_URL and ELASTIC_APM_SECRET_TOKEN env variables. fixes: #4999