Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apmgormv2 2Calls mysql in kibana #1647

Open
gananggww opened this issue Aug 28, 2024 · 1 comment
Open

apmgormv2 2Calls mysql in kibana #1647

gananggww opened this issue Aug 28, 2024 · 1 comment
Labels

Comments

@gananggww
Copy link

gananggww commented Aug 28, 2024

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:

Image

any 2 cell in one query

Image

2 call in one sample query detail

expactation shold produce 1 query in 1 cell and 1 calls

@ramasuryananda
Copy link

ramasuryananda commented Oct 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants