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

Add trait StreamInstrument #2939

Closed
cjwcommuny opened this issue Apr 19, 2024 · 1 comment
Closed

Add trait StreamInstrument #2939

cjwcommuny opened this issue Apr 19, 2024 · 1 comment

Comments

@cjwcommuny
Copy link

Feature Request

Motivation

For Future, tracing has the Instrument trait. But for Stream, tracing doesn't have similar trait to use.

Proposal

Add StreamInstrument trait similar to the current Instrument trait.

@mladedav
Copy link
Contributor

This is already implemented, but tracing does not depend on futures so you'll have to use tracing-futures with the futures-03 feature.

Then it should work out of the box the same way as with Future, you just call instrument on your Stream and then use the resulting object as if it was the original.

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