Skip to content

Tasks spawned by #[tokio::main] are not captured #185

Open
@zaharidichev

Description

@zaharidichev

Since a usual pattern is to call console_subscriber::init() at the beginning of the main function, we end up initializing the subscriber after the task spawned by the tokio macro is created. We then end up in a situation where we cannot associate tracing events with any task. The result of that is printing a bunch of error messages to the console.

Related: tokio-rs/tokio#4206

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-bugSeverity: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions