Using `on_master_start` assures that the sampler is started in master process and not in worker processes.