Our team is trying to monitor performance of our Ktor (by Jetbrains) backend application. We are able to attach Elastic APM agent in backend server, and this server is visible at Kibana dashboard as service. But it is not creating transaction automatically for each incoming request. When we manually start a transaction and end it in a specific route, then only it is recording performance for that request. Please help if someone tried this earlier and was able to analyse all request without manual transaction of Elastic APM.
Reference code given below.
val transaction: Transaction = ElasticApm.startTransaction()
try {
transaction.setName("MyTransaction#getApi")
transaction.setType(Transaction.TYPE_REQUEST)
// do your thing...
} catch (e: java.lang.Exception) {
transaction.captureException(e)
throw e
} finally {
transaction.end()
}