From c57b18b48f434c305679290ce05a42a46082c598 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 28 Feb 2024 15:25:40 -0500 Subject: [PATCH] cmd/go: always include action mode in trace name For actions with no package, the title "Executing action" is extremely vague. Add the action mode so that there is some differentiation. Change-Id: If6dcf81c7cd1f19a9532e56dd9f88abd1182ea97 Reviewed-on: https://go-review.googlesource.com/c/go/+/567936 Reviewed-by: Michael Matloob Reviewed-by: Bryan Mills LUCI-TryBot-Result: Go LUCI --- src/cmd/go/internal/work/exec.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go index 92aa0c1dc5..505186da08 100644 --- a/src/cmd/go/internal/work/exec.go +++ b/src/cmd/go/internal/work/exec.go @@ -139,10 +139,11 @@ func (b *Builder) Do(ctx context.Context, root *Action) { var err error if a.Actor != nil && (!a.Failed || a.IgnoreFail) { // TODO(matloob): Better action descriptions - desc := "Executing action " + desc := "Executing action (" + a.Mode if a.Package != nil { - desc += "(" + a.Mode + " " + a.Package.Desc() + ")" + desc += " " + a.Package.Desc() } + desc += ")" ctx, span := trace.StartSpan(ctx, desc) a.traceSpan = span for _, d := range a.Deps { -- 2.48.1