Skip to content

Instantly share code, notes, and snippets.

@benvan
Created May 11, 2015 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benvan/0477e1ea3149bf572144 to your computer and use it in GitHub Desktop.
Save benvan/0477e1ea3149bf572144 to your computer and use it in GitHub Desktop.
// in startup.js:
var autoscaling = require('autoscaling');
var Metrics = require('beamly-node-metrics');
Metrics.bindTo(autoscaling.se4.metrics)
// everywhere else
var Metrics = require('beamly-node-metrics');
var taskAMetric = new Metrics.TimingMetric('taskA');
var taskBMetric = new Metrics.FailSequencer('taskB');
metrics.taskA.timePromise('subtask',subtaskPromise);
metrics.taskB.success();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment