forfuturellc / mmtc-ke

Mobile Money Transaction Cost in Kenya
https://mmtc.forfuture.tech
MIT License
4 stars 2 forks source link

Add Application Monitoring #4

Open GochoMugo opened 8 years ago

GochoMugo commented 8 years ago

Using a service, such as LogEntries, we shall be able to monitor the application. The main purpose would be receiving alerts when errors occur in the application, or when the application goes for some unexpected reason.

GochoMugo commented 8 years ago

Using a LogEntries agent running alongside the application, it "follows" the log pushing changes to the app's dashboard. This will have to work for now (we do not have the alerts feature)

BransonGitomeh commented 8 years ago

also you can make it log every request it recieves and a timestamp to keep record of how much time each request took, then you can know how much load your server is receiving, and how it's performing against that.

BransonGitomeh commented 8 years ago

this can be done in async, so it doesn't block the main thread of the application logic response process

normal middle ware, then call next () before it's done saving it whatever other idea you may have

GochoMugo commented 8 years ago

I have not added request logging (only doing error logging for now) but it would be nice to have metrics visualized on a dashboard.

Currently, the mechanism used is to have the application log to stdout, redirected to a log file, that a logentries agent follows, pushing any changes to the remote server. This implementation is quite good as it only uses standard output rather than some fancy method, bloating the source code.

However, using statsd is efficient for gathering metrics and would definitely want to proceed in that direction, with regards to request logging. It allows more accurate metrics, transmitted over UDP.

GochoMugo commented 8 years ago

We could allow sharing this data, from the monitoring. It can be used in trend analysis, etc...

BransonGitomeh commented 8 years ago

generally IMO the ammount of logging is ussually based on the ammount of data you have flowing through the app, if its a lot of data, i log everything so incase i get that error i can trace back and see what caused it, there are also things like data inconsistency that may occur that may need you to traceback things, but in this case i think logging errors is ok, but logging everything is not bloating code, its monitoring your code... :-)

GochoMugo commented 8 years ago

I agree we should log everything.

I meant that the mechanism used to log such data should not add complexity to the source code.

We will probably use the graphite-statsd stack for extensive monitoring in the future. We have added to the wishlist :smile:

BransonGitomeh commented 8 years ago

:-) awesome looking forward to we will do this

GochoMugo commented 8 years ago

I will notify you when I start working on the feature. :+1:

BransonGitomeh commented 8 years ago

:+1: