mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 17:37:13 +02:00
Cleanup minor things in whitebox metrics code
Specifically: - remove @RequestScope from EppMetric since it's only for components - fix to call the better overload of toBigqueryTimestamp - use the same UUID provider for BigQueryMetricsEnqueuer that already exists for the VerifyEntityIntegrityStreamer - minor cleanup in VerifyEntityIntegrityStreamer (inject projectId vs whole env) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=132721794
This commit is contained in:
parent
2537e95de5
commit
9dffd64dc7
6 changed files with 25 additions and 38 deletions
|
@ -23,9 +23,7 @@ import com.google.common.collect.ImmutableList;
|
|||
import com.google.common.collect.ImmutableMap;
|
||||
import google.registry.bigquery.BigqueryUtils.FieldType;
|
||||
import google.registry.model.eppoutput.Result.Code;
|
||||
import google.registry.request.RequestScope;
|
||||
import google.registry.util.Clock;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
/**
|
||||
|
@ -34,7 +32,6 @@ import org.joda.time.DateTime;
|
|||
* @see BigQueryMetricsEnqueuer
|
||||
*/
|
||||
@AutoValue
|
||||
@RequestScope
|
||||
public abstract class EppMetric implements BigQueryMetric {
|
||||
|
||||
static final String TABLE_ID = "eppMetrics";
|
||||
|
@ -84,12 +81,8 @@ public abstract class EppMetric implements BigQueryMetric {
|
|||
ImmutableMap.Builder<String, String> map =
|
||||
ImmutableMap.<String, String>builder()
|
||||
.put("requestId", getRequestId())
|
||||
.put(
|
||||
"startTime",
|
||||
toBigqueryTimestamp(getStartTimestamp().getMillis(), TimeUnit.MILLISECONDS))
|
||||
.put(
|
||||
"endTime",
|
||||
toBigqueryTimestamp(getEndTimestamp().getMillis(), TimeUnit.MILLISECONDS))
|
||||
.put("startTime", toBigqueryTimestamp(getStartTimestamp()))
|
||||
.put("endTime", toBigqueryTimestamp(getEndTimestamp()))
|
||||
.put("attempts", getAttempts().toString());
|
||||
// Populate optional values, if present
|
||||
addOptional("commandName", getCommandName(), map);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue