I have an application which takes a very long time to startup(depending on the circumstances between 50 seconds and 5 minutes). Therefore, I have added code to instrument the startup(I have subclassed the Spring
XmlWebApplicationContext and added
@CaptureTransaction to the relevant methods like
refresh). This worked - and is still working.
Now, I have upgraded the apm agent to the latest version and wanted to try the service name auto discovery to separate the applications within our Tomcat installation. I am aware that the Metrics are sent to the default service name(in my case
tomcat-application) but I found that not only the metrics are being sent there - my startup transactions are stored there too. This is unfortunate for me because naturally, we would be looking in the application for the startup transaction.
My guess is that the apm agent does not know about the application as it is still starting - does anyone have an idea how to work around that?
Elasticsearch version: 7.10
APM Server version: 7.10
APM Agent language and version: java, 1.20.0