| 66 | | 进入 PCWebMonitor 控制台,进入Components菜单,已经添加了Tracer插件,可以查看后台实际配置Tracer插件的参数: |
| | 66 | 进入 PCWebMonitor 控制台,进入Components菜单,已经添加了Tracer插件,可以查看后台实际配置Tracer插件的具体组件(Component)的参数配置: |
| | 67 | |
| | 68 | [[Image(components.jpg)]] |
| | 69 | |
| | 70 | '''HttpComponent''' |
| | 71 | {{{ |
| | 72 | <component name="HttpComponent" type="org.jwebap.plugin.http.HttpComponent"> |
| | 73 | <!--(ms) timings filter's over time --> |
| | 74 | <property name='trace-filter-active-time'>-1</property> |
| | 75 | <!-- max over-time trace size --> |
| | 76 | <property name='trace-max-size'>1000</property> |
| | 77 | </component> |
| | 78 | }}} |
| | 79 | '''MethodComponent''' |
| | 80 | {{{ |
| | 81 | <component name="MethodComponent" type="org.jwebap.plugin.method.MethodComponent"> |
| | 82 | <property name='trace-filter-active-time'>-1</property> |
| | 83 | <property name='trace-max-size'>1000</property> |
| | 84 | <!-- |
| | 85 | package name and class name that monitored by MethodComponent, |
| | 86 | e.g.: 'test.*;test.Test' , divided by ';' |
| | 87 | --> |
| | 88 | <property name='detect-clazzs'>test.*;</property> |
| | 89 | </component> |
| | 90 | }}} |
| | 91 | '''JdbcComponent''' |
| | 92 | {{{ |
| | 93 | <component name="JdbcComponent" type="org.jwebap.plugin.jdbc.JdbcComponent"> |
| | 94 | <property name='trace-filter-active-time'>-1</property> |
| | 95 | <property name='trace-max-size'>1300</property> |
| | 96 | <property name='connection-listener'><!--Connection Listener--> |
| | 97 | org.jwebap.plugin.http.ServletOpenedConnectionListener; |
| | 98 | org.jwebap.plugin.method.MethodOpenedConnectionListener |
| | 99 | </property> |
| | 100 | <!-- |
| | 101 | 1)Local datasource: set your ConnectionManagerClass, |
| | 102 | or the connection pool 's datasource. |
| | 103 | |
| | 104 | If you have |
| | 105 | more than one class ,divided by ';'. |
| | 106 | c3p0:com.mchange.v2.c3p0.ComboPooledDataSource; |
| | 107 | dbcp: org.apache.commons.dbcp.BasicDataSource |
| | 108 | Also,other class. Jwebap will inject driver-clazzs,and detect any |
| | 109 | connection and datasource object it's method renturn. |
| | 110 | Note: 'driver-clazzs =jdbc driver' is deprecated. Beacause of connection |
| | 111 | pool, set 'driver-clazzs =jdbc driver', jwebap will find out all connection is leaked. |
| | 112 | 2)JNDI datasource: If your application uses jndi datasource, |
| | 113 | you can set the class which |
| | 114 | manages connections in your |
| | 115 | application as driver,e.g.: 'com.china.telecom.ConnectionManager'. |
| | 116 | Else if you use spring to |
| | 117 | get jndi datasource ,you also can set |
| | 118 | driver-clazzs=org.springframework.jndi.JndiObjectFactoryBean. |
| | 119 | JdbcComponent will inject this class to proxy all connection the class's method return. |
| | 120 | |
| | 121 | --> |
| | 122 | <property name='driver-clazzs'></property> |
| | 123 | </component> |
| | 124 | }}} |
| | 125 | '''MemCachedComponent''' |
| | 126 | {{{ |
| | 127 | <component name="MemCachedComponent" type="org.jwebap.plugin.memcached.MemCachedComponent"> |
| | 128 | <property name='memcached-listener'> |
| | 129 | org.jwebap.plugin.tracer.http.ServletMemCachedListener; |
| | 130 | org.jwebap.plugin.tracer.method.MethodMemCachedListener |
| | 131 | </property> |
| | 132 | </component> |
| | 133 | }}} |