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(iroh-blobs): preserve tracing subscriber in the LocalPool #2735

Merged
merged 3 commits into from
Sep 17, 2024

Conversation

flub
Copy link
Contributor

@flub flub commented Sep 17, 2024

Description

This preserves the tracing subscriber that is installed in the current
thread when the LocalPool is created. It then installs it into every
thread managed by the pool, ensuring that tracing output from the pool
is preserved.

Breaking Changes

Why is this even pub? But fine:

iroh_blobs::util::local_pool::LocalPool will now install the tracing
subscriber of the thread creating the pool, into each thread managed
by the pool. Practically this should not break any code already
managing their tracing subscribers either manually inside tasks or by
setting a global subscriber before creating the pool. But if you
really liked the behaviour of swallowing the logs on doing this it's a
breaking change.

Notes & open questions

Maybe this should be configurable, though since this is just an
internal tool for us I think we're fine just always having this
behaviour.

Fixes #2577
Replaces #2589

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

This preserves the tracing subscriber that is installed in the current
thread when the LocalPool is created.  It then installs it into every
thread managed by the pool, ensuring that tracing output from the pool
is preserved.

Maybe this should be configurable, though since this is just an
internal tool for us I think we're fine just always having this
behaviour.

Fixes #2589
@flub flub requested a review from rklaehn September 17, 2024 11:07
Copy link

github-actions bot commented Sep 17, 2024

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/2735/docs/iroh/

Last updated: 2024-09-17T11:08:59Z

Copy link
Contributor

@dignifiedquire dignifiedquire left a comment

Choose a reason for hiding this comment

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

💙

@divagant-martian divagant-martian added this pull request to the merge queue Sep 17, 2024
Merged via the queue into main with commit 5dd8bd3 Sep 17, 2024
30 checks passed
@flub flub deleted the flub/localpool-tracing branch September 17, 2024 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

iroh-blobs logs are being swalloed
3 participants