diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/commands/executor/ProfileTaskCommandExecutor.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/commands/executor/ProfileTaskCommandExecutor.java index f2838d6df..e1bddc9c3 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/commands/executor/ProfileTaskCommandExecutor.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/commands/executor/ProfileTaskCommandExecutor.java @@ -38,7 +38,7 @@ public class ProfileTaskCommandExecutor implements CommandExecutor { // build profile task final ProfileTask profileTask = new ProfileTask(); profileTask.setTaskId(profileTaskCommand.getTaskId()); - profileTask.setFistSpanOPName(profileTaskCommand.getEndpointName()); + profileTask.setFirstSpanOPName(profileTaskCommand.getEndpointName()); profileTask.setDuration(profileTaskCommand.getDuration()); profileTask.setMinDurationThreshold(profileTaskCommand.getMinDurationThreshold()); profileTask.setThreadDumpPeriod(profileTaskCommand.getDumpPeriod()); diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ProfileTask.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ProfileTask.java index c09381d6d..a63d0a234 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ProfileTask.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ProfileTask.java @@ -29,7 +29,7 @@ public class ProfileTask { private String taskId; // monitor first span operation name - private String fistSpanOPName; + private String firstSpanOPName; // task duration (minute) private int duration; @@ -49,12 +49,12 @@ public class ProfileTask { // task create time private long createTime; - public String getFistSpanOPName() { - return fistSpanOPName; + public String getFirstSpanOPName() { + return firstSpanOPName; } - public void setFistSpanOPName(String fistSpanOPName) { - this.fistSpanOPName = fistSpanOPName; + public void setFirstSpanOPName(String firstSpanOPName) { + this.firstSpanOPName = firstSpanOPName; } public int getDuration() { @@ -121,11 +121,11 @@ public class ProfileTask { return false; ProfileTask that = (ProfileTask) o; return duration == that.duration && minDurationThreshold == that.minDurationThreshold && threadDumpPeriod == that.threadDumpPeriod && maxSamplingCount == that.maxSamplingCount && startTime == that.startTime && createTime == that.createTime && taskId - .equals(that.taskId) && fistSpanOPName.equals(that.fistSpanOPName); + .equals(that.taskId) && firstSpanOPName.equals(that.firstSpanOPName); } @Override public int hashCode() { - return Objects.hash(taskId, fistSpanOPName, duration, minDurationThreshold, threadDumpPeriod, maxSamplingCount, startTime, createTime); + return Objects.hash(taskId, firstSpanOPName, duration, minDurationThreshold, threadDumpPeriod, maxSamplingCount, startTime, createTime); } } diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ProfileTaskExecutionContext.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ProfileTaskExecutionContext.java index cf18ccbf1..7cee79704 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ProfileTaskExecutionContext.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ProfileTaskExecutionContext.java @@ -82,7 +82,7 @@ public class ProfileTaskExecutionContext { } // check first operation name matches - if (!Objects.equals(task.getFistSpanOPName(), firstSpanOPName)) { + if (!Objects.equals(task.getFirstSpanOPName(), firstSpanOPName)) { return ProfileStatusReference.createWithNone(); } diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ProfileTaskExecutionService.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ProfileTaskExecutionService.java index fc7ea2faf..f79ccb07c 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ProfileTaskExecutionService.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ProfileTaskExecutionService.java @@ -186,7 +186,7 @@ public class ProfileTaskExecutionService implements BootService, TracingThreadLi */ private CheckResult checkProfileTaskSuccess(ProfileTask task) { // endpoint name - if (StringUtil.isEmpty(task.getFistSpanOPName())) { + if (StringUtil.isEmpty(task.getFirstSpanOPName())) { return new CheckResult(false, "endpoint name cannot be empty"); } @@ -234,7 +234,7 @@ public class ProfileTaskExecutionService implements BootService, TracingThreadLi return new CheckResult( false, "there already have processing task in time range, could not add a new task again. processing task monitor endpoint name: " - + profileTask.getFistSpanOPName() + + profileTask.getFirstSpanOPName() ); } }