feat: implement beam_stats_msg_statsd_gauge abstraction
[beam_stats.git] / src / beam_stats_msg_graphite.erl
index 5b4e6e2..62028b1 100644 (file)
@@ -14,6 +14,7 @@
 -export(
     [ of_beam_stats/1
     , to_bin/1
+    , path_to_bin/1
     ]).
 
 -define(T, #?MODULE).
@@ -69,12 +70,17 @@ to_bin(
     , timestamp = Timestamp
     }
 ) ->
-    PathBin = bin_join(Path, <<".">>),
+    PathBin = path_to_bin(Path),
     ValueBin = integer_to_binary(Value),
     TimestampInt = timestamp_to_integer(Timestamp),
     TimestampBin = integer_to_binary(TimestampInt),
     <<PathBin/binary, " ", ValueBin/binary, " ", TimestampBin/binary>>.
 
+-spec path_to_bin([binary()]) ->
+    binary().
+path_to_bin(Path) ->
+    bin_join(Path, <<".">>).
+
 %% ============================================================================
 %% Helpers
 %% ============================================================================
This page took 0.021079 seconds and 4 git commands to generate.