com.newrelic.opentracing.util.Stacktraces Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of newrelic-java-lambda Show documentation
Show all versions of newrelic-java-lambda Show documentation
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;
}
}