Commit 87e7b08
authored
Improve "make root node" trace attributes (#92941)
### What?
Improve the trace span attributes for "make root node" operations in the
turbo-tasks backend. Instead of recording only the raw `task_id`, the
spans now include a human-readable task description (type name + task
ID) via `debug_get_task_description`.
### Why?
When profiling or debugging with tracing tools, raw task IDs are opaque
and require additional lookups to understand which task is being
processed. Including a human-readable task description (e.g. `TaskId(42)
MyFunction(args...)`) makes traces immediately actionable.
Two spans were affected:
- `"make root node for strongly consistent read"` in `backend/mod.rs`
- `"make root node for removing collectible"` in
`backend/operation/update_collectible.rs`
### How?
- Added `debug_get_task_description` method to the `ExecuteContext`
trait in `operation/mod.rs`
- Implemented it on `ExecuteContextImpl` by delegating to the existing
`backend.debug_get_task_description` method (already used in other
tracing spans)
- Replaced `%task_id` (which formats only the ID) with `task =
self.debug_get_task_description(task_id)` / `task =
ctx.debug_get_task_description(task_id)` in both span definitions
<!-- NEXT_JS_LLM_PR -->1 parent 1aeb6b1 commit 87e7b08
File tree
3 files changed
+7
-2
lines changed- turbopack/crates/turbo-tasks-backend/src/backend
- operation
3 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
555 | 555 | | |
556 | 556 | | |
557 | 557 | | |
558 | | - | |
| 558 | + | |
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
1007 | 1008 | | |
1008 | 1009 | | |
1009 | 1010 | | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
1010 | 1015 | | |
1011 | 1016 | | |
1012 | 1017 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments