{"record":{"id":"08bb61ec7f68b2e4","repo":"influxdata/influxdb","slug":"tokio-console-feature-not-enabled","errorCode":null,"errorMessage":"`tokio_console` feature not enabled","messagePattern":"`tokio_console` feature not enabled","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/trogging/src/lib.rs","lineNumber":43,"sourceCode":"/// Maximum length of a log line.\n/// Space for a final trailing newline if truncated.\n///\n/// Docker \"chunks\" log message in 16KB chunks. The log driver receives log lines in such chunks\n/// but not all of the log drivers properly recombine the lines, and even those who do have their\n/// own max buffer sizes (e.g. for our fluentd config it's 32KB).\n/// To avoid surprises, for now, let's just truncate log lines right below 16K and make sure\n/// they are properly terminated with a newline if they were so before the truncation.\nconst MAX_LINE_LENGTH: usize = 16 * 1024 - 1;\n\n#[derive(Debug, Error)]\npub enum Error {\n    #[error(\"Cannot set global tracing subscriber\")]\n    SetGlobalDefaultError(#[from] tracing::dispatcher::SetGlobalDefaultError),\n\n    #[error(\"Cannot set global log subscriber\")]\n    SetLoggerError(#[from] tracing_log::log_tracer::SetLoggerError),\n\n    #[error(\"`tokio_console` feature not enabled\")]\n    TokioConsoleMissing,\n}\n\npub type Result<T, E = Error> = std::result::Result<T, E>;\n\n/// Builder to configure tracing and logging.\n#[derive(Debug)]\npub struct Builder<W = fn() -> io::Stdout> {\n    log_format: LogFormat,\n    log_filter: Option<EnvFilter>,\n    // used when log_filter is none.\n    default_log_filter: EnvFilter,\n    make_writer: W,\n    with_target: bool,\n    with_ansi: bool,\n}\n\nimpl Default for Builder {","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/core/trogging/src/lib.rs#L25-L61","documentation":"A trogging `Error` variant (`TokioConsoleMissing`) returned when tokio-console support is requested but the crate was built without the `tokio_console` cargo feature enabled. The tokio-console subscriber integration is feature-gated, so asking for it in an unenabled build is a configuration error, not a runtime failure.","triggerScenarios":"Building trogging/`influxdb3 serve` with tokio-console options supplied (e.g. `--tokio-console-bind-addr`) while the binary was compiled without `--features tokio_console`.","commonSituations":"Running a release/prebuilt binary (built without the feature) and passing tokio-console flags; enabling console tracing in config without rebuilding with the feature.","solutions":["Rebuild with the feature: `cargo build --features tokio_console` (plus any bin features).","Remove the tokio-console option/binding from the serve configuration if console introspection is not needed.","Use a prebuilt binary that includes the tokio_console feature."],"exampleFix":"// before\ncargo build --release\ninfluxdb3 serve ... --tokio-console-bind-addr 127.0.0.1:6669\n// after\ncargo build --release --features tokio_console\ninfluxdb3 serve ... --tokio-console-bind-addr 127.0.0.1:6669","handlingStrategy":"validation","validationCode":"#[cfg(not(feature = \"tokio_console\"))]\ncompile_error!(\"tokio_console requested without enabling the tokio_console feature\");","typeGuard":null,"tryCatchPattern":"if let Err(trogging::Error::TokioConsoleMissing) = init_result {\n    eprintln!(\"rebuild with --features tokio_console to use tokio-console\");\n}","preventionTips":["Build with --features tokio_console when you plan to pass tokio-console flags","Strip tokio-console options from configs used with non-feature builds","Document the feature requirement next to the CLI flag"],"tags":["rust","feature-gate","tokio-console","build"],"backgroundTag":"feature-not-enabled","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}