我真正想知道的是,我们如何使用Wily Introscope对基于Java的应用程序进行方法级别跟踪?我想跟踪应用程序中存在的所有类的所有方法。请帮忙。
最佳答案
你需要:
IntroscopeAgent.properties文件中的introscope.autoprobe.enable=true
。然后,您将需要为要监视的类构建一个.pbd文件。它看起来像:
#Custom Instrumentation for YouApplication
SetTracerClassMapping: ProxyBlamePointTracer com.wily.introscope.agent.trace.hc2.BlamePointTracer com.wily.introscope.probebuilder.validate.ResourceNameValidator
SetTracerParameter: ProxyBlamePointTracer nameformatter com.wily.field.ParameterSubstringFormatter
SetTracerParameter: ProxyBlamePointTracer newmode true
SetTracerParameter: ProxyBlamePointTracer useblame true
SetTracerClassMapping: ProxyExceptionErrorReporter com.wily.introscope.agent.trace.hc2.MethodThrewErrorReportingTracer com.wily.introscope.probebuilder.validate.MetricNameValidator
SetTracerParameter: ProxyExceptionErrorReporter nameformatter com.wily.field.ParameterSubstringFormatter
SetFlag: YourAppTracing
TurnOn: YourAppTracing
IdentifyClassAs: abc.de.efg.hijk.lmnop YourAppTracing
IdentifyInheritedAs: abc.de.efg.hijk.lmnop YourAppTracing
TraceComplexMethodsIfFlagged: YourAppTracing ProxyBlamePointTracer "YourApp|SUB|{classname}|{method}"
TraceComplexMethodsIfFlagged: YourAppTracing ProxyExceptionErrorReporter "YourApp|SUB|{classname}|{method}:Errors Per Interval"
关于java - 使用Wily Introscope对基于Java的应用程序进行方法级跟踪,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/32779186/