Skip to content

Commit

Permalink
set feature flag when metrics is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mutianf committed Mar 28, 2024
1 parent b816dda commit 21cad39
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import com.google.cloud.bigtable.data.v2.models.RowMutation;
import com.google.cloud.bigtable.data.v2.stub.metrics.DefaultMetricsProvider;
import com.google.cloud.bigtable.data.v2.stub.metrics.MetricsProvider;
import com.google.cloud.bigtable.data.v2.stub.metrics.NoopMetricsProvider;
import com.google.cloud.bigtable.data.v2.stub.mutaterows.MutateRowsBatchingDescriptor;
import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsBatchingDescriptor;
import com.google.common.base.MoreObjects;
Expand Down Expand Up @@ -1067,6 +1068,8 @@ public EnhancedBigtableStubSettings build() {

featureFlags.setRoutingCookie(this.getEnableRoutingCookie());
featureFlags.setRetryInfo(this.getEnableRetryInfo());
featureFlags.setClientSideMetricsEnabled(
!(this.getMetricsProvider() instanceof NoopMetricsProvider));

// Serialize the web64 encode the bigtable feature flags
ByteArrayOutputStream boas = new ByteArrayOutputStream();
Expand Down

0 comments on commit 21cad39

Please sign in to comment.