next.js
87e7b083 - Improve "make root node" trace attributes (#92941)

Commit
76 days ago
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 -->
Author
Parents
Loading