Configuring Atlassian Profiling is very simple:
-
Add
atlassian-profiling.jar
to your application classpath
-
Modify your
web.xml
file by adding the ProfilingFilter:
<filter>
<filter-name>profiling</filter-name>
<filter-class>com.atlassian.util.profiling.filters.ProfilingFilter</filter-class>
<init-param>
<!-- specify the which HTTP parameter to use to turn the filter on or off -->
<!-- if not specified - defaults to "profile.filter" -->
<param-name>activate.param</param-name>
<param-value>app_profile</param-value>
</init-param>
<init-param>
<!-- specify the whether to start the filter automatically -->
<!-- if not specified - defaults to "true" -->
<param-name>autostart</param-name>
<param-value>false</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>profiling</filter-name>
<url-pattern>/*.jsp</url-pattern>
</filter-mapping>
-
Add any other
filter-mappings
you want by adding more
<filter-mapping />
tags (the above code will profile requests to *.jsp)
-
To turn profiling on add the parameter
?app_profile=on
to any request
-
To turn profiling on add the parameter
?app_profile=off
to any request
Also see Code Profiling to see how to use Profiling in your code.
|