6 ms·
I really hate logging to the db. I have seen this being a big issue in medium apps just because it's used blindly. And if you don't do it asyn out of your req
by Felototo 3y ago
I really hate logging to the db.
I have seen this being a big issue in medium apps just because it's used blindly.
And if you don't do it asyn out of your request path you add unnecessary latency to your hotpath.
Sending logs to a logging system is really straight forward.
At least use a second database with an independent connection
- skissane 3y ago> And if you don't do it asyn out of your request path you add unnecessary latency to your hotpath. Well, in my case - the table only logs unexpectedly failed requests (so not “user entered wrong password”, more like “HTTP 500 NullPointerException”.) That’s not on hot path by definition. I agree logging every single HTTP request to an RDBMS, even a 200 GET, is dumb.
- sethammons 3y agometric success, log errors (well, metric error too, but don't log success)
- calvinmorrison 3y agoYes but what about logging over the mail daemon??
- Felototo 3y agoIn one company they logged everything in a public S3 bucket. 3 years later 10tb and a s3 bill of 200$/month...
- calvinmorrison 3y ago> 200$/month... I mean literally peanuts to a company