Skip to content

Commit

Permalink
BigTable backend: ability to disable telemetry (#7597)
Browse files Browse the repository at this point in the history
  • Loading branch information
adutra committed Oct 9, 2023
1 parent 2a5b1d2 commit 113b349
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ as necessary. Empty sections will not end in the release notes.
If a fixed cache size setting has been explicitly configured, consider to change it to the fraction based one.
- Relative hashes are now supported in table references, thus allowing SQL queries to specify a relative hash
in the `FROM` clause, e.g. `FROM table1@main#1234^1`.
- BigTable backend: ability to disable telemetry (which is enabled by default).

### Deprecations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,7 @@ public interface QuarkusBigTableConfig {

@WithDefault("8086")
int emulatorPort();

@WithDefault("true")
boolean enableTelemetry();
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ public Backend buildBackend() {
bigTableConfig.initialRpcTimeout(),
bigTableConfig.initialRetryDelay());

if (bigTableConfig.enableTelemetry()) {
BigtableDataSettings.enableOpenCensusStats();
BigtableDataSettings.enableGfeOpenCensusStats();
}

LOGGER.info("Creating Google BigTable data client...");
BigtableDataClient dataClient = BigtableDataClient.create(dataSettings.build());

Expand Down
1 change: 1 addition & 0 deletions site/docs/try/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ When setting `nessie.version.store.type=BIGTABLE` which enables Google BigTable
| `nessie.version.store.persist.bigtable.initial-rpc-timeout` | (unspecified) | `Duration` | Initial RPC timeout. |
| `nessie.version.store.persist.bigtable.initial-retry-delay` | (unspecified) | `Duration` | Initial retry delay. |
| `nessie.version.store.persist.bigtable.max-retry-delay` | (unspecified) | `Duration` | Max retry-delay. |
| `nessie.version.store.persist.bigtable.enable-telemetry` | `true` | `boolean` | Enables telemetry with OpenCensus. |


!!! info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@ public static void configureDataClient(
stubSettings.bulkReadRowsSettings().getBatchingSettings().toBuilder()
.setElementCountThreshold((long) BigTableConstants.MAX_BULK_READS)
.build());

// Enable tracing & metrics
BigtableDataSettings.enableOpenCensusStats();
BigtableDataSettings.enableGfeOpenCensusStats();
}

private static void configureDuration(
Expand Down

0 comments on commit 113b349

Please sign in to comment.