apm-agent-go
apm-agent-go copied to clipboard
apmgormv2 2Calls mysql in kibana
Bug: using apmgormv2 double query in kibana
my config in go init db:
import (
"gorm.io/gorm"
mysql "go.elastic.co/apm/module/apmgormv2/v2/driver/mysql"
)
//.....
o.Db, err = gorm.Open(mysql.Open(host), &gorm.Config{
Logger: newLogger,
})
using gorm with context:
...
err = o.db.WithContext(ctx).Table(tableNameActivation).Where(map[string]interface{}{"username": trueUname}).First(&act).Error
if err != nil {
return
}
and the result in my kibana:
any 2 cell in one query
2 call in one sample query detail
expactation shold produce 1 query in 1 cell and 1 calls
helo sorry , can i see on how you setup the gorm.io/gorm db connection with apmmysql driver, my query span didn't even show on my apm