未验证 提交 6ca304ce 编写于 作者: 何延龙 提交者: GitHub

Merge pull request #199 from SkyAPM/develop

fix #195 #196 #194
......@@ -195,13 +195,6 @@ func (t *Agent) doRegister(r *register) {
var instances []*register2.ServiceInstance
var properties []*common.KeyStringValuePair
instances = append(instances, &register2.ServiceInstance{
ServiceId: appId,
InstanceUUID: agentUUID,
Time: time.Now().UnixNano() / 1000000,
Properties: properties,
})
properties = append(properties, &common.KeyStringValuePair{
Key: "os_name",
Value: runtime.GOOS,
......@@ -214,7 +207,7 @@ func (t *Agent) doRegister(r *register) {
properties = append(properties, &common.KeyStringValuePair{
Key: "process_no",
Value: string(pid),
Value: strconv.Itoa(pid),
})
properties = append(properties, &common.KeyStringValuePair{
......@@ -229,6 +222,13 @@ func (t *Agent) doRegister(r *register) {
})
}
instances = append(instances, &register2.ServiceInstance{
ServiceId: appId,
InstanceUUID: agentUUID,
Time: time.Now().UnixNano() / 1000000,
Properties: properties,
})
instanceReq := &register2.ServiceInstances{
Instances: instances,
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册