Use a longer expiration window for quantile calculation

This commit is contained in:
Jon Chambers
2023-01-17 12:40:20 -05:00
committed by Jon Chambers
parent 304782d583
commit accb017ec5

View File

@@ -24,7 +24,11 @@ public class ReportMessageDynamoDb {
private final Duration ttl;
private static final String REMOVED_MESSAGE_COUNTER_NAME = name(ReportMessageDynamoDb.class, "removed");
private static final Timer REMOVED_MESSAGE_AGE_TIMER = Metrics.timer(name(ReportMessageDynamoDb.class, "removedMessageAge"));
private static final Timer REMOVED_MESSAGE_AGE_TIMER = Timer
.builder(name(ReportMessageDynamoDb.class, "removedMessageAge"))
.publishPercentiles(0.5, 0.75, 0.95, 0.99)
.distributionStatisticExpiry(Duration.ofDays(1))
.register(Metrics.globalRegistry);
public ReportMessageDynamoDb(final DynamoDbClient dynamoDB, final String tableName, final Duration ttl) {
this.db = dynamoDB;