Feature flag to toggle tracing (#666)

This commit is contained in:
gusto 2024-06-26 10:02:18 +02:00 committed by GitHub
parent 8936c331a6
commit c3375b1c48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 1 deletions

View File

@ -51,5 +51,7 @@ tower-http = { version = "0.4", features = ["cors", "trace"] }
time = "0.3"
[features]
default = ["tracing"]
mixnet = ["nomos-network/mixnet"]
metrics = []
metrics = []
tracing = []

View File

@ -10,6 +10,7 @@ use bytes::Bytes;
pub use config::{Config, CryptarchiaArgs, HttpArgs, LogArgs, MetricsArgs, NetworkArgs};
use nomos_api::ApiService;
use nomos_core::{da::certificate, header::HeaderId, tx::Transaction, wire};
#[cfg(feature = "tracing")]
use nomos_log::Logger;
use nomos_mempool::da::verify::fullreplication::DaVerificationProvider as MempoolVerificationProvider;
use nomos_mempool::network::adapters::libp2p::Libp2pAdapter as MempoolNetworkAdapter;
@ -74,6 +75,7 @@ pub type DaMempool = DaMempoolService<
#[derive(Services)]
pub struct Nomos {
#[cfg(feature = "tracing")]
logging: ServiceHandle<Logger>,
network: ServiceHandle<NetworkService<NetworkBackend>>,
cl_mempool: ServiceHandle<TxMempool>,

View File

@ -63,6 +63,7 @@ fn main() -> Result<()> {
let app = OverwatchRunner::<Nomos>::run(
NomosServiceSettings {
network: config.network,
#[cfg(feature = "tracing")]
logging: config.log,
http: config.http,
cl_mempool: nomos_mempool::TxMempoolSettings {