In D3D12 and Vulkan, it's possible to add a debug label to the queue, rather than the command encoder / render pass:
https://renderdoc.org/vkspec_chunked/chap46.html#debugging-queue-labels
https://devblogs.microsoft.com/pix/winpixeventruntime/
It's often much more convenient to use than the CommandEncoder equivalent, since it happens on the queue timeline, and can surround upload events as well.
No clue about Metal.