(maint) fix stacktrace matcher in apply trace test
The first commit of this test had an overly specific stack trace matcher
which did not work on certain ruby stacks. This change uses a different
match that should only match stack traces but be forgiving to changes in
the code and across ruby versions.