Add hook for thread contention monitoring