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

contrib/gorm.io/gorm.v1: add context example #1221

Merged
merged 5 commits into from Apr 15, 2022

Conversation

mackjmr
Copy link
Member

@mackjmr mackjmr commented Mar 18, 2022

This PR adds an example of passing context when making calls through gorm.DB. This allows the query spans to inherit their parent from context.

This example was requested in APMS-6867.

@mackjmr mackjmr requested a review from a team March 18, 2022 09:45
contrib/gorm.io/gorm.v1/example_test.go Outdated Show resolved Hide resolved
contrib/gorm.io/gorm.v1/example_test.go Outdated Show resolved Hide resolved
mackjmr and others added 2 commits March 25, 2022 13:36
Co-authored-by: Gabriel Aszalos <gabriel.aszalos@gmail.com>
ajgajg1134
ajgajg1134 previously approved these changes Apr 15, 2022
Copy link
Contributor

@ajgajg1134 ajgajg1134 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall! Just one small nit regarding the new function name not being the same format as the other example

Thanks!! 😃

contrib/gorm.io/gorm.v1/example_test.go Outdated Show resolved Hide resolved
@ajgajg1134 ajgajg1134 added this to the Triage milestone Apr 15, 2022
@ajgajg1134 ajgajg1134 merged commit fde953c into v1 Apr 15, 2022
@ajgajg1134 ajgajg1134 deleted the mackjmr/add-gorm-context-example branch April 15, 2022 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants