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: carry over context to span with parent span #212

Merged

Conversation

MatsuoTakuro
Copy link
Collaborator

No description provided.

@MatsuoTakuro MatsuoTakuro marked this pull request as ready for review October 4, 2024 08:00
Copy link
Collaborator

@zhongdalu-trechina zhongdalu-trechina left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -47,13 +47,7 @@ func StartSpan(c context.Context, operation string, spanOpts ...sentry.SpanOptio
spanOpts = append(spanOpts, sentry.WithDescription(functionName))
}

parent := sentry.SpanFromContext(c)
Copy link
Collaborator

@zhongdalu-trechina zhongdalu-trechina Oct 8, 2024

Choose a reason for hiding this comment

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

@MatsuoTakuro the parent does not obtain other context value except spanContextKey{}. that's the reason right?

Copy link
Collaborator Author

@MatsuoTakuro MatsuoTakuro Oct 8, 2024

Choose a reason for hiding this comment

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

Yes, other context values like timeout deadline except a chain of spans weren't carried over when the context included a parent span.
Accordingly, I fixed the title for this PR.

@MatsuoTakuro MatsuoTakuro changed the title fix: carry over context to span without parent span fix: carry over context to span with parent span Oct 8, 2024
@tanvir-retailai tanvir-retailai merged commit 46516d1 into develop Oct 8, 2024
1 check passed
@tanvir-retailai tanvir-retailai deleted the fix/set-exsting-ctx-even-without-parent-span branch October 8, 2024 03:40
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