File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
crates/stackable-telemetry/src/tracing Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ pub enum Error {
121121/// # use tracing_subscriber::filter::LevelFilter;
122122/// #[tokio::main]
123123/// async fn main() -> Result<(), Error> {
124+ /// // Control the otlp_log subscriber at runtime
124125/// let otlp_log_flag = false;
125126///
126127/// let _tracing_guard = Tracing::builder()
@@ -129,21 +130,25 @@ pub enum Error {
129130/// Settings::builder()
130131/// .with_environment_variable("TEST_CONSOLE")
131132/// .with_default_level(LevelFilter::INFO)
132- /// .enabled(true)
133133/// .build()
134134/// )
135- /// .with_otlp_log_exporter(
135+ /// .with_file_output(
136+ /// Settings::builder()
137+ /// .with_environment_variable("TEST_FILE_LOG")
138+ /// .with_default_level(LevelFilter::INFO)
139+ /// .file_log_settings_builder("/tmp/logs")
140+ /// .build()
141+ /// )
142+ /// .with_otlp_log_exporter(otlp_log_flag.then(|| {
136143/// Settings::builder()
137144/// .with_environment_variable("TEST_OTLP_LOG")
138145/// .with_default_level(LevelFilter::DEBUG)
139- /// .enabled(otlp_log_flag)
140146/// .build()
141- /// )
147+ /// }) )
142148/// .with_otlp_trace_exporter(
143149/// Settings::builder()
144150/// .with_environment_variable("TEST_OTLP_TRACE")
145151/// .with_default_level(LevelFilter::TRACE)
146- /// .enabled(true)
147152/// .build()
148153/// )
149154/// .build()
You can’t perform that action at this time.
0 commit comments