### Fixed
- **docs**: Incorrect formatting (#862)
### Changed
- **filter**: `LevelFilter` is now a re-export of the
`tracing_core::LevelFilter` type, it can now be used interchangably
with the versions in `tracing` and `tracing-core` (#853)
- **filter**: Significant performance improvements when comparing
`LevelFilter`s and `Level`s (#853)
- Updated the minimum `tracing-core` dependency to 0.1.12 (#853)
### Added
- **filter**: `LevelFilter` and `EnvFilter` now participate in
`tracing-core`'s max level hinting, improving performance
significantly in some use cases where levels are disabled globally
(#853)
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
### Fixed
- **fmt**: Fixed compilation failure on MSRV when the `chrono` feature
is disabled (#844)
### Added
- **fmt**: Span lookup methods defined by `layer::Context` are now also
provided by `FmtContext` (#834)
### Changed
- **fmt**: When the `chrono` dependency is enabled, the `SystemTime`
timestamp now emits human-readable timestamps rather than using
`SystemTime`'s fmt::Debug`implementation (`chrono` is still required
for customized timestamp formatting) (#807)
- **ansi**: Updated `ansi_term` dependency to 0.12 (#816)
### Added
- **json**: `with_span_list` method to configure the JSON formatter to
include a list of all spans in the current trace in formatting events
(similarly to the text formatter) (#741)
- **json**: `with_current_span` method to configure the JSON formatter
to include a field for the _current_ span (the leaf of the trace) in
formatted events (#741)
- **fmt**: `with_thread_names` and `with_thread_ids` methods to
configure `fmt::Subscriber`s and `fmt::Layer`s to include the thread
name and/or thread ID of the current thread when formatting events
(#818)
Thanks to new contributors @mockersf, @keetonian, and @Pothulapati for
contributing to this release!
### Changed
- **parking_lot**: Updated the optional `parking_lot` dependency to
accept the latest `parking_lot` version (#774)
### Fixed
- **fmt**: Fixed events with explicitly overridden parent spans being
formatted as though they were children of the current span (#767)
### Added
- **fmt**: Added the option to print synthesized events when spans are
created, entered, exited, and closed, including span durations (#761)
- Documentation clarification and improvement (#762, #769)
Thanks to @rkuhn, @greenwoodcm, and @Ralith for contributing to this
release!
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Fixed
- **fmt**: Fixed an issue in the JSON formatter where using
`Span::record` would result in malformed spans (#709)
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
# 0.2.4 (April 6, 2020)
This release includes several API ergonomics improvements, including
shorthand constructors for many types, and an extension trait for
initializing subscribers using method-chaining style. Additionally,
several bugs in less commonly used `fmt` APIs were fixed.
### Added
- **fmt**: Shorthand free functions for constructing most types in `fmt`
(including `tracing_subscriber::fmt()` to return a
`SubscriberBuilder`, `tracing_subscriber::fmt::layer()` to return a
format `Layer`, etc) (#660)
- **registry**: Shorthand free function `tracing_subscriber::registry()`
to construct a new registry (#660)
- Added `SubscriberInitExt` extension trait for more ergonomic
subscriber initialization (#660)
### Changed
- **fmt**: Moved `LayerBuilder` methods to `Layer` (#655)
### Deprecated
- **fmt**: `LayerBuilder`, as `Layer` now implements all builder methods
(#655)
### Fixed
- **fmt**: Fixed `Compact` formatter not omitting levels with
`with_level(false)` (#657)
- **fmt**: Fixed `fmt::Layer` duplicating the fields for a new span if
another layer has already formatted its fields (#634)
- **fmt**: Added missing space when using `record` to add new fields to
a span that already has fields (#659)
- Updated outdated documentation (#647)
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
# 0.2.3 (March 5, 2020)
### Fixed
- **env-filter**: Regression where filter directives were selected in the order
they were listed, rather than most specific first (#624)
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
### Changed
- **filter**: `EnvFilter` directive selection now behaves correctly
(i.e. like `env_logger`) (#583)
### Fixed
- **filter**: Fixed `EnvFilter` incorrectly allowing less-specific
filter directives to enable events that are disabled by more-specific
filters (#583)
- **filter**: Multiple significant `EnvFilter` performance
improvements, especially when filtering events generated by `log`
records (#578, #583)
- **filter**: Replaced `BTreeMap` with `Vec` in `DirectiveSet`,
improving iteration performance significantly with typical numbers of
filter directives (#580)
A big thank-you to @samschlegel for lots of help with `EnvFilter`
performance tuning in this release!
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
# 0.2.0 (February 4, 2020)
### Breaking Changes
- **fmt**: Renamed `Context` to `FmtContext` (#420, #425)
- **fmt**: Renamed `Builder` to `SubscriberBuilder` (#420)
- **filter**: Removed `Filter`. Use `EnvFilter` instead (#434)
### Added
- **registry**: `Registry`, a `Subscriber` implementation that `Layer`s
can use as a high-performance, in-memory span store. (#420, #425,
#432, #433, #435)
- **registry**: Added `LookupSpan` trait, implemented by `Subscriber`s
to expose stored span data to `Layer`s (#420)
- **fmt**: Added `fmt::Layer`, to allow composing log formatting with
other `Layer`s
- **fmt**: Added support for JSON field and event formatting (#377,
#415)
- **filter**: Documentation for filtering directives (#554)
### Changed
- **fmt**: Renamed `Context` to `FmtContext` (#420, #425) (BREAKING)
- **fmt**: Renamed `Builder` to `SubscriberBuilder` (#420) (BREAKING)
- **fmt**: Reimplemented `fmt::Subscriber` in terms of the `Registry`
and `Layer`s (#420)
### Removed
- **filter**: Removed `Filter`. Use `EnvFilter` instead (#434)
(BREAKING)
### Fixed
- **fmt**: Fixed memory leaks in the slab used to store per-span data
(3c35048)
- **fmt**: `fmt::SubscriberBuilder::init` not setting up `log`
compatibility (#489)
- **fmt**: Spans closed by a child span closing not also closing
_their_ parents (#514)
- **Layer**: Fixed `Layered` subscribers failing to downcast to their
own type (#549)
- **Layer**: Fixed `Layer::downcast_ref` returning invalid references
(#454)
Fixes#515Fixes#458
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
### Added:
- **env_filter**: Documentation for filtering directives (#554)
- **registry**, **env_filter**: Updated `smallvec` dependency to 0.1
(#543)
### Fixed:
- **registry**: Fixed a memory leak in the slab used to store per-span
data (3c35048)
- **Layer**: Fixed `Layered` subscribers failing to downcast to their
own type (#549)
- **fmt**: Fixed a panic when multiple layers insert `FormattedFields`
extensions from the same formatter type (1c3bb70)
- **fmt**: Fixed `fmt::Layer::on_record` inserting a new
`FormattedFields` when formatted fields for a span already exist
(1c3bb70)
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
* subscriber: prepare to release 0.2.0-alpha.3
### Added
- **fmt**: Public `FormattedFields::new` constructor (#478)
- **fmt**: Added examples to `fmt::Layer` documentation (#510)
- Documentation now shows what feature flags are required by each API item (#525)
### Fixed
- **fmt**: Missing space between timestamp and level (#480)
- **fmt**: Incorrect formatting with `with_target(false)` (#481)
- **fmt**: `fmt::SubscriberBuilder::init` not setting up `log` compatibility
(#489)
- **registry**: Spans exited out of order not being closed properly on exit
(#509)
- **registry**: Memory leak when spans are closed by a child span closing (#514)
- **registry**: Spans closed by a child span closing not also closing _their_
parents (#514)
- Compilation errors with `no-default-features` (#499, #500)
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
This branch updates all the README links and badges. In particular, it:
* Changes build status badges to GitHub Actions, since we've turned off
the Azure Pipelines CI build,
* Removes Gitter links, since nobody is on Gitter these days and we
probably don't want to point new users to an empty chat room,
* Make Discord links "actually work"
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Tokio is experimenting with Discord, and the Tokio discord server has
a Tracing channel. This PR adds Discord links to READMEs.
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
### Fixed:
- Spans entered twice on the same thread sometimes being completely
exited when the more deeply-nested entry is exited (#361)
- Setting `with_ansi(false)` on `FmtSubscriber` not disabling ANSI color
formatting for timestamps (#354)
- Incorrect reference counting in `FmtSubscriber` that could cause spans
to not be closed when all references are dropped (#366)
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
### Fixed
- `EnvFilter` ignoring directives with targets that are the same number
of characters (#333)
- `EnvFilter` failing to properly apply filter directives to events
generated from `log` records by`tracing-log` (#344)
### Changed
- Renamed `Filter` to `EnvFilter`, deprecated `Filter` (#339)
- Renamed "filter" feature flag to "env-filter", deprecated "filter" (#339)
- `FmtSubscriber` now defaults to enabling only the `INFO` level and
above when a max level filter or `EnvFilter` is not set (#336)
### Added:
- `EnvFilter::add_directive` to add new directives to filters after they
are constructed (#334)
- `fmt::Builder::with_max_level` to set a global level filter for a
`FmtSubscriber` without requiring the use of `EnvFilter` (#336)
- `Layer` implementation for `LevelFilter` (#336)
- `EnvFilter` now implements `fmt::Display` (#329)
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
chore: build and publish documentation for each branch.
This commit introduces support for:
- building and deploying documentation for the master branch
- building and deploying (preview) documentation for each pull request
and for each PR
- adds a link in `README.md` pointing to the generated documentation
for the master branch
- notes the per-PR documentation previews in `CONTRIBUTING.md`
Closes#210
## Motivation
There's been demand for a crates.io release of the `tracing-subscriber`
crate, particularly so that the `Layer` type (which is relatively
stable) may be used in other crates.
## Solution
This branch prepares `tracing-subscriber` to release an alpha. I've
updated the documentation and Cargo.toml, and added a README.
* subscriber: rm unneeded dev-dependency
* subscriber: add README
* subscriber: add lib.rs docs
* subscriber: update README
Signed-off-by: Eliza Weisman <eliza@buoyant.io>