mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-13 06:47:28 -08: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
|
var tg targetgroup.Group
|
||||||
for tgt := range ch {
|
for tgt := range ch {
|
||||||
if tgt.err != nil {
|
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 {
|
if tgt.labelSet != nil {
|
||||||
tg.Targets = append(tg.Targets, tgt.labelSet)
|
tg.Targets = append(tg.Targets, tgt.labelSet)
|
||||||
|
|
Loading…
Reference in a new issue