From 84683056db2eaa139c335b3dc622d43b9b09de42 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Wed, 27 Apr 2022 11:27:11 -0400 Subject: [PATCH] feat: Add more logging for all-in-one mode to make it clearer what components are used --- clap_blocks/src/catalog_dsn.rs | 5 +++++ clap_blocks/src/object_store.rs | 5 +++++ clap_blocks/src/write_buffer.rs | 3 +++ 3 files changed, 13 insertions(+) diff --git a/clap_blocks/src/catalog_dsn.rs b/clap_blocks/src/catalog_dsn.rs index cfa2aa9f83..e09659869c 100644 --- a/clap_blocks/src/catalog_dsn.rs +++ b/clap_blocks/src/catalog_dsn.rs @@ -1,6 +1,7 @@ use iox_catalog::{ create_or_get_default_records, interface::Catalog, mem::MemCatalog, postgres::PostgresCatalog, }; +use observability_deps::tracing::*; use snafu::{OptionExt, ResultExt, Snafu}; use std::{ops::DerefMut, sync::Arc}; @@ -58,6 +59,8 @@ impl CatalogDsnConfig { /// Create a new memory instance for all-in-one mode if a catalog DSN is not specified, setting /// the default for arguments that are irrelevant pub fn new_memory() -> Self { + info!("Catalog: In-memory"); + Self { catalog_type_: CatalogType::Memory, dsn: None, @@ -72,6 +75,8 @@ impl CatalogDsnConfig { max_catalog_connections: u32, postgres_schema_name: String, ) -> Self { + info!("Catalog: Postgres at `{}`", dsn); + Self { catalog_type_: CatalogType::Postgres, dsn: Some(dsn), diff --git a/clap_blocks/src/object_store.rs b/clap_blocks/src/object_store.rs index f181da1506..60a50ceec4 100644 --- a/clap_blocks/src/object_store.rs +++ b/clap_blocks/src/object_store.rs @@ -187,6 +187,11 @@ Possible values (case insensitive): impl ObjectStoreConfig { /// Create a new instance for all-in-one mode, only allowing some arguments. pub fn new(database_directory: Option) -> Self { + match &database_directory { + Some(dir) => info!("Object store: File-based in `{}`", dir.display()), + None => info!("Object store: In-memory"), + } + let object_store = database_directory.as_ref().map(|_| ObjectStoreType::File); Self { diff --git a/clap_blocks/src/write_buffer.rs b/clap_blocks/src/write_buffer.rs index 644c778e5b..8ad4c1b287 100644 --- a/clap_blocks/src/write_buffer.rs +++ b/clap_blocks/src/write_buffer.rs @@ -1,5 +1,6 @@ use data_types::write_buffer::{WriteBufferConnection, WriteBufferCreationConfig}; use iox_time::SystemProvider; +use observability_deps::tracing::*; use std::{collections::BTreeMap, num::NonZeroU32, path::PathBuf, sync::Arc}; use tempfile::TempDir; use trace::TraceCollector; @@ -66,6 +67,8 @@ impl WriteBufferConfig { .to_string() }); + info!("Write buffer: File-based in `{}`", connection_string); + Self { type_: "file".to_string(), connection_string,