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

Request: example for custom tags for contrib/gorm.io #1308

Closed
duxing opened this issue May 25, 2022 · 2 comments
Closed

Request: example for custom tags for contrib/gorm.io #1308

duxing opened this issue May 25, 2022 · 2 comments
Labels
apm:ecosystem contrib/* related feature requests or bugs

Comments

@duxing
Copy link

duxing commented May 25, 2022

hi DataDog team,

dd-trace-go supports gorm@v1 and gorm@v2 and I'm comparing the DataDog instrumentation implementation for both versions, trying to understand what would be the impact of upgrading my services from gorm@v1 to gorm@v2.

one thing I noticed is: instrumentation lib for gorm@v1 comes with an option to add custom tag: WithCustomTag, and I don't see an equivalent option in gorm@v2 (reference)

would it be possible for you to share an example of how to add custom tags using dd-trace-go for gorm@v2? if it's not supported yet, would it be possible to add to dd-trace-go/contrib/gorm.io?

Thanks in advance!

@duxing
Copy link
Author

duxing commented May 25, 2022

seems like gorm@v2 instrumentation doesn't have that option available: reference

(equivalent of gorm@v1 implementation is missing)

[contrib/database/sql] contains a method for specifying span tags:
https://pkg.go.dev/gopkg.in/DataDog/dd-trace-go.v1/contrib/database/sql#WithSpanTags. I guess that's an option?

duxing pushed a commit to duxing/dd-trace-go that referenced this issue May 25, 2022
support custom tags for gorm.v1 instrumentation

Fixes DataDog#1308
@katiehockman katiehockman added the apm:ecosystem contrib/* related feature requests or bugs label Jan 11, 2023
@zarirhamza
Copy link
Contributor

Closed due to merged PR #1359. If there are related problems, please open a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:ecosystem contrib/* related feature requests or bugs
Projects
None yet
3 participants