Commit 2a5b3323 authored by jingbo.wang's avatar jingbo.wang

panic bug修改

parent 87b9e40f
......@@ -46,7 +46,7 @@ func msgInfluxProcess(traceMsgs []end_points.TraceMsg) {
}
path := traceMsg.Name
if _, ok := httpMethod[path]; ok {
path = traceMsg.Tags.HttpMethod + " " + path
path = traceMsg.Tags.HttpMethod + " " + traceMsg.Tags.HttpPath
}
path = strings.ToLower(path)
......
......@@ -131,11 +131,12 @@ func (w watch) UpdateNodes(service *registry.Service) {
newService := registry.NewService(service.Name)
for kk, vv := range service.NodeMap {
newNode := registry.Node{
ServiceName:vv.ServiceName,
Id:vv.Id,
Port:vv.Port,
Address:vv.Address,
Status:vv.Status,
ServiceName: vv.ServiceName,
Id: vv.Id,
Port: vv.Port,
Address: vv.Address,
Status: vv.Status,
Meta: make(map[string]string),
}
for x, y := range vv.Meta {
newNode.Meta[x] = y
......@@ -165,12 +166,14 @@ func InitServiceStatus() {
func NodeCheck() {
defer func() {
/*
if e := recover(); e != nil {
logger.Info("node check panic: ", e)
logger.Error("node check panic: ", e)
_ = ding.SendText("node check panic!", dingding.DefaultDingURL...)
time.Sleep(time.Second * 1)
NodeCheck()
}
*/
}()
//注册器初始化
......
......@@ -301,6 +301,7 @@ func (cr *consulRegistry) SetObserver(name string, observer Observer) error {
Port:vv.Port,
Address:vv.Address,
Status:vv.Status,
Meta: make(map[string]string),
}
for x, y := range vv.Meta {
newNode.Meta[x] = y
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment