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

Support add sql result with Span #25

Open
songkane opened this issue Apr 26, 2024 · 0 comments
Open

Support add sql result with Span #25

songkane opened this issue Apr 26, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@songkane
Copy link

songkane commented Apr 26, 2024

Describe the feature

Record sql result sometimes is necessart.

Such as
gormDB.Use(tracing.NewPlugin(tracing.WithResult))
then , recorad

if verbose && db.Statement.Dest != nil {
		v, err := json.Marshal(db.Statement.Dest)
		if err == nil {
                         pan.addEvent('sqlResult',*(*string)(unsafe.Pointer(&v)))
		} else {
                          error := fmt.Sprintf("could not marshal db.Statement.Dest: %v", err)
                           span.reocrdError('sqlResult',error)
		}
	}

Motivation

Related Issues

@zstone12 zstone12 added the enhancement New feature or request label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants