Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ hickory-resolver = { version = "0.26", default-features = false }
antithesis-instrumentation = { version = "0.1" }
antithesis_sdk = { git = "https://github.com/antithesishq/antithesis-sdk-rust", rev = "78c9db56771f0f6b01cb5404765c5a96852c159c", default-features = false } # 0.2.8 is pinned to rand 0.8, rev version allows us to select workspace rand
mime = "0.3"
thingbuf = { version = "0.1", default-features = false }

[patch.crates-io]
# Forked version of `hyper-http-proxy` that removes an unused dependency on `rustls-native-certs`, which transitively depends
Expand Down
4 changes: 4 additions & 0 deletions lib/saluki-app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ saluki-metrics = { workspace = true }
saluki-tls = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
simdutf8 = { workspace = true }
thingbuf = { workspace = true, features = ["std"] }
tokio = { workspace = true, features = ["macros", "sync"] }
tonic = { workspace = true, features = ["router"] }
tower = { workspace = true, features = ["util"] }
Expand All @@ -55,6 +57,7 @@ tracing-subscriber = { workspace = true, features = [
"tracing-log",
] }
url = { workspace = true, features = ["std"] }
zstd = { workspace = true }

[target.'cfg(not(windows))'.dependencies]
rcgen = { workspace = true, features = ["aws_lc_rs"] }
Expand All @@ -66,4 +69,5 @@ rcgen = { workspace = true, features = ["ring"] }
http-body-util = { workspace = true }
hyper = { workspace = true }
hyper-util = { workspace = true, features = ["client", "client-legacy", "http1", "tokio"] }
rand = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "time"] }
9 changes: 9 additions & 0 deletions lib/saluki-app/src/logging/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use std::io::Write;

use saluki_error::{generic_error, GenericError};
use tracing::level_filters::LevelFilter;
use tracing_appender::non_blocking::{NonBlocking, NonBlockingBuilder, WorkerGuard};
use tracing_rolling_file::RollingFileAppenderBase;
use tracing_subscriber::{layer::SubscriberExt as _, reload, util::SubscriberInitExt as _, Layer, Registry};
Expand All @@ -24,6 +25,9 @@ pub use self::config::{LogLevel, LoggingConfiguration};
mod layer;
use self::layer::{build_formatting_layer, build_syslog_formatting_layer};

mod ring_buffer;
pub use self::ring_buffer::{CompressedRingBuffer, RingBufferConfig};

mod syslog;
use self::syslog::SyslogWriter;

Expand Down Expand Up @@ -115,8 +119,13 @@ pub(crate) async fn initialize_logging(
// runtime `log_level` watcher) wired up via [`LoggingGuard::controller`].
let (override_worker, controller) = LoggingOverrideWorker::new(filter_handle);

// Set up our compressed debug logging ring buffer layer.
let ring_buffer_config = RingBufferConfig::default().with_max_ring_buffer_size_bytes(2_048_576);
let ring_buffer = CompressedRingBuffer::with_config(ring_buffer_config);

tracing_subscriber::registry()
.with(output_layer.with_filter(filter_layer))
.with(ring_buffer.with_filter(LevelFilter::DEBUG))
.try_init()?;

Ok((
Expand Down
Loading
Loading