mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-02-17 19:53:05 +00:00
- Updated configs to the lates main repo configs.
- Updated all main repo crate namings to be same as the main repo.
- Added `create_dir_all` to `pub(crate) fn create_tempdir(custom_work_dir: Option<PathBuf>) -> std::io::Result<TempDir> {`.
- Wired in optional `persist_dir` when using the local deployer.
**Note:** Unsure about the `service_params` mapping in `pub(crate) fn cryptarchia_deployment(config: &GeneralConfig) -> CryptarchiaDeploymentSettings {`
37 lines
1.3 KiB
Rust
37 lines
1.3 KiB
Rust
use lb_tracing_service::{LoggerLayer, MetricsLayer, TracingLayer, TracingSettings};
|
|
use testing_framework_config::topology::configs::tracing::GeneralTracingConfig;
|
|
|
|
pub fn update_tracing_identifier(
|
|
settings: TracingSettings,
|
|
identifier: String,
|
|
) -> GeneralTracingConfig {
|
|
GeneralTracingConfig {
|
|
tracing_settings: TracingSettings {
|
|
logger: match settings.logger {
|
|
LoggerLayer::Loki(mut config) => {
|
|
config.host_identifier.clone_from(&identifier);
|
|
LoggerLayer::Loki(config)
|
|
}
|
|
other => other,
|
|
},
|
|
tracing: match settings.tracing {
|
|
TracingLayer::Otlp(mut config) => {
|
|
config.service_name.clone_from(&identifier);
|
|
TracingLayer::Otlp(config)
|
|
}
|
|
other @ TracingLayer::None => other,
|
|
},
|
|
filter: settings.filter,
|
|
metrics: match settings.metrics {
|
|
MetricsLayer::Otlp(mut config) => {
|
|
config.host_identifier = identifier;
|
|
MetricsLayer::Otlp(config)
|
|
}
|
|
other @ MetricsLayer::None => other,
|
|
},
|
|
console: settings.console,
|
|
level: settings.level,
|
|
},
|
|
}
|
|
}
|