mirror of
https://github.com/prometheus/prometheus
synced 2024-12-26 16:43:21 +00:00
Merge pull request #8729 from code1305/azure-sd-errfix
return right error if any target creation fails
This commit is contained in:
commit
d78e9e973e
@ -373,7 +373,7 @@ func (d *Discovery) refresh(ctx context.Context) ([]*targetgroup.Group, error) {
|
||||
var tg targetgroup.Group
|
||||
for tgt := range ch {
|
||||
if tgt.err != nil {
|
||||
return nil, errors.Wrap(err, "unable to complete Azure service discovery")
|
||||
return nil, errors.Wrap(tgt.err, "unable to complete Azure service discovery")
|
||||
}
|
||||
if tgt.labelSet != nil {
|
||||
tg.Targets = append(tg.Targets, tgt.labelSet)
|
||||
|
Loading…
Reference in New Issue
Block a user