From 153ee56b740876cc7504426710d78b3be0722915 Mon Sep 17 00:00:00 2001 From: Pranav Sharma Date: Tue, 2 Apr 2024 15:57:54 +0000 Subject: [PATCH] Make serviceTimeSeries builder config public --- .../metric/MetricConfiguration.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) 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(); /**