I have added below config to setenv.sh file :
export CATALINA_OPTS="$CATALINA_OPTS -javaagent:/opt/elastic-apm-agent-1.18.1.RC1-SNAPSHOT.jar"
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.service_name=test-apm-service"
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.server_urls=http://localhost:8200"
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.application_packages=com.nm"
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.stack_trace_limit=-1"
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.transaction_max_spans=1000"
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.span_frames_min_duration=-1ms"
I could not see the mysql queries for the transactions.