Monitor performance of a task in multiple processes

32 Views Asked by At

I have a task that starts in one process and ends in another. I like to monitor performance of the task from start to end.

As the processes are running in different machines, I cannot trust their time.

I am using StatsD for monitoring and statistics. Is there a way that I can achieve this?


I think (based on the search and suggestions in other questions) I should have something like:

// In the process where the task starts
var StatsD = require('node-statsd'),
    client = new StatsD();

// Sends a signal that shows task is started
client.A_METRIC_OR_SOMETHING('task.start.' + taskId, 1); // Or client.A_METRIC_OR_SOMETHING(['task.start.', taskId], 1);

// In the process where the task ends
var StatsD = require('node-statsd'),
    client = new StatsD();

// Same thing for the end.
client.A_METRIC_OR_SOMETHING('task.end.' + taskId, 1);

Now, what I need is a way to create a graph or dataset out of these logs.

0

There are 0 best solutions below