mirror of
https://github.com/google/nomulus
synced 2026-01-08 23:23:32 +00:00
Use the actual EPP command flow name for EppMetrics
It was previously only using the name of the inner command XML element, e.g. "Create", "Delete", "Update", etc. This wasn't very useful because there was no way to discriminate between operations on different types of EPP resources. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=151131491
This commit is contained in:
@@ -85,7 +85,6 @@ public final class EppController {
|
||||
metricBuilder.setStatus(e.getResult().getCode());
|
||||
return getErrorResponse(e.getResult(), Trid.create(null));
|
||||
}
|
||||
metricBuilder.setCommandName(eppInput.getCommandName());
|
||||
if (!eppInput.getTargetIds().isEmpty()) {
|
||||
metricBuilder.setEppTarget(Joiner.on(',').join(eppInput.getTargetIds()));
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ public class FlowRunner {
|
||||
@Inject TransportCredentials credentials;
|
||||
@Inject EppRequestSource eppRequestSource;
|
||||
@Inject Provider<Flow> flowProvider;
|
||||
@Inject Class<? extends Flow> flowClass;
|
||||
@Inject @InputXml byte[] inputXmlBytes;
|
||||
@Inject @DryRun boolean isDryRun;
|
||||
@Inject @Superuser boolean isSuperuser;
|
||||
@@ -92,6 +93,7 @@ public class FlowRunner {
|
||||
"clientId", clientId,
|
||||
"xml", prettyXml,
|
||||
"xmlBytes", xmlBase64)));
|
||||
metric.setCommandNameFromFlow(flowClass.getSimpleName());
|
||||
if (!isTransactional) {
|
||||
metric.incrementAttempts();
|
||||
return EppOutput.create(flowProvider.get().run());
|
||||
|
||||
Reference in New Issue
Block a user