UNPKG

spincycle

Version:

A reactive message router and object manager that lets clients subscribe to object property changes on the server

46 lines (36 loc) 993 B
// Generated by CoffeeScript 1.9.3 (function() { var dogapi, domain, region; dogapi = require("dogapi"); "options = {\n api_key: \"5vvvvvv7adf6cuuuuppp98bc2\",\n app_key: \"0d2e3ef8tttttaea2efdc5f09\",\n};"; exports.init = function(options) { return dogapi.initialize(options); }; region = process.env['REGION']; domain = process.env['DOMAIN']; exports.writePoint = function(seriesName, eventData, tags, type) { var k, options, tagsarray, v; if (type == null) { type = 'gauge'; } tagsarray = []; for (k in tags) { v = tags[k]; if (!v || v === 'undefined') { v = '_'; } tagsarray.push(k + ':' + v); } options = { tags: tagsarray, metric_type: type }; return dogapi.metric.send(seriesName, eventData, options, function(err, res) { if (err) { return console.log('ERROR: ' + err); } else { } }); }; }).call(this); //# sourceMappingURL=DDAPI.js.map