couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bbast...@apache.org
Subject couch-stats commit: updated refs/heads/master to b368547
Date Fri, 31 Oct 2014 20:39:18 GMT
Repository: couchdb-couch-stats
Updated Branches:
  refs/heads/master a7c74f880 -> b36854774


Log notifications for missing metrics


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-stats/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-stats/commit/b3685477
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-stats/tree/b3685477
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-stats/diff/b3685477

Branch: refs/heads/master
Commit: b36854774c27b1c6a5a321b7b86d41053891cfd3
Parents: a7c74f8
Author: Benjamin Anderson <b@banjiewen.net>
Authored: Fri Oct 31 13:06:36 2014 -0700
Committer: Benjamin Anderson <b@banjiewen.net>
Committed: Fri Oct 31 13:06:36 2014 -0700

----------------------------------------------------------------------
 src/couch_stats.erl | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-stats/blob/b3685477/src/couch_stats.erl
----------------------------------------------------------------------
diff --git a/src/couch_stats.erl b/src/couch_stats.erl
index e195e82..b4b3b22 100644
--- a/src/couch_stats.erl
+++ b/src/couch_stats.erl
@@ -98,8 +98,11 @@ update_gauge(Name, Value) ->
 -spec notify(any(), any()) -> response().
 notify(Name, Op) ->
     case folsom_metrics:notify(Name, Op) of
-        ok -> ok;
-        _ -> {error, unknown_metric}
+        ok ->
+            ok;
+        _ ->
+            couch_log:notice("unknown metric: ~p", [Name]),
+            {error, unknown_metric}
     end.
 
 -spec sample_type(any(), atom()) -> stat().


Mime
View raw message