From d956cc6e7f08cee73bfbee2d7101c4a60d3511c5 Mon Sep 17 00:00:00 2001 From: Techassi Date: Tue, 22 Apr 2025 16:30:11 +0200 Subject: [PATCH 1/3] docs(stackable-telemetry): Add missing env vars to doc comment --- crates/stackable-telemetry/src/tracing/mod.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/crates/stackable-telemetry/src/tracing/mod.rs b/crates/stackable-telemetry/src/tracing/mod.rs index 0d4562be..79502c01 100644 --- a/crates/stackable-telemetry/src/tracing/mod.rs +++ b/crates/stackable-telemetry/src/tracing/mod.rs @@ -1,4 +1,4 @@ -//! This module contains functionality to initialise tracing Subscribers for +//! This module contains functionality to initialize tracing Subscribers for //! console output, file output, and OpenTelemetry OTLP export for traces and logs. //! //! It is intended to be used by the Stackable Data Platform operators and @@ -222,23 +222,25 @@ pub enum Error { /// ### Console logs /// /// - `CONSOLE_LOG_DISABLED` (`--console-log-disabled`): Disables console logs when set to `true`. +/// - `CONSOLE_LOG_FORMAT` (`--console-log-format`): Set the format for the console logs. /// - `CONSOLE_LOG_LEVEL`: Set the log level for the console logs. /// /// ### File logs /// /// - `FILE_LOG_DIRECTORY` (`--file-log-directory`): Enable the file logs and set the file log directory. -/// - `FILE_LOG_ROTATION_PERIOD` (`--file-log-rotation-period`): Set the rotation period of log files -/// - `FILE_LOG_LEVEL`: Set the log level for file logs +/// - `FILE_LOG_ROTATION_PERIOD` (`--file-log-rotation-period`): Set the rotation period of log files. +/// - `FILE_LOG_MAX_FILES` (`--file-log-max-files`): Set the maximum number of log files to keep. +/// - `FILE_LOG_LEVEL`: Set the log level for file logs. /// /// ### OTEL logs /// -/// - `OTEL_LOG_EXPORTER_ENABLED` (`--otel-log-exporter-enabled`): Enable exporting OTEL logs -/// - `OTEL_LOG_EXPORTER_LEVEL`: Set the log level for OTEL logs +/// - `OTEL_LOG_EXPORTER_ENABLED` (`--otel-log-exporter-enabled`): Enable exporting OTEL logs. +/// - `OTEL_LOG_EXPORTER_LEVEL`: Set the log level for OTEL logs. /// /// ### OTEL traces /// -/// - `OTEL_TRACE_EXPORTER_ENABLED` (`--otel-trace-exporter-enabled`): Enable exporting OTEL traces -/// - `OTEL_TRACE_EXPORTER_LEVEL`: Set the log level for OTEL traces +/// - `OTEL_TRACE_EXPORTER_ENABLED` (`--otel-trace-exporter-enabled`): Enable exporting OTEL traces. +/// - `OTEL_TRACE_EXPORTER_LEVEL`: Set the log level for OTEL traces. /// /// # Additional Configuration /// From eb61dcc7027b830f3b76516a1434b1ace555f7c8 Mon Sep 17 00:00:00 2001 From: Techassi Date: Tue, 22 Apr 2025 16:50:57 +0200 Subject: [PATCH 2/3] docs: Simplify warning in doc comment --- crates/stackable-telemetry/src/tracing/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/stackable-telemetry/src/tracing/mod.rs b/crates/stackable-telemetry/src/tracing/mod.rs index 79502c01..1e63b59e 100644 --- a/crates/stackable-telemetry/src/tracing/mod.rs +++ b/crates/stackable-telemetry/src/tracing/mod.rs @@ -72,8 +72,10 @@ pub enum Error { /// to hold onto the guard as long as required. /// ///
-/// Name the guard variable appropriately, do not just use let _ =, as that will drop +/// +/// Name the guard variable appropriately, do not just use `let _ = ...`, as that will drop /// immediately. +/// ///
/// /// ``` From 367580ce57a21c2ca45c334caac35ea25f9711c2 Mon Sep 17 00:00:00 2001 From: Techassi Date: Tue, 22 Apr 2025 16:51:24 +0200 Subject: [PATCH 3/3] docs: Add notice about clap feature in doc comment --- crates/stackable-telemetry/src/tracing/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/stackable-telemetry/src/tracing/mod.rs b/crates/stackable-telemetry/src/tracing/mod.rs index 1e63b59e..0fcb36a9 100644 --- a/crates/stackable-telemetry/src/tracing/mod.rs +++ b/crates/stackable-telemetry/src/tracing/mod.rs @@ -221,6 +221,13 @@ pub enum Error { /// /// ## Environment Variables and CLI Arguments /// +///
+/// +/// It should be noted that the CLI arguments (listed in parentheses) are only available when the +/// `clap` feature is enabled. +/// +///
+/// /// ### Console logs /// /// - `CONSOLE_LOG_DISABLED` (`--console-log-disabled`): Disables console logs when set to `true`.