Merge pull request #812 from cpuguy83/mark_spans_as_error

Mark span status as error when fatal error occurs.
pull/813/head
Tõnis Tiigi 3 years ago committed by GitHub
commit be2c8f71fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -217,8 +217,7 @@ func resolveDrivers(ctx context.Context, drivers []DriverInfo, auth Auth, opt ma
} }
err = eg.Wait() err = eg.Wait()
span.RecordError(err) tracing.FinishWithError(span, err)
span.End()
if err != nil { if err != nil {
return nil, nil, err 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) { eg.Go(func() (err error) {
defer func() { defer func() {
if span != nil { if span != nil {
span.RecordError(err) tracing.FinishWithError(span, err)
span.End()
} }
}() }()
pw := progress.WithPrefix(w, "default", false) pw := progress.WithPrefix(w, "default", false)

Loading…
Cancel
Save