|
|
@@ -64,7 +64,7 @@ type RootDataT struct {
|
|
|
MemUP int `json:"mem_u_p"`
|
|
|
OperType string `json:"oper_type"`
|
|
|
Parameters []ParamStruct `json:"parameters,omitempty"`
|
|
|
- ParentTaskName int `json:"parent_task_name"`
|
|
|
+ ParentTaskName string `json:"parent_task_name"`
|
|
|
Period int `json:"period"`
|
|
|
RespTime uint64 `json:"resp_time"`
|
|
|
Sampling int `json:"sampling"`
|
|
|
@@ -80,10 +80,13 @@ type RootDataT struct {
|
|
|
TransIds []interface{} `json:"trans_ids"`
|
|
|
TypeFrom string `json:"type_from"`
|
|
|
Uri string `json:"uri"`
|
|
|
- UserDir int `json:"user_dir"`
|
|
|
+ UserDir string `json:"user_dir"`
|
|
|
VipIds []interface{} `json:"vip_ids"`
|
|
|
SrcAddr string `json:"src_addr"`
|
|
|
DestinationAddr string `json:"destination_addr"`
|
|
|
+ // op 新增字段
|
|
|
+ Pid uint32 `json:"pid"`
|
|
|
+ ContainerID string `json:"container_id"`
|
|
|
}
|
|
|
|
|
|
// ParamStruct 定义目标结构
|
|
|
@@ -438,7 +441,7 @@ func initRootDataFromEvent() RootDataT {
|
|
|
MemUP: 0,
|
|
|
OperType: "",
|
|
|
Parameters: []ParamStruct{},
|
|
|
- ParentTaskName: 0,
|
|
|
+ ParentTaskName: "",
|
|
|
Period: -1,
|
|
|
RespTime: 0,
|
|
|
Sampling: 0,
|
|
|
@@ -454,7 +457,7 @@ func initRootDataFromEvent() RootDataT {
|
|
|
TransIds: []interface{}{},
|
|
|
TypeFrom: "",
|
|
|
Uri: "",
|
|
|
- UserDir: 0,
|
|
|
+ UserDir: "",
|
|
|
VipIds: []interface{}{},
|
|
|
SrcAddr: "",
|
|
|
DestinationAddr: "",
|
|
|
@@ -486,7 +489,7 @@ func initRootDataJava() RootDataT {
|
|
|
MemUP: 0,
|
|
|
OperType: "",
|
|
|
Parameters: []ParamStruct{},
|
|
|
- ParentTaskName: 0,
|
|
|
+ ParentTaskName: "",
|
|
|
Period: -1,
|
|
|
RespTime: 0,
|
|
|
Sampling: 0,
|
|
|
@@ -502,7 +505,7 @@ func initRootDataJava() RootDataT {
|
|
|
TransIds: []interface{}{},
|
|
|
TypeFrom: "",
|
|
|
Uri: "",
|
|
|
- UserDir: 0,
|
|
|
+ UserDir: "",
|
|
|
VipIds: []interface{}{},
|
|
|
}
|
|
|
return data
|
|
|
@@ -769,6 +772,10 @@ func buildAppMapFromEvent(traceRoot *RootDataT, sd apmTraceSpan) int {
|
|
|
traceRoot.SrcAddr = attr.Value.AsString()
|
|
|
case "server.dst_addr":
|
|
|
traceRoot.DestinationAddr = attr.Value.AsString()
|
|
|
+ case "server.pid":
|
|
|
+ traceRoot.Pid = uint32(attr.Value.AsInt64())
|
|
|
+ case "server.container_id":
|
|
|
+ traceRoot.ContainerID = attr.Value.AsString()
|
|
|
}
|
|
|
}
|
|
|
traceRoot.Maps = append(traceRoot.Maps, mNode)
|
|
|
@@ -893,6 +900,8 @@ func buildSQLMapEvent(mNode *MapInfoT, event tracesdk.Event) {
|
|
|
} else {
|
|
|
mNode.Exception = 0
|
|
|
}
|
|
|
+ case "sql.exception_msg":
|
|
|
+ mNode.ExceptionMsg = attr.Value.AsString()
|
|
|
case "sql.src_addr":
|
|
|
mNode.SrcAddr = attr.Value.AsString()
|
|
|
case "sql.destination_addr":
|