Open beorn7 opened 3 years ago
Also, check what flavors of multi-error other parts of the Prometheus ecosystem are using.
I moved our Prometheus multi error to separate module so it's easy to use. The plan would be to use that on Promeheus too (if team agress). Also Thanos etc
It's here: https://github.com/efficientgo/tools/tree/main/core/pkg/merrors
Do you think it would be easier to just focus on one? I used same formatting. We could think of customizing formatting. I think can allow this. WDYT?
To keep things in scope of this issue: We can only change the MultiError in client_golang when we bump the major version. That won't happen tomorrow, so I'd say just do whatever is best for the MultiError in a more general Prometheus (or even wider) context. Once we get to solving this issue here, we'll just check if it it a fit (which I assume it will).
I mostly assigned this to myself as a “default” because I used to be the maintainer of this repo. Therefore, I'm un-assigning this from myself no. New maintainers @bwplotka & @kakkoyun, please deal with this as you see fit.
The ad-hoc
prometheus.MultiError
implementation doesn't support the new goodies from the standarderrors
package. It also formats into a multi-line error string, which is undesired by some users.Both could be solved by replacing it with something like https://github.com/hashicorp/go-multierror , which allows customizable formatting. However, it would break existing users and therefore has to be a v2 feature.