Define reregistrationIdleDays DistributionSummary with custom expiry

This commit is contained in:
Katherine Yen 2022-12-20 09:21:24 -08:00 committed by GitHub
parent cb5d3840d9
commit 2c2c497c12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -129,7 +129,11 @@ public class AccountController {
private static final String CAPTCHA_ATTEMPT_COUNTER_NAME = name(AccountController.class, "captcha");
private static final String CHALLENGE_ISSUED_COUNTER_NAME = name(AccountController.class, "challengeIssued");
private static final DistributionSummary REREGISTRATION_IDLE_DAYS_DISTRIBUTION_NAME = Metrics.summary(name(AccountController.class, "reregistrationIdleDays"));
private static final DistributionSummary REREGISTRATION_IDLE_DAYS_DISTRIBUTION_NAME = DistributionSummary
.builder(name(AccountController.class, "reregistrationIdleDays"))
.publishPercentiles(0.75, 0.95, 0.99, 0.999)
.distributionStatisticExpiry(Duration.ofHours(2))
.register(Metrics.globalRegistry);
private static final String NONSTANDARD_USERNAME_COUNTER_NAME = name(AccountController.class, "nonStandardUsername");