The most recent tracing-core changed the number of variants on metadata::Kind,
which broke console-api 0.1.1, and no fix has been applied yet. To avoid build
failures, disable console-subscriber for now
+[features]
+console = ["console-subscriber"]
+default = []
+
[workspace]
members = [
"crates/api",
[workspace]
members = [
"crates/api",
tracing-error = "0.2.0"
tracing-log = "0.1.2"
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
tracing-error = "0.2.0"
tracing-log = "0.1.2"
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
-console-subscriber = "0.1.0"
+console-subscriber = { version = "0.1.0", optional = true }
strum = "0.23.0"
url = { version = "2.2.2", features = ["serde"] }
openssl = "0.10.38"
strum = "0.23.0"
url = { version = "2.2.2", features = ["serde"] }
openssl = "0.10.38"
pub mod root_span_builder;
pub mod scheduled_tasks;
pub mod root_span_builder;
pub mod scheduled_tasks;
+#[cfg(feature = "console")]
use console_subscriber::ConsoleLayer;
use lemmy_utils::LemmyError;
use opentelemetry::{
use console_subscriber::ConsoleLayer;
use lemmy_utils::LemmyError;
use opentelemetry::{
let format_layer = tracing_subscriber::fmt::layer().with_filter(targets.clone());
let format_layer = tracing_subscriber::fmt::layer().with_filter(targets.clone());
+ #[cfg(feature = "console")]
let console_layer = ConsoleLayer::builder()
.with_default_env()
.server_addr(([0, 0, 0, 0], 6669))
let console_layer = ConsoleLayer::builder()
.with_default_env()
.server_addr(([0, 0, 0, 0], 6669))
let subscriber = Registry::default()
.with(format_layer)
let subscriber = Registry::default()
.with(format_layer)
- .with(ErrorLayer::default())
- .with(console_layer);
+ .with(ErrorLayer::default());
+
+ #[cfg(feature = "console")]
+ let subscriber = subscriber.with(console_layer);
if let Some(url) = opentelemetry_url {
let tracer = opentelemetry_otlp::new_pipeline()
if let Some(url) = opentelemetry_url {
let tracer = opentelemetry_otlp::new_pipeline()