|
|
@@ -192,7 +192,9 @@ func (c *Container) onL7RequestApm(pid uint32, fd uint64, timestamp uint64, r *l
|
|
|
}
|
|
|
query := conn.postgresParser.Parse(r.Payload)
|
|
|
//trace.MysqlQuery(query, r.Status.Error(), r.Duration)
|
|
|
-
|
|
|
+ if c.AppInfo.AppName != "" {
|
|
|
+ klog.Debugf("[%s] ->>>>> Postgres -> %s payload:[%s]", c.AppInfo.AppName, conn.ActualDest, query)
|
|
|
+ }
|
|
|
//apmTrace, ok := c.getTrace(r.TraceId)
|
|
|
apmTrace, err := c.getOrInitTrace(r.TraceId)
|
|
|
//fmt.Println("mysql r.TraceId:", r.TraceId)
|
|
|
@@ -215,7 +217,9 @@ func (c *Container) onL7RequestApm(pid uint32, fd uint64, timestamp uint64, r *l
|
|
|
}
|
|
|
query := conn.mysqlParser.Parse(r.Payload, r.StatementId)
|
|
|
//trace.MysqlQuery(query, r.Status.Error(), r.Duration)
|
|
|
-
|
|
|
+ if c.AppInfo.AppName != "" {
|
|
|
+ klog.Debugf("[%s] ->>>>> Mysql -> %s payload:[%s]", c.AppInfo.AppName, conn.ActualDest, query)
|
|
|
+ }
|
|
|
//apmTrace, ok := c.getTrace(r.TraceId)
|
|
|
apmTrace, err := c.getOrInitTrace(r.TraceId)
|
|
|
//fmt.Println("mysql r.TraceId:", r.TraceId)
|
|
|
@@ -238,6 +242,10 @@ func (c *Container) onL7RequestApm(pid uint32, fd uint64, timestamp uint64, r *l
|
|
|
conn.dmParser = l7.NewDmParser()
|
|
|
}
|
|
|
query := conn.dmParser.Parse(r.Payload, r.StatementId)
|
|
|
+ if c.AppInfo.AppName != "" {
|
|
|
+ klog.Debugf("[%s] ->>>>> Mysql -> %s DMSQL:[%s]", c.AppInfo.AppName, conn.ActualDest, query)
|
|
|
+ }
|
|
|
+
|
|
|
apmTrace, err := c.getOrInitTrace(r.TraceId)
|
|
|
if err == nil {
|
|
|
//apmTrace.DmTraceQueryEvent(query, r, conn.ActualDest)
|
|
|
@@ -260,6 +268,10 @@ func (c *Container) onL7RequestApm(pid uint32, fd uint64, timestamp uint64, r *l
|
|
|
//fmt.Println("cmd", cmd)
|
|
|
//fmt.Println("args", args)
|
|
|
//apmTrace, ok := c.getTrace(r.TraceId)
|
|
|
+ if c.AppInfo.AppName != "" {
|
|
|
+ klog.Debugf("[%s] ->>>>> Redis -> %s DMSQL:[%s]", c.AppInfo.AppName, conn.ActualDest, cmd)
|
|
|
+ }
|
|
|
+
|
|
|
apmTrace, err := c.getOrInitTrace(r.TraceId)
|
|
|
if err == nil {
|
|
|
//apmTrace.RedisTraceQuery(cmd, args, r.Status.Error(), r.Duration)
|