Permalink
Browse files

Merge pull request #7 from basho/rdb-stats-register

Register riak_api_stat mod with riak_core at start up
  • Loading branch information...
2 parents 749e100 + 3012763 commit deb52907d04f42665d23ab787b1f532a2293faac @russelldb russelldb committed Jul 20, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −1 src/riak_api_app.erl
  2. +1 −0 src/riak_api_stat.erl
View
@@ -54,7 +54,7 @@ start(_Type, _StartArgs) ->
%% auto-config.
%% riak_core:register(riak_api, []),
%% register stats
- riak_api_stat:register_stats(),
+ riak_core:register(riak_api, [{stat_mod, riak_api_stat}]),
{ok, Pid};
{error, Reason} ->
{error, Reason}
View
@@ -44,6 +44,7 @@ start_link() ->
gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
register_stats() ->
+ [(catch folsom_metrics:delete_metric({?APP, Name})) || {Name, _Type} <- stats()],
[register_stat(Stat, Type) || {Stat, Type} <- stats()],
riak_core_stat_cache:register_app(?APP, {?MODULE, produce_stats, []}).

0 comments on commit deb5290

Please sign in to comment.