mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Record a version of EPP metrics with TLD for domain commands
Also fixes the issue that dry run EPP commands were incorrectly being reported on. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=171062984
This commit is contained in:
parent
7e68ffa16a
commit
302a27f0db
13 changed files with 283 additions and 61 deletions
|
@ -17,6 +17,7 @@ package google.registry.flows;
|
|||
import static com.google.common.base.Strings.nullToEmpty;
|
||||
import static com.google.common.io.BaseEncoding.base64;
|
||||
import static google.registry.flows.EppXmlTransformer.unmarshal;
|
||||
import static google.registry.flows.FlowReporter.extractTlds;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
|
@ -89,6 +90,9 @@ public final class EppController {
|
|||
}
|
||||
if (!eppInput.getTargetIds().isEmpty()) {
|
||||
eppMetricBuilder.setEppTarget(Joiner.on(',').join(eppInput.getTargetIds()));
|
||||
if (eppInput.isDomainResourceType()) {
|
||||
eppMetricBuilder.setTlds(extractTlds(eppInput.getTargetIds()));
|
||||
}
|
||||
}
|
||||
EppOutput output = runFlowConvertEppErrors(flowComponentBuilder
|
||||
.flowModule(new FlowModule.Builder()
|
||||
|
@ -106,10 +110,12 @@ public final class EppController {
|
|||
}
|
||||
return output;
|
||||
} finally {
|
||||
EppMetric metric = eppMetricBuilder.build();
|
||||
bigQueryMetricsEnqueuer.export(metric);
|
||||
eppMetrics.incrementEppRequests(metric);
|
||||
eppMetrics.recordProcessingTime(metric);
|
||||
if (!isDryRun) {
|
||||
EppMetric metric = eppMetricBuilder.build();
|
||||
bigQueryMetricsEnqueuer.export(metric);
|
||||
eppMetrics.incrementEppRequests(metric);
|
||||
eppMetrics.recordProcessingTime(metric);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue