Add a name to the Tokio task (#7544)

The `console-subscriber` feature was added in https://github.com/sigp/lighthouse/pull/7529. However, the names of the running tasks are blank:

<img width="780" alt="image" src="https://github.com/user-attachments/assets/73332a03-20c6-43ba-b810-3d0a898bb236" />


  Set the task name using `tokio::task::Builder`, which is availble when the `tokio_unstable` is enabled.

<img width="924" alt="image" src="https://github.com/user-attachments/assets/26bdac1a-348b-4f83-84b0-adfd2ba3a8cb" />
This commit is contained in:
Akihito Nakano
2025-06-03 14:08:03 +09:00
committed by GitHub
parent f67068e1ec
commit cd83d8d95d
2 changed files with 29 additions and 4 deletions

View File

@@ -10,3 +10,6 @@ futures = { workspace = true }
metrics = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
tracing = { workspace = true }
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(tokio_unstable)"] }