Hey
Is it possible to set a sensor on a native method like java.net.Inet6AddressImpl.getHostByAddr ?
The dynaTrace client (5.6.0.5924) allows you to create and deploy the sensor but it appears not to collect any performance data.
I would not be surprised if the answer is no as instrumenting native code might be very hard but on the other hand the client does not imply this so maybe it is possible after all or... ?
The reason for wanting this is that getHostByAddr (and lookupAllHostAddr) sometimes appear to take long time (1-5s) where I would expect maybe two digit milliseconds; see attached.
Thanks
-Michael
Answer by Michael H. ·
I think 'which is the suggested way of adding sensor rules' is the tricky part here.
Either right clicking on a method in a purepath to add a sensor should not be possible or you should receive a warning if trying to set a sensor on a native method this way.
-Michael
Answer by Christian S. ·
hi Michael,
I just double-checked with 5.5 & 5.6 Client, Server & Collector. in the classbrowser (which is the suggested way of adding sensor rules) the native methods were identified as such and could not be selected for instrumentation.
if you, however, add the sensor rule manually, then you can basically add any rule without verification if and what would be instrumented. there is no on-the-fly-check of what would be instrumented.
best,
Christian
Answer by Michael H. ·
Hi Andreas
Thanks for clarifying response. This was what I expected but the interface for creating the sensor lets you believe it is possible to create such sensors; maybe a warning would be appropriate if not straight out disallowing it
-Michael
Answer by Andreas G. ·
Hi Michael
You are correct. Native methods cant be instrumented but they are picked up by our Auto Sensors. If you want to capture the string you need to capture it from the method that is calling getHostByAddr. In order to figure out which is the calling method go back to your PurePath and click on "Show all Nodes". The method above getHostByAddr is a good starting point. You might be lucky and the string is passed as an argument to that method
Andi
JANUARY 15, 3:00 PM GMT / 10:00 AM ET