Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracing: fix spawn_blocking location fields #5573

Merged
merged 1 commit into from Mar 22, 2023
Merged

Commits on Mar 22, 2023

  1. tracing: fix spawn_blocking location fields

    In a previous PR (#4128), the `spawn.location` field on task spans was
    structured into 3 separate fields for the `file`, `line`, and `col`.
    There is a separately created span for blocking tasks which was missed.
    
    This caused tasks created with `spawn_blocking` to appear in
    `tokio-console` without a location, but with an additional "free form"
    field containing the formatted source code location.
    
    This change modifies this span to use the same format. The span creation
    needs to be separate from the other task spans because it records the
    function name. This information is useful in the `spawn_blocking` case,
    but can be "catastrophically long" in the `async fn` case and was
    removed in #3074.
    hds committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    878ee1e View commit details
    Browse the repository at this point in the history