Elastic APM Stack 7.1.0 (APM Server, Logstash, Kibana, Elasticsearch), Java Agent 1.7.0
Application: Spring-Boot with JDBC
After going live for several weeks with Elastic APM and getting lots of good insights, one of our recurring issues is is having a better visibility of the gaps in between spans, like in the graph below:
The gap between the two JDBC calls cannot be determined from the Kibana tools, and there is not enough info to say what caused that gap. Our investigation on other tools showed it had to do with running out of connection pools and the request needed to wait until one was available before continuing. The application had two consecutive JDBC calls inside a method.
Is there something we could have done to improve visibility of that gap? Or do we need to explicitly code for similar scenarios (not clear for us how to embed a span manually in the middle of an auto-instrumented class though)?
Any other advice?