mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02: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:
parent
0d32b6b7b2
commit
4260fb573f
5 changed files with 36 additions and 15 deletions
|
@ -14,6 +14,7 @@
|
|||
|
||||
package google.registry.monitoring.whitebox;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static google.registry.bigquery.BigqueryUtils.toBigqueryTimestamp;
|
||||
|
||||
import com.google.api.services.bigquery.model.TableFieldSchema;
|
||||
|
@ -141,7 +142,14 @@ public abstract class EppMetric implements BigQueryMetric {
|
|||
|
||||
abstract Builder setEndTimestamp(DateTime endTimestamp);
|
||||
|
||||
public abstract Builder setCommandName(String commandName);
|
||||
abstract Builder setCommandName(String commandName);
|
||||
|
||||
public Builder setCommandNameFromFlow(String flowSimpleClassName) {
|
||||
checkArgument(
|
||||
flowSimpleClassName.endsWith("Flow"),
|
||||
"Must pass in the simple class name of a flow class");
|
||||
return setCommandName(flowSimpleClassName.replaceFirst("Flow$", ""));
|
||||
}
|
||||
|
||||
public abstract Builder setClientId(String clientId);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue