Expanded Monitoring article: Logging, errors, and alerts
lorensr opened this issue · 11 comments
Currently the Guide shows the recent-history console.log
s in Galaxy, and doesn't say much about errors.
What are the best practices for:
Logs
Recommended (or just an example) modern logging system, that allows for JSON logs, archiving, and levels, for example Winston (with for example Loggly). Related: #44 (comment)
Errors
- logging errors: either with Winston or Kadira
- environment: different behavior in dev vs production, eg to console in dev and in prod, client silenced and server to external system
- sanitization: in production, while some errors are expected and handled by client code, the unexpected ones that a pentester would trigger you want to convert to some generic "server error" to not give away information
- categorization: having different types of errors, some of which get sanitized, some of which get logged as normal or hidden (eg resume token expiration), some get logged as errors, for you to analyze later, and some to alert you (eg send email or pagerduty)
- contextual info: eg catch all errors thrown from methods (rethrowing some, depending on type) and include in the JSON log what the method arguments were and the current userId
OKGrow and I use error name / message regex filtering with Kadira, like the below, but it's pretty basic:
It seems like some of this would fit well in a library. The only related packages I'm seeing on atmosphere are for client display of errors.
I wonder if this topic is best covered in the more community-source cookbook like content we are looking to have (soon) on Stack Overflow
It's not exactly dev tools though; more like something that would go under the "production" heading I think.
Honestly we should probably split "deployment + monitoring" up and put this in the monitoring article.
PS I suspect others know more about this than we do, please help!
We have an integration with loggly, universal logging. We had to monkey patch some stuff. If this interesting to ya'll, we should talk and get it into core/ or deliverable way
Hi Abhi, I'd be interested in hearing what you had to monkey patch / seeing
code snippets. Could go into the recommended logging package.
On Thu, Apr 14, 2016 at 4:27 AM, Abhi Aiyer notifications@github.com
wrote:
We have an integration with loggly, universal logging. We had to monkey
patch some stuff. If this interesting to ya'll, we should talk and get it
into core/ or deliverable way—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#376 (comment)
I'm closing this issue because it's too old.
We are going to make many updates to the guide in the next weeks and it's better to focus on issues with recent activity. If you think this issue is still relevant please open a new one.