Create a gist now

Instantly share code, notes, and snippets.

rabbitmq routing probes
erlang$target:::function-entry
/copyinstr(arg1) == "rabbit_exchange_type_direct:route/2"/
{
printf("%s %s", probemod, probefunc);
self->traceIt = 1;
}
erlang$target:::function-entry
/self->traceIt/
{
printf("%s", copyinstr(arg1));
}
syscall:::entry
/self->traceIt/
{
printf("%s %s", probemod, probefunc);
}
erlang$target:::function-return
{
self->traceIt = 0;
}
@videlalvaro
Owner

run it like this: sudo dtrace -s route.d -p pgrep beam.smp

This only works with this OTP fork: https://github.com/dustin/otp/wiki/DTrace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment