diff --git a/pkg/sql/plan_opt.go b/pkg/sql/plan_opt.go index e9780c219823..757892a85d4d 100644 --- a/pkg/sql/plan_opt.go +++ b/pkg/sql/plan_opt.go @@ -967,6 +967,9 @@ func (p *planner) DecodeGist(ctx context.Context, gist string, external bool) ([ func (opc *optPlanningCtx) makeQueryIndexRecommendation( ctx context.Context, ) (_ []indexrec.Rec, err error) { + ctx, sp := tracing.ChildSpan(ctx, "index recommendation") + defer sp.Finish() + defer func() { if r := recover(); r != nil { // This code allows us to propagate internal errors without having to add