All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.newrelic.opentracing.util.Stacktraces Maven / Gradle / Ivy

Go to download

New Relic OpenTracing Tracer implementation for instrumenting AWS Lambda functions.

The newest version!
/*
 * Copyright 2020 New Relic Corporation. All rights reserved.
 * SPDX-License-Identifier: Apache-2.0
 */

package com.newrelic.opentracing.util;

import java.util.ArrayList;
import java.util.List;

public class Stacktraces {

    private Stacktraces() {
    }

    public static List stackTracesToStrings(StackTraceElement[] stackTraces) {
        if (stackTraces == null || stackTraces.length == 0) {
            return new ArrayList<>();
        }

        final List list = new ArrayList<>();
        for (StackTraceElement e : stackTraces) {
            list.add('\t' + e.toString());
        }

        return list;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy