Supply the segment ID when adding samples to optimize trace painting