diff --git a/backends/graphite.js b/backends/graphite.js
index <HASH>..<HASH> 100644
--- a/backends/graphite.js
+++ b/backends/graphite.js
@@ -59,6 +59,7 @@ var flush_stats = function graphite_flush(ts, metrics) {
   var counters = metrics.counters;
   var gauges = metrics.gauges;
   var timers = metrics.timers;
+  var sets = metrics.sets;
   var pctThreshold = metrics.pctThreshold;
 
   for (key in counters) {
@@ -135,6 +136,11 @@ var flush_stats = function graphite_flush(ts, metrics) {
     numStats += 1;
   }
 
+  for (key in sets) {
+    statString += 'stats.sets.' + key + '.count ' + sets[key].values().length + ' ' + ts + "\n";
+    numStats += 1;
+  }
+
   statString += 'statsd.numStats ' + numStats + ' ' + ts + "\n";
   statString += 'stats.statsd.graphiteStats.calculationtime ' + (Date.now() - starttime) + ' ' + ts + "\n";
   post_stats(statString);
Add sets support in the graphite backend

The backend doesn't support sets of data, so the count of unique
elements is sent instead