Further refine score distribution summary

This commit is contained in:
Chris Eager authored and Chris Eager committed 2022-03-04 11:44:17 -08:00
1 parent f9c1e411aa
commit a984b3640e
1 file changed
+3 -2
@@ -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.0…1.0, which doesn’t play well with distribution summary bucketing, so scale to 0…100
.scale(100)
.maximumExpectedValue(100.0d)
.tags("action", String.valueOf(expectedAction));
distributionSummaryBuilder.register(Metrics.globalRegistry).record(score);