What should I do for WLDF?
1. Login to admin console and then create a diagnostic module
AdminConsole-->Diagnostics-->Diagnostics Modules
- By clicking New to create a new Diagnostic Module with a name you want, example: MyDiagModule and click OK to save it
- By clicking MyDiagModule and navigate to the configuration page of Diagnostic Module. Select the Instrumentation tab and check the checkbox of Enabled and save it
- By clicking on Targets tab to set the target to cgServer (The target server you want to choose.)
2. Modify your application and add weblogic-diagnostics.xml to the META-INF of your application EAR file.
3. Deploy your application.
4. Login to admin console and fine your application underneath Deployment.
AdminConsole-->Deployments-->YouApplication --> Configuration --> Instrumentation
- By clicking your application name to get the setting page of your application
- Select the Configuration tab and click on the Instrumentation tab, then check the checkbox of Enabled and save it.
- By clicking the Add Moniter From Libery button, select HttpSessionDebug and confirm it by clicking OK
NOTE: After done everything mentioned above, please restart the server and make sure it works
Then you can write some code to set some attributes of session, you will be able to see the payload size in the Events Log from AdminConsole.
AdminConsole--> Diagnostics--> Log Files--> EventsDataArchive
weblogic-diagnostics.xml
<?xml version="1.0" encoding="UTF-8"?>
<wldf-resource xmlns="http://www.bea.com/ns/weblogic/90/diagnostics">
<instrumentation>
<enabled>true</enabled>
<wldf-instrumentation-monitor>
<name>HttpSessionDebug</name>
<enabled>true</enabled>
</wldf-instrumentation-monitor>
</instrumentation>
</wldf-resource>
References for WLDF:
Instrumenting Weblogic Applications with WLDF (http://oraclemiddleware.wordpress.com/2012/02/01/instrumenting-weblogic-applications-with-wldf-where-does-the-application-spend-time/)
Instrumenting Java EE applications in WebLogic Server (https://blogs.oracle.com/WebLogicServer/entry/instrumenting_java_ee_applicat)
Session Monitoring Using WLDF (http://middlewaremagic.com/weblogic/?p=450)
Performing Diagnostics in a WebLogic environment (http://middlewaremagic.com/weblogic/?p=6016)
No comments:
Post a Comment