Location of custom probe class

Questions about YourKit Java Profiler
Locked
tercanedmunds
Posts: 2
Joined: Mon Jul 03, 2017 6:53 pm

Location of custom probe class

Post by tercanedmunds »

I'm trying to make deployments of custom probe classes easier by bundling in my gradle build as part of WAR creation. Unfortunately, yourkit when attempting to activate the probe throws a classnotfound exception. What are the yourkit parameters where i can bundle the probe jar in my WAR (and NOT have to copy manually into the container), where yourkit will find the probe class?

Thanks!
~t
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Location of custom probe class

Post by Anton Katilin »

Please see "Probe registration, activity modes":
https://www.yourkit.com/docs/java/help/ ... probes.jsp
tercanedmunds
Posts: 2
Joined: Mon Jul 03, 2017 6:53 pm

Re: Location of custom probe class

Post by tercanedmunds »

I've done the registration via API, however the probe doesn't show up in the list to activate after registered...
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Location of custom probe class

Post by Anton Katilin »

Which of the API calls did you use?

Code: Select all

// register probe classes
public static void registerProbes(Class... probeClasses);

// register probe classes by class name
public static void registerProbes(String... probeClassNames);
From the help:
When probes are registered by name using registerProbes(String...), the probe classes will be searched in paths specified with the help of startup options probeclasspath=<classpath> and probebootclasspath=<classpath>
Anyway, please check the profiler agent log file <user home>/.yjp/log/<session name>-<pid>.log for errors that should appear when a probe registration fails for whatever reason. Please feel free to send the log file to [email protected] if you have difficulties interpreting it.
Locked