@@ -62,7 +62,7 @@ public Result rotateSalts(
6262 logSaltAges ("refreshable-salts" , targetDate , refreshableSalts );
6363 logSaltAges ("rotated-salts" , targetDate , saltsToRotate );
6464 logSaltAges ("total-salts" , targetDate , Arrays .asList (postRotationSalts ));
65- logKeyBucketCount (targetDate , preRotationSalts , postRotationSalts );
65+ logBucketFormatCount (targetDate , preRotationSalts , postRotationSalts );
6666
6767 var nextSnapshot = new SaltSnapshot (
6868 nextEffective ,
@@ -247,18 +247,20 @@ private void logSaltAges(String saltCountType, TargetDate targetDate, Collection
247247 }
248248 }
249249
250- private void logKeyBucketCount (TargetDate targetDate , SaltEntry [] preRotationSalts , SaltEntry [] postRotationSalts ) {
251- int newKeyBucketCounter = 0 ;
252- int totalKeyBucketCounter = 0 ;
250+ private void logBucketFormatCount (TargetDate targetDate , SaltEntry [] preRotationSalts , SaltEntry [] postRotationSalts ) {
251+ int newKeyBucketCounter = 0 , totalKeyBucketCounter = 0 , totalSaltBucketCounter = 0 ;
252+
253253 for (int i = 0 ; i < preRotationSalts .length && i < postRotationSalts .length ; i ++) {
254254 var oldSalt = preRotationSalts [i ];
255255 var updatedSalt = postRotationSalts [i ];
256256
257257 if (updatedSalt .currentKey () != null ) totalKeyBucketCounter ++;
258+ if (updatedSalt .currentSalt () != null ) totalSaltBucketCounter ++;
258259 if (updatedSalt .currentKey () != null && oldSalt .currentSalt () != null ) newKeyBucketCounter ++;
259260 }
260- LOGGER .info ("salt_bucket_count_type={} target_date={} bucket_count={}" , "new-key-buckets" , targetDate , newKeyBucketCounter );
261- LOGGER .info ("salt_bucket_count_type={} target_date={} bucket_count={}" , "total-key-buckets" , targetDate , totalKeyBucketCounter );
261+
262+ LOGGER .info ("Salt rotation bucket format: target_date={} new_key_bucket_count={} total_key_bucket_count={} total_salt_bucket_count={}" ,
263+ targetDate , newKeyBucketCounter , totalKeyBucketCounter , totalSaltBucketCounter );
262264 }
263265
264266 @ Getter
0 commit comments