diff --git a/java/google/registry/monitoring/whitebox/EntityIntegrityAlertsSchema.java b/java/google/registry/monitoring/whitebox/EntityIntegrityAlertsSchema.java index 1938e9825..e0087f73f 100644 --- a/java/google/registry/monitoring/whitebox/EntityIntegrityAlertsSchema.java +++ b/java/google/registry/monitoring/whitebox/EntityIntegrityAlertsSchema.java @@ -30,7 +30,7 @@ final class EntityIntegrityAlertsSchema { static final String FIELD_TARGET = "target"; static final String FIELD_MESSAGE = "message"; - static final ImmutableList ENTITY_INTEGRITY_ALERTS_SCHEMA_FIELDS = + static final ImmutableList SCHEMA_FIELDS = ImmutableList.of( new TableFieldSchema().setName(FIELD_SCANTIME).setType(TIMESTAMP.name()), new TableFieldSchema().setName(FIELD_SOURCE).setType(STRING.name()), diff --git a/java/google/registry/monitoring/whitebox/EppMetrics.java b/java/google/registry/monitoring/whitebox/EppMetrics.java index 46482b607..d2a192b6a 100644 --- a/java/google/registry/monitoring/whitebox/EppMetrics.java +++ b/java/google/registry/monitoring/whitebox/EppMetrics.java @@ -29,9 +29,9 @@ public class EppMetrics extends Metrics { private static final String REQUEST_LOG_ID = "com.google.appengine.runtime.request_log_id"; - static final String EPPMETRICS_TABLE_ID = "eppMetrics"; + static final String TABLE_ID = "eppMetrics"; - static final ImmutableList EPPMETRICS_SCHEMA_FIELDS = + static final ImmutableList SCHEMA_FIELDS = ImmutableList.of( new TableFieldSchema().setName("requestId").setType(FieldType.STRING.name()), new TableFieldSchema().setName("startTime").setType(FieldType.TIMESTAMP.name()), @@ -45,7 +45,7 @@ public class EppMetrics extends Metrics { @Inject public EppMetrics() { - setTableId(EPPMETRICS_TABLE_ID); + setTableId(TABLE_ID); fields.put("attempts", 0); fields.put("requestId", getCurrentEnvironment().getAttributes().get(REQUEST_LOG_ID).toString()); } diff --git a/java/google/registry/monitoring/whitebox/WhiteboxModule.java b/java/google/registry/monitoring/whitebox/WhiteboxModule.java index 6bd3f10ba..1bed0da5c 100644 --- a/java/google/registry/monitoring/whitebox/WhiteboxModule.java +++ b/java/google/registry/monitoring/whitebox/WhiteboxModule.java @@ -14,10 +14,6 @@ package google.registry.monitoring.whitebox; -import static google.registry.monitoring.whitebox.EntityIntegrityAlertsSchema.ENTITY_INTEGRITY_ALERTS_SCHEMA_FIELDS; -import static google.registry.monitoring.whitebox.EntityIntegrityAlertsSchema.TABLE_ID; -import static google.registry.monitoring.whitebox.EppMetrics.EPPMETRICS_SCHEMA_FIELDS; -import static google.registry.monitoring.whitebox.EppMetrics.EPPMETRICS_TABLE_ID; import static google.registry.request.RequestParameters.extractRequiredParameter; import com.google.api.services.bigquery.model.TableFieldSchema; @@ -37,16 +33,18 @@ import javax.servlet.http.HttpServletRequest; @Module public class WhiteboxModule { - @Provides @IntoMap - @StringKey(EPPMETRICS_TABLE_ID) + @Provides + @IntoMap + @StringKey(EppMetrics.TABLE_ID) static ImmutableList provideEppMetricsSchema() { - return EPPMETRICS_SCHEMA_FIELDS; + return EppMetrics.SCHEMA_FIELDS; } - @Provides @IntoMap - @StringKey(TABLE_ID) + @Provides + @IntoMap + @StringKey(EntityIntegrityAlertsSchema.TABLE_ID) static ImmutableList provideEntityIntegrityAlertsSchema() { - return ENTITY_INTEGRITY_ALERTS_SCHEMA_FIELDS; + return EntityIntegrityAlertsSchema.SCHEMA_FIELDS; } @Provides