Elastic Java APM Agent Integration in Wildfly 8

Dear Elastic Community,

Kibana version: 7.13.1
Elasticsearch version: 7.13.1
APM Server version: 7.13.1
APM Agent language and version: Java, elastic-apm-agent-1.24.0
Fresh install or upgraded from other version? Fresh install.

I am experiencing difficulties while trying to integrate the Elastic Java APM agent with a Wildfly 8 application on a Windows environment. I am currently using ELK stack version 7.13.1 and Java 8. My goal is to visualize the APM data in Kibana, however, I am not seeing any data in Kibana's APM services. ELK and ApmServer is running on docker containers flawlessly.

NOTE : Importantly, I've verified that the APM agent and the APM server are functioning correctly by running a Java JAR file with the Elastic agent from the terminal. This method resulted in successfully sending data to the APM server, thus confirming the agent and server functionality.
However, despite following these steps and successfully verifying the APM agent and server functionality, I still do not see any results in Kibana's APM services when running the WildFly server.

Here's the step-by-step procedure of what I have done so far:

Downloaded the Elastic APM Java Agent and added it to my project.

Modified the standalone.conf.bat file (located in the bin folder of my Wildfly distribution) to include the following line

standalone.conf.bat
set "JAVA_OPTS=%JAVA_OPTS% -javaagent:C:\AsistDevelopment\app\wildfly\elastic-apm-agent-1.24.0.jar"
set "JAVA_OPTS=%JAVA_OPTS% -Delastic.apm.service_name=my-cool-app"
set "JAVA_OPTS=%JAVA_OPTS% -Delastic.apm.application_packages=com.example.demo"
set "JAVA_OPTS=%JAVA_OPTS% -Delastic.apm.server_url=http://127.0.0.1:8200"
set "JAVA_OPTS=%JAVA_OPTS% -Delastic.apm.log_level=DEBUG"

Restarted the WildFly server after making these changes.

Unfortunately, despite following these steps, I still do not see any results in Kibana's APM services.

I have also verified the following:

  • The path to the Elastic APM Java Agent in the standalone.conf.bat file is correct.
  • The APM server URL is correct and reachable from my machine.
  • There are no error or warning messages related to the Elastic APM agent in the WildFly server logs.
  • The APM server is up and running correctly, with no issues in the logs.
  • Kibana APM is set up correctly and pointing to the right APM server.
  • There are no firewall or proxy that could be blocking the agent from sending data to the APM server.

Despite all of these checks and attempts, I am still unable to see my APM data in Kibana. I would greatly appreciate any guidance or suggestions to resolve this issue. Thank you in advance for your time and assistance.

Best Regards,

Seems like your java options are not correctly picked up.

Could you try to provide an invalid path in the -javaagent option?
If the server picks up your Java options, it should fail to start with a message like the following:

Error opening zip file or JAR manifest missing : <invalid path here>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.