Skip to content

Commit 82c14ad

Browse files
committed
docs: Document default env vars, level filters and default values
1 parent 1e95f7e commit 82c14ad

File tree

1 file changed

+13
-2
lines changed
  • crates/stackable-telemetry/src/tracing

1 file changed

+13
-2
lines changed

crates/stackable-telemetry/src/tracing/mod.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,19 @@ impl Tracing {
299299
/// Creates an returns a pre-configured [`Tracing`] instance which can be initialized by
300300
/// calling [`Tracing::init()`].
301301
///
302-
/// If `rolling_logs_period` is [`None`], this function will use a default value of
303-
/// [`RollingPeriod::Never`].
302+
/// ### Environment Variables and Default Levels
303+
///
304+
/// | Level Filter for | Environment Variable | Default Level |
305+
/// | ---------------- | ------------------------------------------ | ------------- |
306+
/// | Console logs | [`CONSOLE_LOG`](Self::CONSOLE_LOG_ENV_VAR) | `INFO` |
307+
/// | File logs | [`FILE_LOG`](Self::FILE_LOG_ENV_VAR) | `INFO` |
308+
/// | OTLP logs | [`OTLP_LOG`](Self::OTLP_LOG_ENV_VAR) | `DEBUG` |
309+
/// | OTLP traces | [`OTLP_TRACE`](Self::OTLP_TRACE_ENV_VAR) | `DEBUG` |
310+
///
311+
/// ### Default Values
312+
///
313+
/// - If `rolling_logs_period` is [`None`], this function will use a default value of
314+
/// [`RollingPeriod::Never`].
304315
pub fn pre_configured(service_name: &'static str, options: TelemetryOptions) -> Self {
305316
let TelemetryOptions {
306317
no_console_output,

0 commit comments

Comments
 (0)