Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Register riak_api_stat mod with riak_core at start up #7

Merged
merged 1 commit into from

2 participants

@russelldb
Owner

Delete all stats at register time to ensure folsom is
consistent.

@russelldb russelldb Register riak_api_stat mod with riak_core at start up
Delete all stats at register time to ensure folsom is
consistent.
3012763
@russelldb russelldb was assigned
@russelldb russelldb merged commit deb5290 into 1.2
@seancribbs seancribbs was assigned
@seancribbs seancribbs deleted the rdb-stats-register branch
@seancribbs seancribbs removed their assignment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 20, 2012
  1. @russelldb

    Register riak_api_stat mod with riak_core at start up

    russelldb authored
    Delete all stats at register time to ensure folsom is
    consistent.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +1 −1  src/riak_api_app.erl
  2. +1 −0  src/riak_api_stat.erl
View
2  src/riak_api_app.erl
@@ -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
1  src/riak_api_stat.erl
@@ -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, []}).
Something went wrong with that request. Please try again.