Refine types
Add customer_id to logging