core: remove Collect
default impls for 0.2
#1262
Labels
crate/core
Related to the `tracing-core` crate
good first issue
Good for newcomers
kind/feature
New feature or request
meta/breaking
This is a breaking change, and should wait until the next breaking release.
Milestone
Feature Request
Crates
tracing-core
Motivation
The
Collect
trait currently has several methods with default implementations that return anOption
or some other "empty" or "default" type. In many cases, this isn't because it makes sense for those methods to be optional, but because they were added after v0.1.0 was released and making them mandatory would have been a breaking change. This can sometimes cause issues when implementations forget to override the default implementations and miss out on important behavior.Proposal
For 0.2, we should consider making some of these methods mandatory so that implementations can't overlook them. In particular:
Collect::max_level_hint
probably shouldn't have a defaultNone
return value (and we should maybe get rid of theOption
? is it actually worth differentiating between "may enable up to TRACE" and "just doesn't care about levels at all"?)Collect::current_span
defaults to returningspan::Current::unknown
. Saying "I don't know what the current span is" should be an explicit decision on behalf of the collector in 0.2The text was updated successfully, but these errors were encountered: