diff --git a/exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric/MetricConfiguration.java b/exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric/MetricConfiguration.java index 7a7a365f..fd525c16 100644 --- a/exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric/MetricConfiguration.java +++ b/exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric/MetricConfiguration.java @@ -226,6 +226,18 @@ public final Builder setProjectId(String projectId) { /** Sets the endpoint where to write Metrics. Defaults to monitoring.googleapis.com:443. */ public abstract Builder setMetricServiceEndpoint(String endpoint); + /** + * Sets the {@link MetricConfiguration} to configure the exporter to write metrics via {@link + * com.google.cloud.monitoring.v3.MetricServiceClient#createServiceTimeSeries(String, List)} + * method. By default, this is false. + * + * @param useServiceTimeSeries a boolean indicating whether to use {@link + * com.google.cloud.monitoring.v3.MetricServiceClient#createServiceTimeSeries(String, List)} + * method for writing metrics to Google Cloud Monitoring. + * @return this + */ + public abstract Builder setUseServiceTimeSeries(boolean useServiceTimeSeries); + /** * Set a filter to determine which resource attributes to add to metrics as metric labels. By * default, it adds service.name, service.namespace, and service.instance.id. This is @@ -242,18 +254,6 @@ public final Builder setProjectId(String projectId) { @VisibleForTesting abstract Builder setInsecureEndpoint(boolean value); - /** - * Sets the {@link MetricConfiguration} to configure the exporter to write metrics via {@link - * com.google.cloud.monitoring.v3.MetricServiceClient#createServiceTimeSeries(String, List)} - * method. By default, this is false. - * - * @param useServiceTimeSeries a boolean indicating whether to use {@link - * com.google.cloud.monitoring.v3.MetricServiceClient#createServiceTimeSeries(String, List)} - * method for writing metrics to Google Cloud Monitoring. - * @return this - */ - abstract Builder setUseServiceTimeSeries(boolean useServiceTimeSeries); - abstract MetricConfiguration autoBuild(); /**