mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
feat: add appId in WorkerHeartbeatEvent
This commit is contained in:
parent
b6de5aa563
commit
eaf6dcad4f
@ -0,0 +1,26 @@
|
||||
package tech.powerjob.server.monitor.events.handler;
|
||||
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import tech.powerjob.server.monitor.Event;
|
||||
|
||||
/**
|
||||
* TaskTrackerReportInstanceStatus
|
||||
*
|
||||
* @author tjq
|
||||
* @since 2022/9/9
|
||||
*/
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
public class TtReportInstanceStatusEvent implements Event {
|
||||
|
||||
@Override
|
||||
public String type() {
|
||||
return "MONITOR_LOGGER_TT_REPORT_STATUS";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String message() {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -16,7 +16,10 @@ import tech.powerjob.server.monitor.Event;
|
||||
public class WorkerHeartbeatEvent implements Event {
|
||||
|
||||
private String appName;
|
||||
|
||||
/**
|
||||
* 虽然和 AppName 冗余,但考虑到其他日志使用 appId 监控,此处可方便潜在的其他处理
|
||||
*/
|
||||
private Long appId;
|
||||
private String version;
|
||||
|
||||
private String protocol;
|
||||
@ -33,6 +36,6 @@ public class WorkerHeartbeatEvent implements Event {
|
||||
|
||||
@Override
|
||||
public String message() {
|
||||
return SJ.MONITOR_JOINER.join(appName, version, protocol, tag, workerAddress, score);
|
||||
return SJ.MONITOR_JOINER.join(appName, appId, version, protocol, tag, workerAddress, score);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user