diff --git a/.circleci/config.yml b/.circleci/config.yml index 0e8681d2275..c932ebc59b4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -300,7 +300,7 @@ jobs: command: rustup target add << parameters.target >> - run: name: Cargo release build - command: target-env cargo build --target=<< parameters.target >> --profile=<< parameters.profile >> --workspace + command: target-env cargo build --features "influxdb3/release_default" --target=<< parameters.target >> --profile=<< parameters.profile >> --workspace # linking might take a while and doesn't produce CLI output no_output_timeout: 30m - run: diff --git a/influxdb3/Cargo.toml b/influxdb3/Cargo.toml index a8f2f3ec383..b7cb9014c4c 100644 --- a/influxdb3/Cargo.toml +++ b/influxdb3/Cargo.toml @@ -61,6 +61,8 @@ console-subscriber = { version = "0.1.10", optional = true, features = ["parking [features] default = ["jemalloc_replacing_malloc", "azure", "gcp", "aws"] +release_default = ["default", "enable_telemetry"] +enable_telemetry = [] azure = ["influxdb3_clap_blocks/azure"] # Optional Azure Object store support gcp = ["influxdb3_clap_blocks/gcp"] # Optional GCP object store support diff --git a/influxdb3/src/commands/serve.rs b/influxdb3/src/commands/serve.rs index 88c573fcf13..19d90c88862 100644 --- a/influxdb3/src/commands/serve.rs +++ b/influxdb3/src/commands/serve.rs @@ -627,10 +627,7 @@ async fn setup_telemetry_store( .unwrap_or(ObjectStoreType::Memory); let storage_type = obj_store_type.as_str(); - if disable_upload { - debug!("Initializing TelemetryStore with upload disabled."); - TelemetryStore::new_without_background_runners(persisted_files.map(|p| p as _)) - } else { + if !disable_upload && cfg!(feature = "enable_telemetry") { debug!("Initializing TelemetryStore with upload enabled for {telemetry_endpoint}."); TelemetryStore::new( instance_id, @@ -642,6 +639,9 @@ async fn setup_telemetry_store( telemetry_endpoint.to_string(), ) .await + } else { + debug!("Initializing TelemetryStore with upload disabled."); + TelemetryStore::new_without_background_runners(persisted_files.map(|p| p as _)) } }