code: private void configureJobLevelMetrics(final JobRunner jobRunner) {
      this.logger.info("Configuring Azkaban metrics tracking for jobrunner object");
      if (MetricReportManager.isAvailable()) {
        final MetricReportManager metricManager = MetricReportManager.getInstance();
  
        // Adding NumRunningJobMetric listener
        jobRunner.addListener((NumRunningJobMetric) metricManager
            .getMetricFromName(NumRunningJobMetric.NUM_RUNNING_JOB_METRIC_NAME));
  
        // Adding NumFailedJobMetric listener
        jobRunner.addListener((NumFailedJobMetric) metricManager
            .getMetricFromName(NumFailedJobMetric.NUM_FAILED_JOB_METRIC_NAME));
  
      }
  
      jobRunner.addListener(JmxJobMBeanManager.getInstance());
    }
docs: Configure Azkaban metrics tracking for a new jobRunner instance