DEV Community

Discussion on: 10 Tips For Debugging in Production

Collapse
 
phallstrom profile image
Philip Hallstrom

Two thoughts...

1) the suspense in reading this almost killed me šŸ˜€

2) Iā€™ve been but my similar issues with Sentry and am starting to think enabling real error reporting in development might be a good idea all the time.

Collapse
 
molly profile image
Molly Struve (she/her)

Right?! Honeybadger has filters and ways to ignore tags and projects so its kinda like why not?!

Collapse
 
wood profile image
Joshua Wood

In the past Iā€™ve disabled production gems in development entirely, and ran into similar issues. Thatā€™s the main reason in ā€œdevelopment modeā€ the honeybadger gem behaves as close to production as possibleā€”it executes all code paths up to notifying the server (which it mocks). That was a super intentional decision; you donā€™t want code running in production that isnā€™t running in development/test. I also recommend testing exception reporting in your test suite for similar reasons. docs.honeybadger.io/lib/ruby/getti...

Unfortunately that doesnā€™t usually cover production states which result from heavy load or server interactions, so having a production-like dev environment for that could be a nice extra precaution. Itā€™s still not guaranteed to find issues like this before they happen, but it could help with quicker debugging/troubleshooting.

Load testing in general is also a good idea, and may help surface some issues faster. I like the idea of your StandardErrorWorker, Molly. Putting your application into exceptional states (and other failed states) under load could be a useful practice to help spot issues across the entire monitoring stack. Maybe Iā€™ll try adding that worker to our own Rails app. ;)