Skip to content

Commit

Permalink
sql: add tracing span for index recommendation
Browse files Browse the repository at this point in the history
Informs #131544

Release note: None
  • Loading branch information
rytaft committed Nov 15, 2024
1 parent 724c140 commit bed6a5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/sql/plan_opt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.EnsureChildSpan(ctx, opc.p.execCfg.AmbientCtx.Tracer, "index recommendation")
defer sp.Finish()

defer func() {
if r := recover(); r != nil {
// This code allows us to propagate internal errors without having to add
Expand Down

0 comments on commit bed6a5d

Please sign in to comment.