mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 00:47:48 +08:00
Mark span status as error when fatal error occurs.
Before this only recorded errors instead of setting the span status, which makes it harder to dig through. Now an error that bubbles is reflected in the span status. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
084b6c0a95
commit
b6474d43a9
@ -217,8 +217,7 @@ func resolveDrivers(ctx context.Context, drivers []DriverInfo, auth Auth, opt ma
|
||||
}
|
||||
|
||||
err = eg.Wait()
|
||||
span.RecordError(err)
|
||||
span.End()
|
||||
tracing.FinishWithError(span, err)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
@ -684,8 +683,7 @@ func Build(ctx context.Context, drivers []DriverInfo, opt map[string]Options, do
|
||||
eg.Go(func() (err error) {
|
||||
defer func() {
|
||||
if span != nil {
|
||||
span.RecordError(err)
|
||||
span.End()
|
||||
tracing.FinishWithError(span, err)
|
||||
}
|
||||
}()
|
||||
pw := progress.WithPrefix(w, "default", false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user