From 8eefe1edd5c487e860b92c0d2f6bd1e4bf7d69c2 Mon Sep 17 00:00:00 2001 From: Matthew Wade Gordon Date: Mon, 28 Mar 2016 19:21:45 -0400 Subject: [PATCH] Change the way we export build_payload If you do the export in-line, it changes the way it's available in the code. Doing it after-the-fact works just fine. --- lib/instrumental.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/instrumental.js b/lib/instrumental.js index 46fbf4f..1ccf66e 100644 --- a/lib/instrumental.js +++ b/lib/instrumental.js @@ -40,7 +40,7 @@ var key, host, port, timeout, flushInterval, secure, verifyCert, caChain, record var instrumentalStats = {}; -exports.build_payload = function build_payload(metrics, time_stamp) { +function build_payload(metrics, time_stamp) { var payload = []; // Iterators: key and value. var k, v; @@ -94,6 +94,8 @@ exports.build_payload = function build_payload(metrics, time_stamp) { // appropriate protocol. return payload; } +exports.build_payload = build_payload; + function instrumental_connection(host, port, onConnectCb){ var connection;