mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Stop exporting EPP flow metrics to BigQuery
These are simply too costly in their current form now that we are handling double-digit QPS, so at a minimum we'd want to refactor these for batched exports using a background thread (like how Stackdriver metrics work). However, upon further review, that work isn't worth doing if this BigQuery table isn't actually being used for anything, and it seems that we aren't using it anymore given that ICANN transaction reporting no longer requires it. So the simplest thing to do is simply to get rid of this entirely, and just use a combination of Stackdriver metrics and App Engine logs. The eppMetrics BigQuery table is ~1.2 billion rows and takes up 223 GB, so that's not an insignificant GCP billings saving if we can delete it. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=215905466
This commit is contained in:
parent
7b9d562043
commit
218c4517eb
24 changed files with 17 additions and 763 deletions
|
@ -14,24 +14,9 @@
|
|||
|
||||
package google.registry.monitoring.whitebox;
|
||||
|
||||
import static com.google.appengine.api.taskqueue.QueueFactory.getQueue;
|
||||
import static google.registry.monitoring.whitebox.BigQueryMetricsEnqueuer.QUEUE_BIGQUERY_STREAMING_METRICS;
|
||||
import static google.registry.request.RequestParameters.extractRequiredParameter;
|
||||
|
||||
import com.google.api.services.bigquery.model.TableFieldSchema;
|
||||
import com.google.appengine.api.taskqueue.Queue;
|
||||
import com.google.common.base.Supplier;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import dagger.multibindings.IntoMap;
|
||||
import dagger.multibindings.StringKey;
|
||||
import google.registry.request.Parameter;
|
||||
import google.registry.request.RequestLogId;
|
||||
import google.registry.util.Clock;
|
||||
import java.util.UUID;
|
||||
import javax.inject.Named;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* Dagger module for injecting common settings for Whitebox tasks.
|
||||
|
@ -39,46 +24,14 @@ import javax.servlet.http.HttpServletRequest;
|
|||
@Module
|
||||
public class WhiteboxModule {
|
||||
|
||||
@Provides
|
||||
@IntoMap
|
||||
@StringKey(EppMetric.TABLE_ID)
|
||||
static ImmutableList<TableFieldSchema> provideEppMetricsSchema() {
|
||||
return EppMetric.SCHEMA_FIELDS;
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Parameter("tableId")
|
||||
static String provideTableId(HttpServletRequest req) {
|
||||
return extractRequiredParameter(req, "tableId");
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Parameter("insertId")
|
||||
static String provideInsertId(HttpServletRequest req) {
|
||||
return extractRequiredParameter(req, "insertId");
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Named("insertIdGenerator")
|
||||
static Supplier<String> provideInsertIdGenerator() {
|
||||
return () -> UUID.randomUUID().toString();
|
||||
}
|
||||
|
||||
/** Provides an EppMetric builder with the request ID and startTimestamp already initialized. */
|
||||
@Provides
|
||||
static EppMetric.Builder provideEppMetricBuilder(
|
||||
@RequestLogId String requestLogId, Clock clock) {
|
||||
return EppMetric.builderForRequest(requestLogId, clock);
|
||||
static EppMetric.Builder provideEppMetricBuilder(Clock clock) {
|
||||
return EppMetric.builderForRequest(clock);
|
||||
}
|
||||
|
||||
@Provides
|
||||
static CheckApiMetric.Builder provideCheckApiMetricBuilder(Clock clock) {
|
||||
return CheckApiMetric.builder(clock);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Named(QUEUE_BIGQUERY_STREAMING_METRICS)
|
||||
static Queue provideBigQueryStreamingMetricsQueue() {
|
||||
return getQueue(QUEUE_BIGQUERY_STREAMING_METRICS);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue