Apply suggestions from code review

Co-authored-by: Charles Korn <charleskorn@users.noreply.github.com>
This commit is contained in:
Arve Knudsen 2023-11-10 08:02:13 +01:00 committed by GitHub
parent 92606f3b52
commit e1e64f36c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -140,12 +140,12 @@ func (p *postingsForMatcherPromise) result(ctx context.Context) (index.Postings,
return nil, ctx.Err() return nil, ctx.Err()
} }
if p.err != nil { if p.err != nil {
span.AddEvent("failed postingsForMatchers promise", trace.WithAttributes( span.AddEvent("postingsForMatchers promise completed with error", trace.WithAttributes(
attribute.String("err", p.err.Error()), attribute.String("err", p.err.Error()),
)) ))
return nil, p.err return nil, p.err
} }
span.AddEvent("successful postingsForMatchers promise") span.AddEvent("postingsForMatchers promise completed successfully")
return p.cloner.Clone(), nil return p.cloner.Clone(), nil
} }
} }