Jobs Dashboard

This dashboard shows the performance of jobs in your app. Jobs can be:

Monti APM automatically tracks jobs in these packages:

Are you using another open source job package? Please create an issue on GitHub and we'll look into automatically tracking jobs in it.

Custom Traces

You can use Monti.traceJob to track any function or job in your app. The traces and metrics will appear in the Jobs Dashboard.

The full documentation for custom traces is in the agent documentation.

Here is an example:

setInterval(() => {
  Monti.traceJob({ name: 'remove expired messages' }, async () => {
    await Messages.removeAsync({ expiresAt: { $lt: new Date() } })
  });
}, 1000 * 30);

Jobs Summary

The Jobs summary shows you the summary for the selected job, or all jobs if none are selected.

The metrics are:

Job Breakdown

The breakdown shows a list of the different jobs in your app. It always shows the throughput for each job. You can also choose a second metric to view with the sort option. The metrics are:

Job Duration with Traces

The Job Duration chart shows the job duration, broken down by how much time was spent in different categories:

Additionally, if you like to inspect a trace of a job at a particular point, find that point on the chart and click it. You'll get a few sample traces that you can analyze. Or you can click view all traces to see a full list you can sort.

Added and Completed Jobs

This chart shows the number of jobs added compared to the number of jobs completed.

The added metric is only tracked for job queues. Other types of jobs will not show any added jobs.

You can manually record created jobs by calling Monti.recordNewJob('job name'). Learn more in the agent documentation.

Error Rate

This chart shows the percentage of jobs that have errored.

Job Delay

This chart shows the amount of time from when the job was scheduled to run to when it did run.

This metric is automatically tracked for job queues. When using Monti.traceJob, you can pass the delay as waitTime:

// waitTime is in milliseconds
Monti.traceJob({ name: 'job name', waitTime: 100}, () => {
  // code to trace
});

Running Jobs

This chart shows the number of jobs currently running, at the moment the agent sent the metrics to Monti APM.

Pending Jobs

This chart shows the number of jobs waiting to be processed. Currently, Monti APM does not track this metric by default to avoid causing performance issues.

You can manually track it by having your app occasionally call Monti.recordPendingJobs('job name', pendingCount) to update the value. Learn more in the agent documentation.