File tree Expand file tree Collapse file tree
java-spanner/google-cloud-spanner/src/main/java/com/google/cloud/spanner Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -997,7 +997,11 @@ protected SpannerOptions(Builder builder) {
997997 monitoringHost = builder .monitoringHost ;
998998 defaultTransactionOptions = builder .defaultTransactionOptions ;
999999 clientContext = builder .clientContext ;
1000- autoTaggingEnabled = builder .autoTaggingEnabled ;
1000+ if (environment .isAutoTaggingDisabled ()) {
1001+ autoTaggingEnabled = false ;
1002+ } else {
1003+ autoTaggingEnabled = builder .autoTaggingEnabled || environment .isAutoTaggingEnabled ();
1004+ }
10011005 autoTaggingPackages = builder .autoTaggingPackages ;
10021006 autoTaggingTracerLimit = builder .autoTaggingTracerLimit ;
10031007 }
@@ -2611,10 +2615,7 @@ public TransactionOptions getDefaultTransactionOptions() {
26112615 }
26122616
26132617 public boolean isAutoTaggingEnabled () {
2614- if (environment .isAutoTaggingDisabled ()) {
2615- return false ;
2616- }
2617- return autoTaggingEnabled || environment .isAutoTaggingEnabled ();
2618+ return autoTaggingEnabled ;
26182619 }
26192620
26202621 public List <String > getAutoTaggingPackages () {
@@ -2625,10 +2626,6 @@ public int getAutoTaggingTracerLimit() {
26252626 return autoTaggingTracerLimit ;
26262627 }
26272628
2628- public boolean isAutoTaggingDisabled () {
2629- return environment .isAutoTaggingDisabled ();
2630- }
2631-
26322629 @ BetaApi
26332630 public boolean isUseVirtualThreads () {
26342631 return useVirtualThreads ;
You can’t perform that action at this time.
0 commit comments