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

fix: tiny stuff #1211

Merged
merged 2 commits into from
Jan 30, 2023
Merged

fix: tiny stuff #1211

merged 2 commits into from
Jan 30, 2023

Conversation

alnr
Copy link
Collaborator

@alnr alnr commented Jan 26, 2023

No description provided.

@alnr alnr self-assigned this Jan 26, 2023
@alnr alnr changed the title tiny fixes fix: tiny stuff Jan 26, 2023
@@ -145,7 +145,7 @@ func (t *Traverser) TraverseSubjectSetRewrite(ctx context.Context, start *relati
}

if len(relations) > 0 {
_, span := t.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.TraverseSubjectSetRewrite")
ctx, span := t.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.TraverseSubjectSetRewrite")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ctx, span := t.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.TraverseSubjectSetRewrite")
var span *otel.Span
ctx, span = t.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.TraverseSubjectSetRewrite")

because of scoping?

Copy link
Member

Choose a reason for hiding this comment

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

Would not make a difference right now, but might later on. Or maybe just move that to the beginning of the function?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually you're correct! fixed, thx

Copy link
Collaborator

@hperl hperl left a comment

Choose a reason for hiding this comment

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

Nice, I found a better way to count DB queries now, so this is perfect 👍

@hperl hperl merged commit 719a7d5 into master Jan 30, 2023
@hperl hperl deleted the fix branch January 30, 2023 14:43
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.

3 participants