// Path: src/main/java/com/pearson/statspoller/utilities/core_utils/StackTrace.java
// public class StackTrace {
//     
//     private static final Logger logger = LoggerFactory.getLogger(StackTrace.class.getName());
//     
//     public static String getStringFromStackTrace(Exception exception) {
//         try {
//             StringWriter stringWriter = new StringWriter();
//             PrintWriter printWriter = new PrintWriter(stringWriter);
//             
//             exception.printStackTrace(printWriter);
//             
//             return stringWriter.toString();
//         }
//         catch (Exception e) {
//             logger.error(e.toString() + " - Failed to convert stack-trace to string");
//             return null;
//         }
//     }
//     
//     public static String getStringFromStackTrace(StackTraceElement[] stackTraceElements) {
//         try {
//             
//             StringBuilder stackTrace = new StringBuilder();
//             
//             for (StackTraceElement stackTraceElement : stackTraceElements) {
//                 stackTrace.append(stackTraceElement).append(System.lineSeparator());
//             }
//             
//             return stackTrace.toString();
//         }
//         catch (Exception e) {
//             logger.error(e.toString() + " - Failed to convert stack-trace to string");
//             return null;
//         }
//     }
//     
// }


import com.pearson.statspoller.utilities.core_utils.StackTrace;
import java.io.File;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
package com.pearson.statspoller.external_metric_collectors;


/**
 * @author Jeffrey Schmidt
 */
public class ExternalMetricCollector {
    
    private static final Logger logger = LoggerFactory.getLogger(ExternalMetricCollector.class.getName());
    
    private final String programPathAndFilename_;
    private final long collectionIntervalInMs_;
    private final String outputPathAndFilename_;
    private final String metricPrefix_;
    
    public ExternalMetricCollector(String programPathAndFilename, long collectionIntervalInMs, String outputPathAndFilename, String metricPrefix) {
        this.programPathAndFilename_ = programPathAndFilename;
        this.collectionIntervalInMs_ = collectionIntervalInMs;
// Path: src/main/java/com/pearson/statspoller/utilities/core_utils/StackTrace.java
// public class StackTrace {
//     
//     private static final Logger logger = LoggerFactory.getLogger(StackTrace.class.getName());
//     
//     public static String getStringFromStackTrace(Exception exception) {
//         try {
//             StringWriter stringWriter = new StringWriter();
//             PrintWriter printWriter = new PrintWriter(stringWriter);
//             
//             exception.printStackTrace(printWriter);
//             
//             return stringWriter.toString();
//         }
//         catch (Exception e) {
//             logger.error(e.toString() + " - Failed to convert stack-trace to string");
//             return null;
//         }
//     }
//     
//     public static String getStringFromStackTrace(StackTraceElement[] stackTraceElements) {
//         try {
//             
//             StringBuilder stackTrace = new StringBuilder();
//             
//             for (StackTraceElement stackTraceElement : stackTraceElements) {
//                 stackTrace.append(stackTraceElement).append(System.lineSeparator());
//             }
//             
//             return stackTrace.toString();
//         }
//         catch (Exception e) {
//             logger.error(e.toString() + " - Failed to convert stack-trace to string");
//             return null;
//         }
//     }
//     
// }


// Path: src/main/java/com/pearson/statspoller/external_metric_collectors/ExternalMetricCollector.java
import com.pearson.statspoller.utilities.core_utils.StackTrace;
import java.io.File;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

package com.pearson.statspoller.external_metric_collectors;


/**
 * @author Jeffrey Schmidt
 */
public class ExternalMetricCollector {
    
    private static final Logger logger = LoggerFactory.getLogger(ExternalMetricCollector.class.getName());
    
    private final String programPathAndFilename_;
    private final long collectionIntervalInMs_;
    private final String outputPathAndFilename_;
    private final String metricPrefix_;
    
    public ExternalMetricCollector(String programPathAndFilename, long collectionIntervalInMs, String outputPathAndFilename, String metricPrefix) {
        this.programPathAndFilename_ = programPathAndFilename;
        this.collectionIntervalInMs_ = collectionIntervalInMs;
        this.outputPathAndFilename_ = outputPathAndFilename;