Skip to content

Using graphite to check time taken by methods and AOPAlliance to intercept the method to perform logging and monitoring.

Notifications You must be signed in to change notification settings

bandikishores/Codahale-Graphite-Guice-AOPAlliance-Gauva

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Codahale-Graphite-Guice-AOPAlliance-Gauva

  1. Using graphite to check time taken by methods.
  2. AOPAlliance to intercept the method to perform Automatic logging and monitoring.
  3. Uses Gauva Cache to save and retrieve the value.

Graphite is a tool responsible for sending Metrics about APIs to another server for analysis. Can formulate the percentiles such as 99th percentile, occurances over a period of time.

  1. It uses Carbon internally to process requests.
    Carbon has 3 states.
  • agent - Which accepts the request.
  • cache - Which caches the request.
  • persistor - Which collects all the data and pushes them to Whisper time-to-time.
    MoreInfo
  1. Whisper - is a database library, which reads the data from carbon and writes it to DB.

  2. Graphite makes use of Timer, Histogram, Meter to mark the time taken, history and number of times the method was hit.
    GraphiteReporter sends this report to Graphite server.
    Currently the code pushes the data to local graphite server listening to 2003 port.

  3. Uses AOPAlliance (Method Interceptor) to block calls to API's and create a Timer/Histogram/Meter for each API.

For Configuring Graphite Server in local Follow steps at

  1. https://www.digitalocean.com/community/tutorials/installing-and-configuring-graphite-and-statsd-on-an-ubuntu-12-04-vps
  2. https://www.digitalocean.com/community/tutorials/how-to-install-and-use-graphite-on-an-ubuntu-14-04-server

Once installed,

  1. You can bring up (carbon) the listener which publishes data to graphite server by using
sudo service carbon-cache start
or
sudo service carbon-cache stop (To Stop)
or
sudo service carbon-cache status (For Status)
2. To bring up graphite web server
sudo service apache2 start
or
sudo service apache2 reload
3. The graphite web can be accessed at http://localhost/


Configuration of Graphite:

  1. for DB connections - /etc/graphite/local_settings.py

About

Using graphite to check time taken by methods and AOPAlliance to intercept the method to perform logging and monitoring.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages