Permalink
Browse files

Make sure globalSuffix is undefined when not used.

Otherwise, StatsD will create metrics like '.../metric/rate/.wsp'
instead of '.../metric/rate.wsp'.
  • Loading branch information...
1 parent 27934f8 commit 106994bf4949edfed51d1c977ae78e6c42b062dc @ralphm ralphm committed May 12, 2014
Showing with 4 additions and 0 deletions.
  1. +4 −0 templates/default/config.js.erb
@@ -13,7 +13,11 @@
"graphite": {
"legacyNamespace": <%= @legacy_namespace %>,
"globalPrefix": "<%= @global_prefix %>",
+<% if !@global_suffix.empty? %>
"globalSuffix": "<%= @global_suffix %>",
+<% else %>
+ "globalSuffix": undefined,
+<% end %>
"prefixCounter": "<%= @prefix_counter %>",
"prefixTimer": "<%= @prefix_timer %>",
"prefixGauge": "<%= @prefix_gauge %>",

0 comments on commit 106994b

Please sign in to comment.