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

Doc: block expression requirement #125

Closed
taqtiqa-mark opened this issue Mar 22, 2022 · 2 comments
Closed

Doc: block expression requirement #125

taqtiqa-mark opened this issue Mar 22, 2022 · 2 comments

Comments

@taqtiqa-mark
Copy link
Contributor

The documentation is entirely silent on the fact that block expressions are an absolute requirement for setting up spans in addition to the #[trace] attribute.

@andylokandy
Copy link
Collaborator

The records of LocalSpan are submitted to the collector once the guard of set_local_parent gets dropped. So, if you collect the trace when the guard is alive, the LocalSpan will have no chance to get collected. And yes, we need to update the document for this behavior.

@andylokandy
Copy link
Collaborator

Because of #153, this becomes not true. As long as the root span drops after all of its children, block expressions are not needed.

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

No branches or pull requests

2 participants