Skip to content

tracing: simplify common case of immediately entering the span (#1252) #1259

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

Merged
merged 1 commit into from
Feb 23, 2021

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Feb 22, 2021

This backports PR #1252 from master. I'll go ahead and merge this
pending CI.

  • Simplify common case of immediately entering the span

This PR allows the following API:

let _guard = tracing::span!("foo").entered();

See #1246 for an extended
discussion.

  • Add missing inlines

This fns are monomorphic, so an #[inline] is necessary to alow
cross-crate inlining at all.

  • improve method documentation

Co-authored-by: Eliza Weisman [email protected]
Signed-off-by: Eliza Weisman [email protected]

@hawkw hawkw requested a review from a team as a code owner February 22, 2021 23:29
@hawkw hawkw force-pushed the eliza/backport-1252 branch from 5b9b0af to c60dfa8 Compare February 22, 2021 23:33
* Simplify common case of immediately entering the span

This PR allows the following API:

```
let _guard = tracing::span!("foo").entered();
```

See #1246 for an extended
discussion.

* Add missing inlines

This fns are monomorphic, so an `#[inline]` is necessary to alow
cross-crate inlining at all.

* improve method documentation

Co-authored-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
@hawkw hawkw force-pushed the eliza/backport-1252 branch from c60dfa8 to 327a7a8 Compare February 23, 2021 18:32
@hawkw hawkw merged commit a358728 into v0.1.x Feb 23, 2021
@hawkw hawkw deleted the eliza/backport-1252 branch February 23, 2021 21:12
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