Skip to content

Commit

Permalink
Move increment to after the SA.UpdateRegistrationContact
Browse files Browse the repository at this point in the history
  • Loading branch information
beautifulentropy committed Jan 31, 2025
1 parent 8f83f8e commit c574f16
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ra/ra.go
Original file line number Diff line number Diff line change
Expand Up @@ -1292,12 +1292,6 @@ func (ra *RegistrationAuthorityImpl) UpdateRegistrationContact(ctx context.Conte
return nil, fmt.Errorf("invalid contact: %w", err)
}

// TODO(#7966): Remove once the rate of registrations with contacts has
// been determined.
for range req.Contacts {
ra.newOrUpdatedContactCounter.With(prometheus.Labels{"new": "false"}).Inc()
}

update, err := ra.SA.UpdateRegistrationContact(ctx, &sapb.UpdateRegistrationContactRequest{
RegistrationID: req.RegistrationID,
Contacts: req.Contacts,
Expand All @@ -1306,6 +1300,12 @@ func (ra *RegistrationAuthorityImpl) UpdateRegistrationContact(ctx context.Conte
return nil, fmt.Errorf("failed to update registration contact: %w", err)
}

// TODO(#7966): Remove once the rate of registrations with contacts has
// been determined.
for range req.Contacts {
ra.newOrUpdatedContactCounter.With(prometheus.Labels{"new": "false"}).Inc()
}

return update, nil
}

Expand Down

0 comments on commit c574f16

Please sign in to comment.