I am working with one of our developers on a crisis with one of our applications. We are seeing very long CPU times on specific methods, developer doesn't know why:
The developer is saying it would be very helpful if she could see the values that are being passed for these parameters? I haven't done a lot of custom method instrumentation in DT... so my question, how do I do this? Do I right-click this method and 'add sensor rules', or do I right click > New Business Transaction, and split on this value:
Another question, on an app that is already extremely taxed and unstable, does adding this new business transaction or sensor rule potentially cause the JVM to be more unstable?
Any information would be a huge help Thanks!!
Solved! Go to Solution.
Jeff, Right Click on the method and select "Add Sensor Rule". Then in the sensor rule creation dialog, there is an option to specify capturing of the arguments. Once the sensor rule is created, the captured argument will show up in the Arguments column in the Purepath Dashlet.
If you want to run some reports, such as capturing metrics and aggregating by the unique values of the argument, then you would additionally create a measure and BT. But this might not be necessary if the arguments column in the purepath display is sufficient.
This should not add any instability to the app. Of course if the argument being captured is huge then there is slight overhead to capturing and transporting it. Also consider if the method is invoked frequently, then the overhead also can be slightly affected. Keep in mind we simply do a toString() on teh object captured, so if there's no useful ToString(), then you might get back the ObjectID, which might not be useful. In that case, simply implement a useful tostring() and you'll get back whatever you implemented in the toString() for that captured object.