From e489539df415e30e637c37dcd24f744ab9869c46 Mon Sep 17 00:00:00 2001 From: guyben Date: Fri, 31 May 2019 06:41:20 -0700 Subject: [PATCH] Enable more DNS update metrics on production They are useful for viewing and diagnosing problems, and are not that expensive. We aren't enabling all the metrics though - the whole "per batch / per domain" performance indicators are still disabled ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=250876554 --- java/google/registry/dns/DnsMetrics.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/java/google/registry/dns/DnsMetrics.java b/java/google/registry/dns/DnsMetrics.java index 200b6aff9..bf4386090 100644 --- a/java/google/registry/dns/DnsMetrics.java +++ b/java/google/registry/dns/DnsMetrics.java @@ -220,10 +220,15 @@ public class DnsMetrics { Duration processingDuration, int numberOfDomains, int numberOfHosts) { - // We don't want to record all these metrics in production, as they are quite expensive + commitCount.increment(tld, status.name(), dnsWriter); + domainsCommittedCount.incrementBy(numberOfDomains, tld, status.name(), dnsWriter); + hostsCommittedCount.incrementBy(numberOfHosts, tld, status.name(), dnsWriter); + + // We don't want to record the following metrics in production, as they are quite expensive if (registryEnvironment == RegistryEnvironment.PRODUCTION) { return; } + int batchSize = numberOfDomains + numberOfHosts; processingTimePerCommitDist.record( @@ -244,10 +249,6 @@ public class DnsMetrics { totalBatchSizePerCommitDist.record(batchSize, tld, status.name(), dnsWriter); totalBatchSizePerItemDist.record(batchSize, batchSize, tld, status.name(), dnsWriter); - - commitCount.increment(tld, status.name(), dnsWriter); - domainsCommittedCount.incrementBy(numberOfDomains, tld, status.name(), dnsWriter); - hostsCommittedCount.incrementBy(numberOfHosts, tld, status.name(), dnsWriter); } void recordActionResult(