Skip to content

subscriber: Rename Layer::new_span method for consistency #630

Closed
@yaahc

Description

@yaahc

Right now the four event handling fns spans in the Layer trait are called

on_exit, on_enter, on_close, and new_span

new_span breaks the pattern set by the other methods and can be a little surprising / confusing, I spent more than a few seconds trying to find a method called on_open.

Next time we are making breaking changes we should consider renaming new_span to on_new_span or on_open.

Metadata

Metadata

Assignees

No one assigned

    Labels

    crate/subscriberRelated to the `tracing-subscriber` cratemeta/breakingThis is a breaking change, and should wait until the next breaking release.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions