自定义跟踪器可包含带有空格的度量标准名称。 在自定义度量标准名称中使用空格时,CA Technologies 建议在所有度量标准名称两侧加上引号 ("")。
重要信息! 请不要在类名称两侧加引号。 否则会引起自定义跟踪器出现故障。 例如:
IdentifyClassAs: My.Name.Space.MyClass MyTracers
IdentifyClassAs: "My.Name.Space.MyClass" MyTracers
如果创建包含类名称的度量标准名称,则必须在整个度量标准名称两侧加上引号。 允许在度量标准名称中使用空格,度量标准名称中的所有空格都必须包含在引号内。 例如,度量标准名称 "{classname}|Test One Node" 将如下所示:
TraceOneMethodIfFlagged: MyTracers AMethod BlamePointTracer "{classname}|Test One Node"
TraceOneMethodIfFlagged: MyTracers AMethod BlamePointTracer {classname}|Test One Node
以下部分是方法跟踪器示例。 在以下示例中,在度量标准名称两侧使用了引号 ("")。 CA Technologies 强烈建议在创建自定义度量标准名称时在所有度量标准名称两侧加上引号。
此跟踪器将跟踪指定方法的平均执行时间(毫秒)。
TraceOneMethodOfClass: petshop.catalog.Catalog search BlamedMethodTimer "MSPetShop|Catalog|search:Average Method Invocation Time (ms)"
此跟踪器将对每秒内的方法调用次数进行计数,并在指定的度量标准名称下报告此比率。
TraceOneMethodOfClass: petshop.catalog.Catalog search BlamedMethodRateTracer "MSPetShop|Catalog|search:Method Invocations Per Second"
此方法跟踪器将对每个时间间隔内的方法调用次数进行计数,并在指定的度量标准名称下报告每个时间间隔内的计数。
TraceOneMethodOfClass: petshop.catalog.Catalog search PerIntervalCounter "MSPetShop|Catalog|search:Method Invocations Per Interval"
时间间隔由企业管理器中的监控逻辑(例如,图表频率)决定。
Introscope 调查器中的预览窗格默认采用 15 秒的时间间隔。
此跟踪器将对调用方法的总次数进行计数。
TraceOneMethodOfClass: petshop.cart.ShoppingCart placeOrder BlamedMethodTraceIncrementor "MSPetShop|ShoppingCart|placeOrder:Total Order Count"
这些跟踪器将增量跟踪器和减量跟踪器组合起来,以保持计数的连续性。
TraceOneMethodOfClass: petshop.account.LoginComponent login MethodTraceIncrementor "MSPetShop|Account:Logged In Users" TraceOneMethodOfClass: petshop.account.LogoutComponent logout MethodTraceDecrementor "MSPetShop |Account:Logged In Users"
|
版权所有 © 2013 CA。
保留所有权利。
|
|