- ID
- 94c1bc51-16c1-45d0-a6ba-15309461331e
BE-7143 Ensure customer.signup metric fires even if Segment enqueue fails
- source :: https://hungryroot.atlassian.net/browse/BE-7143
- tags :: Hungryroot API Project
- epic :: EP-411 Eng Parking Lot
- sprint :: HR BE Sprint 104
- status :: Status - To Do
Description
In SignupView._send_post_signup_events (app/rest/signup.py), we call Segment
enqueue before ddstatsd.increment. Any exception/assert in
enqueue_segment_precheckout_trk prevents customer.signup emission.
Acceptance criteria
ddstatsd.increment(metric=DataDogMetrics.CUSTOMER_SIGNUP, ...) executes even
when Segment enqueue errors.
Segment failures are logged and counted (but don’t break signup success
response).
Add/adjust unit test(s) proving metric still fires when Segment enqueue raises.
Notes: Keep error handling tight (small try/except around Segment enqueue only).