-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Introduce tokio-trace
#827
Commits on Jan 15, 2019
-
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for c4cf988 - Browse repository at this point
Copy the full SHA c4cf988View commit details -
Configuration menu - View commit details
-
Copy full SHA for b60d478 - Browse repository at this point
Copy the full SHA b60d478View commit details -
Configuration menu - View commit details
-
Copy full SHA for c1212f0 - Browse repository at this point
Copy the full SHA c1212f0View commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 754d4b6 - Browse repository at this point
Copy the full SHA 754d4b6View commit details -
Add more examples and usage information to the tokio-trace readme
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 8a10214 - Browse repository at this point
Copy the full SHA 8a10214View commit details -
Add a README to the
tokio-trace-core
crateSigned-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 00fa609 - Browse repository at this point
Copy the full SHA 00fa609View commit details -
Add new docs/examples from READMEs to RustDoc
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 36059f6 - Browse repository at this point
Copy the full SHA 36059f6View commit details -
This picks up upstream changes from hawkw/tokio-trace-prototype#168. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for bab2f40 - Browse repository at this point
Copy the full SHA bab2f40View commit details -
Support setting targets in log-like event macros
Apparently we were missing this. I wrote a doc example that used it and was surprised when it didn't work. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for cf3ee71 - Browse repository at this point
Copy the full SHA cf3ee71View commit details -
Make doctest examples more compile-y
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 4720652 - Browse repository at this point
Copy the full SHA 4720652View commit details -
Disallow bad stuff in tokio-trace-core
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 5b07f84 - Browse repository at this point
Copy the full SHA 5b07f84View commit details -
Add support for no-message
event!
macro invocationsLooks like this was overlooked in hawkw/tokio-trace-prototype#168. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for f226df0 - Browse repository at this point
Copy the full SHA f226df0View commit details -
Fix event macros with more than one field
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 234ce89 - Browse repository at this point
Copy the full SHA 234ce89View commit details -
Add RustDocs and examples to all event macros
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 7ea47e3 - Browse repository at this point
Copy the full SHA 7ea47e3View commit details -
I didn't want these to be covered only by doctests. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 53d8159 - Browse repository at this point
Copy the full SHA 53d8159View commit details -
Handle missing cases for event! macro
The new tests revealed these. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 9d1f6d8 - Browse repository at this point
Copy the full SHA 9d1f6d8View commit details -
Stop benchmarks from breaking the build
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 3db8af9 - Browse repository at this point
Copy the full SHA 3db8af9View commit details -
*Actually* fix benchmarks breaking the build
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 25f7eea - Browse repository at this point
Copy the full SHA 25f7eeaView commit details -
Clean up weird code in benchmarks
I think this was originally intended to avoid the benchmarks getting optimized away, but that doesn't seem to be a problem. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 603d39f - Browse repository at this point
Copy the full SHA 603d39fView commit details -
A nonexistant subscriber should never be interested
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 1c31da1 - Browse repository at this point
Copy the full SHA 1c31da1View commit details -
Update copyright date in tokio-trace/LICENSE
Thanks to @seanmonstar. Co-Authored-By: hawkw <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 13caf1e - Browse repository at this point
Copy the full SHA 13caf1eView commit details -
Document when to use spans versus events
Thanks to @davidbarsky! Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 39947e9 - Browse repository at this point
Copy the full SHA 39947e9View commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 3e00d91 - Browse repository at this point
Copy the full SHA 3e00d91View commit details -
Seal the field::Record and field::AsField traits
As suggested by @seanmonstar. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for b7f51fc - Browse repository at this point
Copy the full SHA b7f51fcView commit details -
Document why events in log-like macros are dropped
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 5c3935b - Browse repository at this point
Copy the full SHA 5c3935bView commit details -
Use a drop guard in dispatcher::with_default
As suggested by @seanmonstar. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for a75120e - Browse repository at this point
Copy the full SHA a75120eView commit details -
Change deny attribute to match tokio-sync
Co-Authored-By: hawkw <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 2108be8 - Browse repository at this point
Copy the full SHA 2108be8View commit details -
Update date in tokio-trace/tokio-trace-core/LICENSE
Co-Authored-By: hawkw <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 4855fb2 - Browse repository at this point
Copy the full SHA 4855fb2View commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 788fb88 - Browse repository at this point
Copy the full SHA 788fb88View commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 35aefd0 - Browse repository at this point
Copy the full SHA 35aefd0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6745db6 - Browse repository at this point
Copy the full SHA 6745db6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 851662e - Browse repository at this point
Copy the full SHA 851662eView commit details -
Replace
Interest
consts with functionsSigned-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 6072167 - Browse repository at this point
Copy the full SHA 6072167View commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for ecd7bb1 - Browse repository at this point
Copy the full SHA ecd7bb1View commit details -
Move CURRENT_DISPATCH to tokio-trace-core
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 7c4fa3e - Browse repository at this point
Copy the full SHA 7c4fa3eView commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 194e404 - Browse repository at this point
Copy the full SHA 194e404View commit details -
Add examples for tokio-trace-core macros
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 30088ab - Browse repository at this point
Copy the full SHA 30088abView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5acc8bc - Browse repository at this point
Copy the full SHA 5acc8bcView commit details -
Dispatch
no longer implementsSubscriber
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 7eeeae6 - Browse repository at this point
Copy the full SHA 7eeeae6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9478dbe - Browse repository at this point
Copy the full SHA 9478dbeView commit details -
It should eventually live in the `tokio-trace-subscriber` crate. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 39eded2 - Browse repository at this point
Copy the full SHA 39eded2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1808355 - Browse repository at this point
Copy the full SHA 1808355View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3991923 - Browse repository at this point
Copy the full SHA 3991923View commit details
Commits on Jan 17, 2019
-
Configuration menu - View commit details
-
Copy full SHA for cd8e609 - Browse repository at this point
Copy the full SHA cd8e609View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb438ef - Browse repository at this point
Copy the full SHA eb438efView commit details -
thanks to @stjepang! Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 9d018ea - Browse repository at this point
Copy the full SHA 9d018eaView commit details
Commits on Jan 18, 2019
-
This shaves about 1-2ns off the disabled span benchmarks Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for e867ffc - Browse repository at this point
Copy the full SHA e867ffcView commit details -
Configuration menu - View commit details
-
Copy full SHA for f0170be - Browse repository at this point
Copy the full SHA f0170beView commit details -
macros: Move test for NEVER interest to callsite
This lets us completely skip `Span::new` in this case. This brings the benchmarks for the disabled case back into parity with `log`. Before: ``` Running target/release/deps/no_subscriber-1064195d321c8640 running 5 tests test bench_1_atomic_load ... bench: 0 ns/iter (+/- 0) test bench_costly_field_no_subscriber ... bench: 6 ns/iter (+/- 0) test bench_log_no_logger ... bench: 0 ns/iter (+/- 0) test bench_no_span_no_subscriber ... bench: 0 ns/iter (+/- 0) test bench_span_no_subscriber ... bench: 6 ns/iter (+/- 0) test result: ok. 0 passed; 0 failed; 0 ignored; 5 measured; 0 filtered out Running target/release/deps/subscriber-7319775649c47f41 running 4 tests test span_no_fields ... bench: 37 ns/iter (+/- 10) test span_repeatedly ... bench: 5,626 ns/iter (+/- 812) test span_with_fields ... bench: 101 ns/iter (+/- 20) test span_with_fields_record ... bench: 1,035 ns/iter (+/- 171) test result: ok. 0 passed; 0 failed; 0 ignored; 4 measured; 0 filtered out ``` After: ``` Running target/release/deps/no_subscriber-1064195d321c8640 running 5 tests test bench_1_atomic_load ... bench: 0 ns/iter (+/- 0) test bench_costly_field_no_subscriber ... bench: 0 ns/iter (+/- 0) test bench_log_no_logger ... bench: 0 ns/iter (+/- 0) test bench_no_span_no_subscriber ... bench: 0 ns/iter (+/- 0) test bench_span_no_subscriber ... bench: 0 ns/iter (+/- 0) test result: ok. 0 passed; 0 failed; 0 ignored; 5 measured; 0 filtered out Running target/release/deps/subscriber-7319775649c47f41 running 4 tests test span_no_fields ... bench: 36 ns/iter (+/- 8) test span_repeatedly ... bench: 5,381 ns/iter (+/- 1,075) test span_with_fields ... bench: 110 ns/iter (+/- 19) test span_with_fields_record ... bench: 1,019 ns/iter (+/- 247) test result: ok. 0 passed; 0 failed; 0 ignored; 4 measured; 0 filtered out ``` Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for d1195ef - Browse repository at this point
Copy the full SHA d1195efView commit details -
All event invocations should skip the never case
Ugh, code duplication :/
Configuration menu - View commit details
-
Copy full SHA for 096b3a7 - Browse repository at this point
Copy the full SHA 096b3a7View commit details
Commits on Feb 6, 2019
-
trace: Improve support for batching field values (#880)
This branch reworks `tokio-trace`'s field recording APIs to improve performance in cases where field values are provided in batches. `tokio-trace` supports recording values for span fields either when the span is constructed, or at any point during its lifetime. In order to support this, the current implementation represents each field value recorded with a separate call to a `Subscriber::record_$TYPE` function. This can incur significant overhead --- for example, if the span data is stored behind a mutex, every call to `record` must reacquire the lock. Providing most or all of the fields on a span up-front as it is constructed is likely to be the common case, but in the current design, this use-case has to pay performance costs in order to support the less common case of adding values post-initialization. Even in situations where some field values are unknown, if a majority are recorded at construction-time, each individual value takes a separate trip through the `record` pipeline. This branch rewrites this API so that all field recording is done by a `ValueSet` type, which groups together multiple values. A subscriber may pass an implementation of `Record` to the `ValueSet`'s `record` function, which will record all the provided values with that recorder. When a span is constructed, the `Subscriber::new_span` method is called with a `ValueSet` containing all the fields provided to the `span!` macro, and additional fields may be recorded either individually or in batches. In addition, the previous implementation of `Event`s on top of `Span`s has been removed and replaced with a new `Event` type which goes through a separate `Subscriber::event` function. Events are always known to have all their values at construction time, since the event cannot live long enough to have more values added. Thus, an `Event` also contains a `ValueSet`. I've added new test-support code for expecting certain fields to be recorded by spans and events, and written new tests to cover this behaviour. I've also updated the example code, and my experience doing so suggests that the new API is also somewhat more ergonomic to use. These changes result in significant improvement on the benchmark that simulates recording multiple fields on a span (`bench_span_with_fields_record`). Before: ``` Running target/release/deps/no_subscriber-a6af9f5aa4934184 running 5 tests test bench_1_atomic_load ... bench: 0 ns/iter (+/- 0) test bench_costly_field_no_subscriber ... bench: 0 ns/iter (+/- 0) test bench_log_no_logger ... bench: 0 ns/iter (+/- 0) test bench_no_span_no_subscriber ... bench: 0 ns/iter (+/- 0) test bench_span_no_subscriber ... bench: 0 ns/iter (+/- 0) test result: ok. 0 passed; 0 failed; 0 ignored; 5 measured; 0 filtered out Running target/release/deps/subscriber-ba753dc1d87e480d running 4 tests test span_no_fields ... bench: 41 ns/iter (+/- 5) test span_repeatedly ... bench: 5,418 ns/iter (+/- 658) test span_with_fields ... bench: 110 ns/iter (+/- 42) test span_with_fields_record ... bench: 1,047 ns/iter (+/- 240) test result: ok. 0 passed; 0 failed; 0 ignored; 4 measured; 0 filtered out ``` After: ``` Running target/release/deps/no_subscriber-611d60b262fbbcfb running 5 tests test bench_1_atomic_load ... bench: 0 ns/iter (+/- 0) test bench_costly_field_no_subscriber ... bench: 1 ns/iter (+/- 0) test bench_log_no_logger ... bench: 0 ns/iter (+/- 0) test bench_no_span_no_subscriber ... bench: 0 ns/iter (+/- 0) test bench_span_no_subscriber ... bench: 0 ns/iter (+/- 0) test result: ok. 0 passed; 0 failed; 0 ignored; 5 measured; 0 filtered out Running target/release/deps/subscriber-7a1279c84c0d50ff running 4 tests test span_no_fields ... bench: 37 ns/iter (+/- 9) test span_repeatedly ... bench: 4,502 ns/iter (+/- 712) test span_with_fields ... bench: 54 ns/iter (+/- 17) test span_with_fields_record ... bench: 364 ns/iter (+/- 38) test result: ok. 0 passed; 0 failed; 0 ignored; 4 measured; 0 filtered out ``` Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 9dc0129 - Browse repository at this point
Copy the full SHA 9dc0129View commit details -
Re-introduce
ValueSet
length limitSigned-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for fc2fa65 - Browse repository at this point
Copy the full SHA fc2fa65View commit details
Commits on Feb 7, 2019
-
Add some utility impls for
Record
These have to be in `-core` due to the orphan rules, but seem very handy. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for e56cb74 - Browse repository at this point
Copy the full SHA e56cb74View commit details -
Fix callsite macro not accepting string field names
The `trace_dbg!` macro requires this. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 7f590f5 - Browse repository at this point
Copy the full SHA 7f590f5View commit details -
Add From<Subscriber> impl for Dispatch
See also tokio-rs/tracing@5296a4c Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for f2c8354 - Browse repository at this point
Copy the full SHA f2c8354View commit details
Commits on Feb 12, 2019
-
tokio-trace: Extend macros to allow trailing commas (#891)
Trailing commas are optional when fields are included, and when fields are delimited from the format string for the message. Before these would error: ``` event!(tokio_trace::Level::DEBUG, foo = 3, bar = 3,); event!(tokio_trace::Level::DEBUG, { foo = 2, bar = 78, }, "baz"); ``` Now they do not. Tests have been extended. Signed-off-by: Kevin Leimkuhler <kevinl@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 93e66e6 - Browse repository at this point
Copy the full SHA 93e66e6View commit details -
tokio-trace: Extend
span!
rules (#893)* tokio-trace: Extend `span!` rules Add the ability to define a target and log level for individual spans. `level: ...` must be included since both `$lvl` and `$name` are `expr`. The macro tests and documentation tests have been extended. Signed-off-by: Kevin Leimkuhler <kevinl@buoyant.io> * Add additional `span!` test Change default log level of `span!` to `TRACE` to reflect the default level used in `callsite!`. Signed-off-by: Kevin Leimkuhler <kevinl@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 4b163eb - Browse repository at this point
Copy the full SHA 4b163ebView commit details
Commits on Feb 19, 2019
-
Don't publish
tokio-trace
/tokio-trace-core
yetSigned-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for d3e5735 - Browse repository at this point
Copy the full SHA d3e5735View commit details -
Configuration menu - View commit details
-
Copy full SHA for 37c4dcb - Browse repository at this point
Copy the full SHA 37c4dcbView commit details -
*Actually* rename
Enter
toInner
Looks like RLS missed a couple uses Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for f07bcc2 - Browse repository at this point
Copy the full SHA f07bcc2View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf798d9 - Browse repository at this point
Copy the full SHA bf798d9View commit details