Skip to content

Commit

Permalink
[ISSUE#8481]Unified TRACE capacity building (#8805)
Browse files Browse the repository at this point in the history
* [ISSUE#8481]Unified TRACE capacity building

* [ISSUE#8481]Unified TRACE capacity building
1. Event type add to traceEvent.
2. The event about instance add instancePort.
3. Add health check type to healthChangeEvent.
4. Other fixup.
  • Loading branch information
scienceZ authored Jul 29, 2022
1 parent 4ca8306 commit 5610449
Show file tree
Hide file tree
Showing 30 changed files with 575 additions and 350 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,35 @@
package com.alibaba.nacos.common.trace;

/**
* The reasons of health state change.
* The types of health check.
*
* @author yanda
*/

public enum HealthStateChangeReason {
public enum HealthCheckType {
/**
* Instance heart beat timeout.
*/
HEARTBEAT_TIMEOUT,
CLIENT_BEAT("client_beat"),
/**
* Instance heart beat refresh.
* Http health check.
*/
HEARTBEAT_REFRESH,
HTTP_HEALTH_CHECK("http"),
/**
* Instance health check fail.
* Mysql health check.
*/
HEALTH_CHECK_FAIL,
MYSQL_HEALTH_CHECK("mysql"),
/**
* Instance health check success.
* Tcp super sense health check .
*/
HEALTH_CHECK_SUCCESS;
TCP_SUPER_SENSE("tcp");

private String prefix;

private HealthCheckType(String prefix) {
this.prefix = prefix;
}

public String getPrefix() {
return prefix;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
* @author yanda
*/
public class TraceEvent extends Event {
private String type;

private final long eventTime;

private final String namespace;
Expand All @@ -32,6 +34,10 @@ public class TraceEvent extends Event {

private final String name;

public String getType() {
return type;
}

public long getEventTime() {
return eventTime;
}
Expand All @@ -48,7 +54,8 @@ public String getName() {
return name;
}

public TraceEvent(long eventTime, String namespace, String group, String name) {
public TraceEvent(String eventType, long eventTime, String namespace, String group, String name) {
this.type = eventType;
this.eventTime = eventTime;
this.namespace = namespace;
this.group = group;
Expand Down
Loading

0 comments on commit 5610449

Please sign in to comment.