I didn't see how AppDynamics can be used with play framework applications.
Hi ,
Adding to Sid comments, Please find the steps to integrate java play framework with AD agent capture from internal docs:
To configure Java Play framework, add javaagent in the start-up script as follows:
java -Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M %DEBUG_PARAM% -Dfile.encoding=UTF8 -Dplay.version="%PLAY_VERSION%" -Dsbt.ivy.home="%~dp0..\repository" -Dplay.home="%~dp0." -Dsbt.boot.properties="file:///%p%sbt/sbt.boot.properties" -javaagent:"<$AppServerAgent-Install>/javaagent.jar" -jar "%~dp0sbt\sbt-launch.jar" %*
As per our understanding, most of the requests received by a Play application are handled by an Action. An action is basically a Java method that processes the request parameters, and produces a result to be sent to the client.
In this scenario, need to configure POJO rules to identify the Business Transactions further. Following is the sample to demonstrate the same:
Once you have configured the POJO rule as mentioned above and access the application (especially pages that invokes ActionInvoker class), you can able to see the Business Transactions in the Dash Board.
Let us know that clarifies the steps to intergreate playframework with AD agent.
Regards,
Arun
Hi ,
Adding to Sid comments, Please find the steps to integrate java play framework with AD agent capture from internal docs:
To configure Java Play framework, add javaagent in the start-up script as follows:
java -Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M %DEBUG_PARAM% -Dfile.encoding=UTF8 -Dplay.version="%PLAY_VERSION%" -Dsbt.ivy.home="%~dp0..\repository" -Dplay.home="%~dp0." -Dsbt.boot.properties="file:///%p%sbt/sbt.boot.properties" -javaagent:"<$AppServerAgent-Install>/javaagent.jar" -jar "%~dp0sbt\sbt-launch.jar" %*
As per our understanding, most of the requests received by a Play application are handled by an Action. An action is basically a Java method that processes the request parameters, and produces a result to be sent to the client.
In this scenario, need to configure POJO rules to identify the Business Transactions further. Following is the sample to demonstrate the same:
Once you have configured the POJO rule as mentioned above and access the application (especially pages that invokes ActionInvoker class), you can able to see the Business Transactions in the Dash Board.
Let us know that clarifies the steps to intergreate playframework with AD agent.
Regards,
Arun
Hello, I tried exactly what you said and it didn't work, so I tried being more generic: http://awesomescreenshot.com/0793l2nr95 and it would still not detect anything, I'm running play 1.2.5.3 and the api doesn't mention any "apply" method: https://www.playframework.com/documentation/1.2.5/api/play/mvc/ActionInvoker.html
Hi,
We see you are using option (equals) from provided screenshot, Can you update rule as follows:
Class (Contains): ActionInvoker
Method (Matches Regex): .*
(read as dot followed by * symbol, this matches all methods on api contains class name as ActionInvoker from any package)
Generate load and see how it goes. If issue persists please send the agent logs.
Regards,
Arun
Thanks a lot, I did what you said and it worked then I fine tuned it:
http://awesomescreenshot.com/0983mhqe7d
class name equals: play.mvc.ActionInvoker
method name equals: invoke
Then on "Transaction Splitting" I configured it as:
http://awesomescreenshot.com/02f3mhqk5a
"Use a method parameter to name transactions"
"Parameter Index" : 0, "Get chain to run on method parameter": action
This way it separates the business transactions nicely (at least in my case)
Hi
I have the following setting in my startup script for play
exec su -s /bin/bash -c 'exec "$0" "$@"' onpadm -- \
/usr/bin/java $* -cp "$APP_DIR/*" \
-Xms2048m -Xmx2048m \
-XX:PermSize=64M -XX:MaxPermSize=256m \
-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=50000 \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-Dconfig.file=/opt/front/conf/env.conf \
-Dlogger.file=/opt/front/conf/logger.xml \
-javaagent:/home/faridsha/AppdynamicsSaas/javaagent.jar \
play.core.server.NettyServer $APP_DIR \
&> /opt/front/logs/out.log
but when I try to start the application it fails and says this
Error opening zip file or JAR manifest missing : /home/faridsha/AppdynamicsSaas/javaagent.jar
Error occurred during initialization of VM
agent library failed to init: instrument
what could be wrong?
Hi,
Can you please check the following:
- user running the server/jvm have executable permissions to /home/faridsha/AppdynamicsSaas/ and its sub folders
- Does the AppServerAgent.zip is downloaded fine , does the file corrupted can you check the integrity using mdfsum with the value at download.appdynamics.com
- check whether javaagent.jar exists at path /home/faridsha/AppdynamicsSaas/
- Try surrounding agent entry with quotes and see how it goes
Keep us posted how it goes.
Regards,
Arun
Hi,
Please send the output for "ll" command under path /home/faridsha/AppdynamicsSaas , also did you check the agent intergrity using md5sum check?
Can you check whether agent starting fine using simple java class as follows:
shell> java -javaagent:"/home/faridsha/AppdynamicsSaas/javaagent.jar" MyTest
Regards,
Arun
Hi
I managed to make it work eventually. I guess it was matter of permissions. i moved agent to different folder and allowed all permissions and then it is working.
How does Appdynamics show response times because response times from my load test tool is much higher than what Appdynamics is showing.
br,
Farid
Also I cannot seem drill down much in individual requests to have more insight into individual methods.
Hi Farid,
Please find our response to your queries:
- Unlike test tool, Response time shown in AD for particular includes the time spent from the entry point (Servlet, Struts , WS etc) , if both the originating API from which BT is monitored in BT grid and test tool are same then the response times should match if that is the case here. Hope that clarifies product behavior
- Call graph might not show APIs take less than 10 ms and also by default UI excluded few third party packages to be excluded in call graph view, check if this is the case here
Regards,
Arun
Have moved your post to the more relevant "Lite for Java" board.
Our Java Agent has built-in support to work with other JVM languages & the associated frameworks incl. Play
See here: http://docs.appdynamics.com/display/PRO14S/Supported+Environments+and+Versions+for+Java
Let us know if you have more questions.