diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index ecf3466a..a9c27f4e 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -12,7 +12,8 @@ jobs: services: localstack: - image: localstack/localstack + image: localstack/localstack@sha256:763947722c6c8d33d5fbf7e8d52b4bddec5be35274a0998fdc6176d733375314 + env: DEFAULT_REGION: us-east-1 AWS_ACCESS_KEY_ID: "AWS_ACCESS_KEY_ID" diff --git a/CHANGELOG.md b/CHANGELOG.md index f459d641..6fe8aaac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -80,6 +80,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## Fixed +- refactor: RUST_LOG filtering support - refactor: cargo.toml files cleaned - blob data formation process from state update - OTEL config refactor diff --git a/crates/orchestrator/src/cli/instrumentation.rs b/crates/orchestrator/src/cli/instrumentation.rs index 648806f3..edca0519 100644 --- a/crates/orchestrator/src/cli/instrumentation.rs +++ b/crates/orchestrator/src/cli/instrumentation.rs @@ -1,5 +1,4 @@ use clap::Args; -use tracing::Level; use url::Url; /// Parameters used to config instrumentation. @@ -13,8 +12,4 @@ pub struct InstrumentationCliArgs { /// The endpoint of the collector. #[arg(env = "MADARA_ORCHESTRATOR_OTEL_COLLECTOR_ENDPOINT", long)] pub otel_collector_endpoint: Option, - - /// The log level. - #[arg(env = "RUST_LOG", long, default_value = "INFO")] - pub log_level: Level, } diff --git a/crates/orchestrator/src/cli/mod.rs b/crates/orchestrator/src/cli/mod.rs index a4089572..61f2b328 100644 --- a/crates/orchestrator/src/cli/mod.rs +++ b/crates/orchestrator/src/cli/mod.rs @@ -559,7 +559,6 @@ pub mod validate_params { Ok(InstrumentationParams { otel_service_name: instrumentation_args.otel_service_name.clone().expect("Otel service name is required"), otel_collector_endpoint: instrumentation_args.otel_collector_endpoint.clone(), - log_level: instrumentation_args.log_level, }) } @@ -613,7 +612,6 @@ pub mod validate_params { pub mod test { use rstest::rstest; - use tracing::Level; use url::Url; use crate::cli::alert::aws_sns::AWSSNSCliArgs; @@ -850,11 +848,8 @@ pub mod validate_params { #[rstest] fn test_validate_instrumentation_params() { - let instrumentation_args: InstrumentationCliArgs = InstrumentationCliArgs { - otel_service_name: Some("".to_string()), - otel_collector_endpoint: None, - log_level: Level::INFO, - }; + let instrumentation_args: InstrumentationCliArgs = + InstrumentationCliArgs { otel_service_name: Some("".to_string()), otel_collector_endpoint: None }; let instrumentation_params = validate_instrumentation_params(&instrumentation_args); assert!(instrumentation_params.is_ok()); } diff --git a/crates/orchestrator/src/telemetry.rs b/crates/orchestrator/src/telemetry.rs index 80315360..ba2303f5 100644 --- a/crates/orchestrator/src/telemetry.rs +++ b/crates/orchestrator/src/telemetry.rs @@ -9,7 +9,6 @@ use opentelemetry_sdk::metrics::reader::{DefaultAggregationSelector, DefaultTemp use opentelemetry_sdk::metrics::{PeriodicReader, SdkMeterProvider}; use opentelemetry_sdk::trace::{BatchConfigBuilder, Config, Tracer}; use opentelemetry_sdk::{runtime, Resource}; -use tracing::Level; use tracing_opentelemetry::OpenTelemetryLayer; use tracing_subscriber::layer::SubscriberExt as _; use tracing_subscriber::util::SubscriberInitExt as _; @@ -25,17 +24,13 @@ pub struct OTELConfig { pub struct InstrumentationParams { pub otel_service_name: String, pub otel_collector_endpoint: Option, - pub log_level: Level, } pub fn setup_analytics(instrumentation: &InstrumentationParams) -> Option { let otel_config = get_otel_config(instrumentation); - let level = instrumentation.log_level; - let tracing_subscriber = tracing_subscriber::registry() - .with(tracing_subscriber::filter::LevelFilter::from_level(level)) - .with(tracing_subscriber::fmt::layer()) - .with(EnvFilter::from_default_env()); + let tracing_subscriber = + tracing_subscriber::registry().with(tracing_subscriber::fmt::layer()).with(EnvFilter::from_default_env()); if let Some(otel_config) = otel_config { let meter_provider = init_metric_provider(&otel_config); @@ -147,7 +142,6 @@ fn init_logs(otel_config: &OTELConfig) -> Result EnvParams { otel_collector_endpoint: get_env_var_optional("MADARA_ORCHESTRATOR_OTEL_COLLECTOR_ENDPOINT") .expect("Couldn't get otel collector endpoint") .map(|url| Url::parse(&url).expect("Failed to parse MADARA_ORCHESTRATOR_OTEL_COLLECTOR_ENDPOINT")), - log_level: Level::from_str(&get_env_var_or_default("RUST_LOG", "info")).expect("Failed to parse RUST_LOG"), }; let prover_params = ProverValidatedArgs::Sharp(SharpValidatedArgs { diff --git a/madara-bootstrapper b/madara-bootstrapper index f717bf17..b0b64750 160000 --- a/madara-bootstrapper +++ b/madara-bootstrapper @@ -1 +1 @@ -Subproject commit f717bf179581da53d68fee03b50ef78e0628ee20 +Subproject commit b0b647500c2ae3e3b0d99e345fa652989bca4726