Skip to content

Commit

Permalink
nomad: Use failuresCount counter
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Pivotto <[email protected]>
  • Loading branch information
roidelapluie committed Jun 30, 2022
1 parent d9347bf commit 466f053
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions discovery/nomad/nomad.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ func (d *Discovery) refresh(ctx context.Context) ([]*targetgroup.Group, error) {
}
stubs, _, err := d.client.Services().List(opts)
if err != nil {
failuresCount.Inc()
return nil, err
}

Expand All @@ -178,6 +179,7 @@ func (d *Discovery) refresh(ctx context.Context) ([]*targetgroup.Group, error) {
for _, service := range stub.Services {
instances, _, err := d.client.Services().Get(service.ServiceName, opts)
if err != nil {
failuresCount.Inc()
return nil, fmt.Errorf("failed to fetch services: %w", err)
}

Expand Down

0 comments on commit 466f053

Please sign in to comment.