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

attributes: add #[instrument(parent = ...)] for specifying parent span. #1238

Closed
wants to merge 1 commit into from

Conversation

pandaman64
Copy link

Motivation

Resolves part of #879.

Solution

This change adds parent parameter that takes an arbitrary expression to the #[instrument] attribute.
If specified, it overrides the parent span of the span made by #[instrument]

Questions

I'm creating this as a draft PR because there are some unclear things. Any ideas and suggestions are welcome.

  1. I couldn't decipher how the integration tests are written😅 Currently, the new test just checks whether it compiles.
  2. I'm not sure what to put as the default parent. Leaving parent field blank when unspecified might be better.

@alexbiehl
Copy link

This is looking so cool! What's the state of this PR?

@pandaman64
Copy link
Author

I'm not working on this PR. If you like it, you can create your PR.

@pandaman64 pandaman64 closed this Nov 9, 2021
@pandaman64 pandaman64 deleted the parent branch November 9, 2021 05:51
jswrenn added a commit to jswrenn/tracing that referenced this pull request Apr 25, 2022
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.

2 participants