default void logMethodCall(Map<String, SamplingTestPlugin> samples) {
        StackTraceElement[] stackTraces = Thread.currentThread().getStackTrace();
        if (stackTraces.length < 2) {
            return;
        }
        // 0 is inside getStackTrace
        // 1 is this method
        // 2 is our caller method
        StackTraceElement caller = stackTraces[2];

        samples.put(caller.getMethodName(), new MethodCallSample(
            caller,
            Thread.currentThread().getContextClassLoader(),
            getClass().getClassLoader()
        ));
    }
Log the parent method call as a child sample.
Stores only the last invocation of each method if there are multiple invocations.
@param samples The collection of samples to which this method call should be added
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/SamplingTestPlugin.java