Only update parsed time zone metric if the phone number was present

This commit is contained in:
Ameya Lokare authored and Jon Chambers committed 2026-07-29 14:38:39 -04:00
1 parent d46818e465
commit c12206ace0
1 file changed
+3 -1
@@ -49,7 +49,9 @@ public class SchedulingUtil {
return ZonedDateTime.now(clock.withZone(zoneId)).with(preferredTime);
})
.orElseGet(() -> {
Metrics.counter(PARSED_TIMEZONE_COUNTER_NAME, HAS_TIMEZONE_TAG_NAME, String.valueOf(false)).increment();
if (account.getNumberOptional().isPresent()) {
Metrics.counter(PARSED_TIMEZONE_COUNTER_NAME, HAS_TIMEZONE_TAG_NAME, String.valueOf(false)).increment();
}
return ZonedDateTime.now(ZoneId.systemDefault()).with(preferredTime);
});