Ask HN: How do you do monitoring/observability for dev/staging environment?
If you are using APM tools like DataDog, NewRelic - do you also use them for staging environment? How do you optimise performance at staging - or the task of optimization is left to the production env. as long as things are working fine?
If you use APM tools for staging/dev environment also - doesn't it increase your cost significantly?
7 comments
[ 4.4 ms ] story [ 22.2 ms ] thread- load a replica of your prod DB to stage daily/weekly and have all the same ETL jobs running
- setup load testing or user behavior regression tests to automatically go through critical pathways like user authentication and registration ("bare essentials" functionality, since writing these is tedious). This might be a good chance to use traffic-capture to at least get started/make setting up these behavior tests easier
- if it's a consumer-facing product, have employees dogfood the product on stage
- if it's a product for businesses, run your business off the stage or a 3rd slightly more stable "internal" environment to create some consequences for not keeping it running smoothly.
My experiences have not had representative load on stage, so the extra billing is proportionally smaller (since you're paying what you use in most cases). I don't know the billing specifics, but you can also consider dropping the log/metric retention window significantly on stage (say 1mo instead of 6mos) to save costs.
Ultimately I don't think you're going to get the same scaling problems to manifest on stage. It's more of a functionality testing ground IME.
I have 3 YOE as a dev so don't base your whole business plan on my ideas
We do feed data into influx via telegraf, elasticsearch, and sentry, and also do system monitoring via Icinga2. But in dev/stg it is not treated as actionable.