Skip to content

Commit

Permalink
fix: Rename stracktrace to trace in LogEntity (#79)
Browse files Browse the repository at this point in the history
Signed-off-by: Sheng Chen <[email protected]>
  • Loading branch information
jdneo authored Sep 6, 2023
1 parent 06d830c commit aab36a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ public class LogEntity {
private final String buildServerVersion;
private final String operationName;
private final String duration;
private final String stackTrace;
private final String trace;
private final String rootCauseMessage;

private LogEntity(Builder builder) {
this.buildServerVersion = builder.buildServerVersion;
this.operationName = builder.operationName;
this.duration = builder.duration;
this.stackTrace = builder.stackTrace;
this.trace = builder.trace;
this.rootCauseMessage = builder.rootCauseMessage;
}

public String getRootCauseMessage() {
return rootCauseMessage;
}

public String getStackTrace() {
return stackTrace;
public String getTrace() {
return trace;
}

public String getOperationName() {
Expand All @@ -46,7 +46,7 @@ public String getDuration() {
public static class Builder {
private final String buildServerVersion;
private String rootCauseMessage;
private String stackTrace;
private String trace;
private String operationName;
private String duration;

Expand All @@ -59,8 +59,8 @@ public Builder rootCauseMessage(String rootCauseMessage) {
return this;
}

public Builder stackTrace(String stackTrace) {
this.stackTrace = stackTrace;
public Builder trace(String trace) {
this.trace = trace;
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private <T> CompletableFuture<T> failure(String methodName, Throwable throwable)
String rootCauseMessage = rootCause != null ? rootCause.getMessage() : null;
LogEntity entity = new LogEntity.Builder()
.operationName(escapeMethodName(methodName))
.stackTrace(stackTrace)
.trace(stackTrace)
.rootCauseMessage(rootCauseMessage)
.build();
String message = String.format("Failed to process '%s': %s", methodName, stackTrace);
Expand Down

0 comments on commit aab36a3

Please sign in to comment.