Further refine score distribution summary

This commit is contained in:
Chris Eager 2022-03-03 17:20:55 -08:00 committed by Chris Eager
parent f9c1e411aa
commit a984b3640e
1 changed files with 3 additions and 2 deletions

View File

@ -105,8 +105,9 @@ public class EnterpriseRecaptchaClient implements RecaptchaClient {
final DistributionSummary.Builder distributionSummaryBuilder = DistributionSummary.builder(
SCORE_DISTRIBUTION_NAME)
.minimumExpectedValue(0.0d)
.maximumExpectedValue(1.0d)
// score is 0.01.0, which doesnt play well with distribution summary bucketing, so scale to 0100
.scale(100)
.maximumExpectedValue(100.0d)
.tags("action", String.valueOf(expectedAction));
distributionSummaryBuilder.register(Metrics.globalRegistry).record(score);