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: use structured location fields for spawned tasks #4128

Merged

Conversation

zaharidichev
Copy link
Contributor

This change enables tokio-console to parse the location information
for a spawned task into a structured object rather than simply displaying
this info as a field on the task.

Signed-off-by: Zahari Dichev zaharidichev@gmail.com

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@zaharidichev zaharidichev merged commit b9b59e4 into tokio-rs:master Sep 22, 2021
hawkw pushed a commit to tokio-rs/console that referenced this pull request Sep 22, 2021
This PR extracts the spawn location of a task into a separate
column, in the case where structured location information is
present. This depends on: tokio-rs/tokio#4128


<img width="1393" alt="Screenshot 2021-09-22 at 22 56 50" src="https://user-images.githubusercontent.com/4391506/134412983-cae97ed9-c832-48b0-9584-f15dd25032e2.png">

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
suikammd pushed a commit to suikammd/tokio that referenced this pull request Oct 7, 2021
)

This change enables `tokio-console` to parse the location information
for a spawned task into a structured object rather than simply displaying
this info as a field on the task.

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
hds added a commit that referenced this pull request Mar 22, 2023
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 added a commit that referenced this pull request Mar 22, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants