com.newrelic.opentracing.traces.ErrorTraceBuilder 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.traces;
import java.util.List;
import java.util.Map;
public class ErrorTraceBuilder {
private long timestamp;
private String transactionName;
private String message;
private String errorType;
private List stackTrace;
private Map intrinsics;
private Map userAttributes;
private String transactionGuid;
public ErrorTraceBuilder() {
}
public ErrorTraceBuilder setTimestamp(long timestamp) {
this.timestamp = timestamp;
return this;
}
public ErrorTraceBuilder setTransactionName(String transactionName) {
this.transactionName = transactionName;
return this;
}
public ErrorTraceBuilder setMessage(String message) {
this.message = message;
return this;
}
public ErrorTraceBuilder setErrorType(String errorType) {
this.errorType = errorType;
return this;
}
public ErrorTraceBuilder setStackTrace(List stackTrace) {
this.stackTrace = stackTrace;
return this;
}
public ErrorTraceBuilder setIntrinsics(Map intrinsics) {
this.intrinsics = intrinsics;
return this;
}
public ErrorTraceBuilder setUserAttributes(Map userAttributes) {
this.userAttributes = userAttributes;
return this;
}
public ErrorTraceBuilder setTransactionGuid(String transactionGuid) {
this.transactionGuid = transactionGuid;
return this;
}
public ErrorTrace createErrorTrace() {
return new ErrorTrace(timestamp, transactionName, message, errorType, stackTrace, intrinsics, userAttributes, transactionGuid);
}
}