|
|
@@ -174,9 +174,31 @@ func (c *Container) onL7RequestApm(pid uint32, fd uint64, timestamp uint64, r *l
|
|
|
//fmt.Println("l7.connectionsByPidFd", conn, pid, fd)
|
|
|
|
|
|
if conn == nil {
|
|
|
+ if r.Protocol == l7.ProtocolGrpc {
|
|
|
+ klog.Infoln("conn == nil r.Protocol == l7.ProtocolGrpc")
|
|
|
+ klog.Infoln("enter the l7.ProtocolGrpc")
|
|
|
+ if c.l7Attach && c.valuableTrace(r.TraceId) {
|
|
|
+ apmTrace, err := c.getOrInitTrace(r.TraceId)
|
|
|
+ if err == nil {
|
|
|
+ apmTrace.GrpcClientTraceQueryEvent(r)
|
|
|
+ c.SendEvent(apmTrace, r.TraceId)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return nil
|
|
|
}
|
|
|
if timestamp != 0 && conn.Timestamp != timestamp {
|
|
|
+ if r.Protocol == l7.ProtocolGrpc {
|
|
|
+ klog.Infoln("timestamp != 0 && conn.Timestamp != timestamp r.Protocol == l7.ProtocolGrpc")
|
|
|
+ klog.Infoln("enter the l7.ProtocolGrpc")
|
|
|
+ if c.l7Attach && c.valuableTrace(r.TraceId) {
|
|
|
+ apmTrace, err := c.getOrInitTrace(r.TraceId)
|
|
|
+ if err == nil {
|
|
|
+ apmTrace.GrpcClientTraceQueryEvent(r)
|
|
|
+ c.SendEvent(apmTrace, r.TraceId)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return nil
|
|
|
}
|
|
|
stats := c.l7Stats.get(r.Protocol, conn.Dest, conn.ActualDest)
|