-
Notifications
You must be signed in to change notification settings - Fork 747
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
[DRAFT] registry part 2 #412
Closed
Closed
Changes from 64 commits
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
4f5e737
sketch traits
hawkw 0d3c78f
copy over david's code
hawkw 957aeff
copy over more of david's code
hawkw 987fb09
hack up david's code a bit
hawkw e47b2a4
it compiles
8b124d0
replace current span stack with fmt's
0e35fd5
address some of eliza's comments.
e1835bc
Change span store to be `Arc<Slab<RwLock<BigSpan>>>`, from `Arc<Slab<…
dc20476
undo `RwLock`
8535077
Rename BigSpan -> Data; implement fmt-style ref counting.
21866a3
address eliza's comments.
60aad49
Use release in drop; handle panic safety.
4765d31
add todos
303ca31
remove unused.
ebbfb5a
more fixes, sorry
3aa4398
thank u, eliza
a249a67
remove visitor; un-implement events.
d607ad6
introduce extensions, copied from `http::Extensions`
davidbarsky 5141d35
copy over FmtLayer{Builder}
davidbarsky 631cd62
make methods public
davidbarsky 0cb934a
start examples
davidbarsky 80f4edd
bad sloggish subscriber example
davidbarsky 96b8839
add generic params to FmtLayer; implement a (possibly wrong) `current…
davidbarsky 8b253ed
huh
davidbarsky f14b505
i am bad at traits [fails to run example]
davidbarsky 63b723e
WIP
davidbarsky d57fbf0
it works, but i hate it
davidbarsky d4b6282
remove dead code
davidbarsky fb438f3
Tidy, add debug + doc comments.
davidbarsky e3f68ec
remove breaking bound; allowing builder to function correctly.
davidbarsky ae969fa
add color-backtrace for debugging
davidbarsky 7a4c321
visit spans with each event
davidbarsky bc4c8c2
made more complex examples, added an `EventFormatter` builder method,…
davidbarsky c0484b5
implement `WithExtensions`
davidbarsky e924afa
hmm
davidbarsky da324b6
with extensions
davidbarsky 7a9a713
try fix
davidbarsky 7bffbc7
try "do what fmt does"
davidbarsky a4d6f65
handle contextual parents
davidbarsky e6496f6
Cleanup parent visitation code at the cost of allocation
davidbarsky 8f75dbc
SVO
davidbarsky 8947cae
apply suggestions
38247d1
introduce `log` integration
3187388
do parents _right_
fbb4f23
PR comments
9854fa4
docs and nit addressing
2934fd3
more fixes
4a18905
get tests & examples to compile
d478268
compiles now!
3c7f4eb
docs improvements
hawkw 56deff7
Apply docs suggestions from code review
hawkw 92b07d4
Apply suggestions from code review
hawkw c942c19
remove `is_interested`
hawkw 416526b
make registry feature stable, default enabled
hawkw 2689906
api polish, bring back fmt subscriber
hawkw 059ed97
remove `color-backtrace`
6beeb57
remove remaining examples
09b5f40
use 0.0.6 slab
d3794d0
address some unused import warnings
dcbc6d3
rm `span.rs`
3d819a0
reduce additional warnings
2174dc2
dox
bf170f4
more
8efa918
impl builder methods
d48191b
Apply docs suggestions from code review
hawkw 65946ca
add with_writer docs
hawkw e9437b3
make method names more consistent
hawkw c4c528e
shorter & more consistent builder method names
hawkw 0e6dd75
fix doctests
hawkw 1901f7e
add blanket LookupMetadata impl for LookupSpan
hawkw 1b32811
remove unneeded LookupMetadata bounds
hawkw d9b9e54
don't expose external types in pub APIs
hawkw 54b9878
better comment for `FormattedFields`
hawkw ba7d2c3
undo accidental change
hawkw 4307d28
fix downcasting
hawkw 20cceeb
fix test contamination from FmtLayer Always interest
hawkw 989cf0b
move stack to the right place
hawkw 9dc5402
fix json test
6048810
apply https://github.com/tokio-rs/tracing/pull/415
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#![deny(rust_2018_idioms)] | ||
use std::io; | ||
use tracing::debug; | ||
use tracing_subscriber::{fmt::format::Format, fmt::time::ChronoUtc, fmt::Subscriber}; | ||
|
||
#[path = "fmt/yak_shave.rs"] | ||
mod yak_shave; | ||
|
||
fn main() { | ||
let format = Format::default() | ||
.with_timer(ChronoUtc::rfc3339()) | ||
.with_ansi(false) | ||
.with_target(false) | ||
.json(); | ||
let subscriber = Subscriber::builder() | ||
.with_writer(io::stdout) | ||
.on_event(format) | ||
.finish(); | ||
tracing::subscriber::set_global_default(subscriber).expect("Could not set global default"); | ||
|
||
let number_of_yaks = 3; | ||
debug!("preparing to shave {} yaks", number_of_yaks); | ||
|
||
let number_shaved = yak_shave::shave_all(number_of_yaks); | ||
|
||
debug!( | ||
message = "yak shaving completed.", | ||
all_yaks_shaved = number_shaved == number_of_yaks, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
#![deny(rust_2018_idioms)] | ||
use tracing::debug; | ||
use std::io; | ||
use tracing::{debug, Level}; | ||
|
||
mod yak_shave; | ||
|
||
fn main() { | ||
let subscriber = tracing_subscriber::fmt::Subscriber::new(); | ||
tracing::subscriber::set_global_default(subscriber).expect("Could not set global default"); | ||
|
||
tracing::subscriber::with_default(subscriber, || { | ||
let number_of_yaks = 3; | ||
debug!("preparing to shave {} yaks", number_of_yaks); | ||
let number_of_yaks = 3; | ||
debug!("preparing to shave {} yaks", number_of_yaks); | ||
|
||
let number_shaved = yak_shave::shave_all(number_of_yaks); | ||
let number_shaved = yak_shave::shave_all(number_of_yaks); | ||
|
||
debug!( | ||
message = "yak shaving completed.", | ||
all_yaks_shaved = number_shaved == number_of_yaks, | ||
); | ||
}); | ||
debug!( | ||
message = "yak shaving completed.", | ||
all_yaks_shaved = number_shaved == number_of_yaks, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
remove before flight (unused?)