Skip to content

Commit

Permalink
Prepare for 0.7 (#16)
Browse files Browse the repository at this point in the history
* Bump version to 0.7.0

* Depend directly on tracing-core

So we don't turn on any unwanted tracing features

* Bump dependencies

* Fix doc comment

* Use GitHub link for screenshot in README.md
  • Loading branch information
thoren-d authored Nov 15, 2022
1 parent a30bfb7 commit 8760d81
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tracing-chrome"
version = "0.6.0"
version = "0.7.0"

authors = ["Thoren Paulson <[email protected]>"]
categories = ["asynchronous", "development-tools::debugging", "development-tools::profiling"]
Expand All @@ -15,13 +15,14 @@ repository = "https://github.com/thoren-d/tracing-chrome"
[dependencies]
crossbeam-channel = "0.5.6"
json = "0.12.4"
tracing = "0.1.21"
tracing-subscriber = "0.3.1"
tracing-core = "0.1.30"
tracing-subscriber = "0.3.16"


[dev-dependencies]
criterion = "0.3.5"
rayon = "1.5.2"
criterion = "0.3.6"
rayon = "1.5.3"
tracing = "0.1.37"


[[bench]]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ When `_guard` is dropped, your trace will be in a file like `trace-1668480819035

Open that file with [ui.perfetto.dev](https://ui.perfetto.dev) (or `chrome://tracing`) and take a look at your pretty trace.

![](doc/images/perfetto-screenshot.png)
![](https://github.com/thoren-d/tracing-chrome/raw/develop/doc/images/perfetto-screenshot.png)

# License

Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use crossbeam_channel::Sender;

use tracing::{span, Event, Subscriber};
use tracing_core::{field::Field, span, Event, Subscriber};
use tracing_subscriber::{
layer::Context,
registry::{LookupSpan, SpanRef},
Expand Down Expand Up @@ -261,7 +261,7 @@ enum Message {
StartNew(Option<Box<dyn Write + Send>>),
}

/// Represents either an [`Event`](tracing::Event) or [`SpanRef`](tracing_subscriber::registry::SpanRef).
/// Represents either an [`Event`](tracing_core::Event) or [`SpanRef`](tracing_subscriber::registry::SpanRef).
pub enum EventOrSpan<'a, 'b, S>
where
S: Subscriber + for<'span> LookupSpan<'span> + Send + Sync,
Expand Down Expand Up @@ -607,7 +607,7 @@ struct JsonVisitor<'a> {
}

impl<'a> tracing_subscriber::field::Visit for JsonVisitor<'a> {
fn record_debug(&mut self, field: &tracing::field::Field, value: &dyn std::fmt::Debug) {
fn record_debug(&mut self, field: &Field, value: &dyn std::fmt::Debug) {
self.object
.insert(field.name(), JsonValue::String(format!("{:?}", value)));
}
Expand Down

0 comments on commit 8760d81

Please sign in to comment.