Z stats #535

merged 41 commits into from Mar 14, 2013


None yet

2 participants


Statistics for zotonic.


Why not put a single call to z_stats:update in the handler of the gen_server:call? (on line 176 of this file: https://github.com/mmzeeman/zotonic/blob/6f254d5acb2931896bebee567c58baa915819b4f/src/support/z_sites_dispatcher.erl#L176 )


That is cleaner indeed.


btw, where is z_stat_handler?


On my computer in the attic… my laptop broke down.


Here it is, https://github.com/mmzeeman/zotonic_statman

Not sure how to package it yet. I also want to make a handler for folsom to check if there is something missing from the api.

Always fun, experimenting… :-)

kaos replied Feb 11, 2013

Indeed. I was looking into some experimenting, or at least take it for a test spin.. see if I get to it during a weeknight or coming weekend..

kaos replied Feb 11, 2013

I've used neither, but folsom seems to be more battle tested.. ;)
But as long as we have a common api from the zotonic side, the stats collector chosen shouldn't matter much (or, be easy to swap out for something else, any way).

I'm 3/4 through reading "Release It!" (based on your tip, thanks ;), and have a few ideas/wishes to add to zotonic based on that (but, he's /very/ java-centric :p)
Also, a lot of the pitfalls he brings up are taken care of / highlighted by erlang already :D

But what I'm missing is a dashboard with insights into the running system as well as being able to take process dumps for analysis.
I think erlang has good tools to support both of these operations, but we need to make them easy to use ;)



Whoops... :p

the pr iv/modules typo... ;)


Whoops indeed. Fixed…

mmzeeman and others added some commits Feb 22, 2013
@mmzeeman mmzeeman Fixed typo.. Thanks Andreas 814fb9c
@kaos kaos use mmzeeman/webzmachine for now... ba56f6e
@kaos kaos stats: add stats model.
This model pulls the metric data from folsom.
It needs to be adapted in case it is to handle
arbitrary statistic backends.
@mmzeeman mmzeeman Merge pull request #1 from kaos/z_stats
new stats model
@kaos kaos modules: add admin stats module.
Work in progress. Currently only charts a snapshot in time,
so no real time updates... Also more work on the graphs themselves
are needed.

Still missing (line) graphs for request counts for the different
time spans. But that is not really effectful until there's live
update of the graph data, appending the latest statistics.
@kaos kaos core: all acl checks has to pass.
(cherry picked from commit f1930b9)
@kaos kaos mod_admin_stats: reworking the histogram charts. 1665c5d
@kaos kaos mod_admin_stats: working on transitions.. loading smooth now. :) ca37aa4
@kaos kaos mod_admin_stats: fix fill-opacity after loading 481ef8c
@kaos kaos mod_admin_stats: live updates of histogram charts.
Work in progress. Currently updates on the push of a button.
Also removed the now unused nvd3 lib.
@kaos kaos mod_admin_stats: cleanup.
Got rid of javascript variables. Use wire's to hook everything up.
Renamed the request/response notify/event pair to 'update_metrics'
and 'new_metrics' resp.
@kaos kaos mod_admin_stats: major refactoring, introducing chart factories.
Also moved somewhat generic parts into z_charts.js for future break out
into a generic chart module.
@kaos kaos mod_admin_stats: begun work on line charts... ef57734
@kaos kaos mod_admin_stats: Line charts in place, as well as live updates. 8092709
@kaos kaos mod_admin_stats: some cleanup + new text labels and start/stop buttons. 13ccf11
@kaos kaos mod_admin_stats: convert mean values to milliseconds. 1d6e001
@kaos kaos mod_admin_stats: add five, fifteen and day line series to the charts. 1aacd34
@kaos kaos mod_admin_stats: fix line chart to last 5 minutes. b54ff9e
@kaos kaos mod_admin_stats: fix clip path. 7c5c1c9
@mmzeeman mmzeeman Merge pull request #2 from kaos/z_stats
modules: add admin stats module.
@kaos kaos Merge branch 'master' into z_stats
@mmzeeman mmzeeman Merge pull request #3 from kaos/z_stats
merged with master
kaos commented Mar 14, 2013

If you want to try this out you need to run the mmzeeman-master of webzmachine in order to get it all working.
There's also another commit in mmzeeman/zotonic#4 that is needed for a clean build (it will show up here as soon as maas merges that pull).

@mmzeeman mmzeeman merged commit 19ebc17 into zotonic:master Mar 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment