ExceptionErrorReporter 추적 프로그램을 사용하여 계측된 메서드에서 throw되는 예외를 확인할 수 있습니다. 예외가 throw되면 이 추적 프로그램은 이를 오류로 처리하고 예외에서 오류 메시지를 가져옵니다. 이 메시지는 오류에 대한 가장 일반적인 정의입니다.
오류 메시지를 캡처하려면 ExceptionErrorReporter 추적 프로그램을 "...WithParameters" 지시문과 함께 사용해야 합니다. 예:
TraceOneMethodWithParametersOfClass: com.bank.CustomerAccount getBalance ExceptionErrorReporter "CustomerAccount:Errors Per Interval"
이 지시문은 CustomerAccount의 getBalance() 메서드에서 throw되는 예외가 오류로 간주되도록 지정합니다.
간격 메트릭별로 오류로 계측하려면 "...WithParameters" 지시문을 사용해야 하지만 임의의 메서드에 대해 "...WithParameters" 지시문을 한 번만 지정하면 해당 메서드에 대한 모든 추적 프로그램이 이 매개 변수를 사용할 수 있게 됩니다. 예를 들어 다음을 지정할 수 있습니다.
TraceOneMethodWithParametersOfClass: com.myClass myMethod BlamePointTracer
이 지시문은 com.myClass myMethod 메서드에 대한 매개 변수를 ExceptionErrorReporter 추적 프로그램을 포함한 다른 추적 프로그램에서 사용할 수 있도록 합니다.
|
Copyright © 2013 CA.
All rights reserved.
|
|