-
Notifications
You must be signed in to change notification settings - Fork 117
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 tracing configuration issues #432
Conversation
Because this change requires a breaking change to the API of abscissa I'm going to take this opportunity to also fix the Tracing component in abscissa so that it takes a user provided subscriber instead of always setting up its own default subscriber, that way we can setup layers like |
@yaahc Just to confirm, the relevant changes to abscissa are here, correct: |
Yup, the last line in that diff is some cruft that snuck in from earlier messing with error handling stuff but the rest of it is all the relevant stuff. |
Codecov Report
@@ Coverage Diff @@
## main #432 +/- ##
==========================================
- Coverage 53.90% 53.49% -0.41%
==========================================
Files 68 68
Lines 3278 3303 +25
==========================================
Hits 1767 1767
- Misses 1511 1536 +25
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚚
|
||
[patch.crates-io] | ||
abscissa_core = { git = "https://github.com/yaahc/abscissa.git", branch = "develop" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the upsteam is not expected to merge quickly, perhaps make an issue to track 'point to the inqlusion version when available'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, we'd be happy to merge these changes upstream. Please open a PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I plan to but I figured if we're gonna make a breaking change we should be sure that all the breaking changes are done at once, still thinking about changes to error handling.
Prior to this change the configuration options for tracing were controlled exclusively by the
tracing_config
function inZebraApp
. This resulted in it ignoring all configuration options other than--verbose
and more recentlyZEBRAD_LOG
. Notably, this function is called before theZebraConfig
is ever loaded, so it is impossible to consider the config filter level when initializing the tracing component.To fix this, we have the new
ZebraApp::level
fn take thecommand
as input, so it can prioritize the settings correctly. Then we call this function intracing_config
when the Config isNone
, giving us an initial config, then we call it again inafter_config
when the Config has been loaded and use that to reload the filter. This change requires a breaking change in theAbscissa
API to pass thecommand
along with theconfig
inafter_config
so they can both be referenced when setting the final level.fixes #98
fixes #399