Skip to content

Commit

Permalink
Bug/server metrics (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmturner authored Jan 29, 2025
1 parent f64edef commit 3f93ca2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ readme = "README.md"
authors = ["Matthew Turner <[email protected]>"]
license = "Apache-2.0"
keywords = ["arrow", "query", "sql", "datafusion"]
version = "0.2.0"
version = "0.2.1"
edition = "2021"
default-run = "dft"

Expand Down Expand Up @@ -73,11 +73,10 @@ deltalake = ["dep:deltalake"]
# hudi = ["dep:hudi"]
iceberg = ["dep:iceberg-datafusion", "dep:iceberg-catalog-rest"]
flightsql = ["dep:arrow-flight", "dep:tonic"]
experimental-flightsql-server = ["flightsql"]
experimental-flightsql-server = ["flightsql", "dep:metrics", "dep:metrics-exporter-prometheus"]
s3 = ["object_store/aws", "url"]
functions-json = ["dep:datafusion-functions-json"]
functions-parquet = ["dep:datafusion-functions-parquet"]
metrics = ["dep:metrics", "dep:metrics-exporter-prometheus"]
huggingface = ["opendal", "object_store_opendal", "url"]

[[bin]]
Expand Down
6 changes: 3 additions & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ pub struct FlightSQLConfig {
pub connection_url: String,
#[serde(default = "default_benchmark_iterations")]
pub benchmark_iterations: usize,
#[cfg(feature = "metrics")]
#[cfg(feature = "experimental-flightsql-server")]
#[serde(default = "default_server_metrics_port")]
pub server_metrics_port: String,
}
Expand All @@ -301,7 +301,7 @@ impl Default for FlightSQLConfig {
Self {
connection_url: default_connection_url(),
benchmark_iterations: default_benchmark_iterations(),
#[cfg(feature = "metrics")]
#[cfg(feature = "experimental-flightsql-server")]
server_metrics_port: default_server_metrics_port(),
}
}
Expand All @@ -312,7 +312,7 @@ pub fn default_connection_url() -> String {
"http://localhost:50051".to_string()
}

#[cfg(all(feature = "experimental-flightsql-server", feature = "metrics"))]
#[cfg(feature = "experimental-flightsql-server")]
fn default_server_metrics_port() -> String {
"0.0.0.0:9000".to_string()
}
Expand Down
1 change: 0 additions & 1 deletion src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ impl FlightSqlApp {
shutdown_future,
);

#[cfg(feature = "metrics")]
{
let builder = PrometheusBuilder::new();
let addr: SocketAddr = metrics_addr.parse()?;
Expand Down

0 comments on commit 3f93ca2

Please sign in to comment.