Aggregate provider shutdown errors with errors.Join

Merged
OpenTelemetry Go SDKIssue #1467

Engineering impact

Reported that pkg/runtime.Shutdown() assigned every provider's shutdown error to the same variable, so failures from the tracer, meter, and logger providers overwrote one another. Callers received only the last error and could not inspect earlier failures with errors.Is or errors.As. Proposed aggregating all non-nil provider errors with errors.Join; the fix was merged upstream with a multi-error regression test.

Tech stack

Go
OpenTelemetry
errors.Join
Testing
GitHub
LinkedIn