Skip to content

Commit 9ce8c2a

Browse files
committed
r(toml): Rename log_store_min_level to logs_store_min_level
1 parent 62d26f8 commit 9ce8c2a

13 files changed

Lines changed: 58 additions & 59 deletions

File tree

crates/bench/benches/fibo.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ mod bench {
132132
.into_worker(
133133
cancel_registry,
134134
&db_forwarder_sender,
135-
None, // log_storage_config
135+
None, // logs_storage_config
136136
),
137137
),
138138
component_id,
@@ -203,7 +203,7 @@ mod bench {
203203
clock_fn: clock_fn.clone_box(),
204204
}),
205205
cancel_registry,
206-
None, // log_storage_config
206+
None, // logs_storage_config
207207
),
208208
);
209209
let exec_config = ExecConfig {

crates/wasm-workers/src/activity/activity_ctx.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ pub(crate) fn store(
134134
preopened_dir: Option<PathBuf>,
135135
stdout: Option<StdOutput>,
136136
stderr: Option<StdOutput>,
137-
log_storage_config: Option<LogStrageConfig>,
137+
logs_storage_config: Option<LogStrageConfig>,
138138
) -> Result<Store<ActivityCtx>, ActivityPreopenIoError> {
139139
let mut wasi_ctx = WasiCtxBuilder::new();
140140
if let Some(stdout) = stdout {
@@ -176,7 +176,7 @@ pub(crate) fn store(
176176
span: worker_span,
177177
execution_id,
178178
run_id,
179-
log_storage_config,
179+
logs_storage_config,
180180
},
181181
http_client_traces: HttpClientTracesContainer::default(),
182182
clock_fn,

crates/wasm-workers/src/activity/activity_worker.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ impl<S: Sleep> ActivityWorkerCompiled<S> {
126126
self,
127127
cancel_registry: CancelRegistry,
128128
log_forwarder_sender: &mpsc::Sender<LogInfoAppendRow>,
129-
log_storage_config: Option<LogStrageConfig>,
129+
logs_storage_config: Option<LogStrageConfig>,
130130
) -> ActivityWorker<S> {
131131
let stdout = StdOutputConfigWithSender::new(
132132
self.config.forward_stdout,
@@ -149,7 +149,7 @@ impl<S: Sleep> ActivityWorkerCompiled<S> {
149149
cancel_registry,
150150
stdout,
151151
stderr,
152-
log_storage_config,
152+
logs_storage_config,
153153
}
154154
}
155155
}
@@ -165,7 +165,7 @@ pub struct ActivityWorker<S: Sleep> {
165165
cancel_registry: CancelRegistry,
166166
stdout: Option<StdOutputConfigWithSender>,
167167
stderr: Option<StdOutputConfigWithSender>,
168-
log_storage_config: Option<LogStrageConfig>,
168+
logs_storage_config: Option<LogStrageConfig>,
169169
}
170170

171171
impl<S: Sleep> ActivityWorker<S> {
@@ -322,7 +322,7 @@ impl<S: Sleep + 'static> ActivityWorker<S> {
322322
self.stderr
323323
.as_ref()
324324
.map(|it| it.build(&ctx.execution_id, ctx.locked_event.run_id)),
325-
self.log_storage_config.clone(),
325+
self.logs_storage_config.clone(),
326326
) {
327327
Ok(store) => store,
328328
Err(ActivityPreopenIoError { err }) => {

crates/wasm-workers/src/component_logger.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub(crate) struct ComponentLogger {
1111
pub(crate) span: Span,
1212
pub(crate) execution_id: ExecutionId,
1313
pub(crate) run_id: RunId,
14-
pub(crate) log_storage_config: Option<LogStrageConfig>,
14+
pub(crate) logs_storage_config: Option<LogStrageConfig>,
1515
}
1616

1717
#[derive(Clone, derive_more::Debug)]
@@ -33,8 +33,8 @@ impl ComponentLogger {
3333
LogLevel::Error => error!(target: TARGET, "{message}"),
3434
});
3535
// store
36-
if let Some(log_storage_config) = &mut self.log_storage_config {
37-
let res = log_storage_config.log_sender.try_send(LogInfoAppendRow {
36+
if let Some(logs_storage_config) = &mut self.logs_storage_config {
37+
let res = logs_storage_config.log_sender.try_send(LogInfoAppendRow {
3838
execution_id: self.execution_id.clone(),
3939
run_id: self.run_id,
4040
log_entry: LogEntry::Log {

crates/wasm-workers/src/webhook/webhook_trigger.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,12 @@ impl<S: Sleep> WebhookEndpointInstanceLinked<S> {
231231
proxy_pre: self.proxy_pre,
232232
stdout,
233233
stderr,
234-
log_storage_config: self
235-
.config
236-
.log_store_min_level
237-
.map(|min_level| LogStrageConfig {
234+
logs_storage_config: self.config.logs_store_min_level.map(|min_level| {
235+
LogStrageConfig {
238236
min_level,
239237
log_sender: log_forwarder_sender.clone(),
240-
}),
238+
}
239+
}),
241240
config: self.config,
242241
}
243242
}
@@ -252,7 +251,7 @@ pub struct WebhookEndpointInstance<S: Sleep> {
252251
stdout: Option<StdOutputConfigWithSender>,
253252
#[debug(skip)]
254253
stderr: Option<StdOutputConfigWithSender>,
255-
log_storage_config: Option<LogStrageConfig>,
254+
logs_storage_config: Option<LogStrageConfig>,
256255
}
257256

258257
pub struct MethodAwareRouter<T> {
@@ -382,7 +381,7 @@ pub struct WebhookEndpointConfig {
382381
pub fuel: Option<u64>,
383382
pub backtrace_persist: bool,
384383
pub subscription_interruption: Option<Duration>,
385-
pub log_store_min_level: Option<LogLevel>,
384+
pub logs_store_min_level: Option<LogLevel>,
386385
}
387386

388387
struct WebhookEndpointCtx<S: Sleep> {
@@ -796,7 +795,7 @@ impl<S: Sleep> WebhookEndpointCtx<S> {
796795
stdout: Option<StdOutput>,
797796
stderr: Option<StdOutput>,
798797
run_id: RunId,
799-
log_storage_config: Option<LogStrageConfig>,
798+
logs_storage_config: Option<LogStrageConfig>,
800799
) -> Store<WebhookEndpointCtx<S>> {
801800
let mut wasi_ctx = WasiCtxBuilder::new();
802801
if let Some(stdout) = stdout {
@@ -843,7 +842,7 @@ impl<S: Sleep> WebhookEndpointCtx<S> {
843842
span: request_span,
844843
execution_id: ExecutionId::TopLevel(execution_id),
845844
run_id,
846-
log_storage_config,
845+
logs_storage_config,
847846
},
848847
subscription_interruption: config.subscription_interruption,
849848
connection_drop_watcher,
@@ -1095,7 +1094,7 @@ impl<S: Sleep> RequestHandler<S> {
10951094
stdout,
10961095
stderr,
10971096
run_id,
1098-
found_instance.log_storage_config.clone(),
1097+
found_instance.logs_storage_config.clone(),
10991098
);
11001099
let req = store
11011100
.data_mut()
@@ -1313,7 +1312,7 @@ pub(crate) mod tests {
13131312
fuel: None,
13141313
backtrace_persist: false,
13151314
subscription_interruption: None,
1316-
log_store_min_level: None,
1315+
logs_store_min_level: None,
13171316
},
13181317
wasm_file,
13191318
&engine,

crates/wasm-workers/src/workflow/workflow_ctx.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ impl WorkflowCtx {
801801
locked_event: Locked,
802802
lock_extension: Duration,
803803
subscription_interruption: Option<Duration>,
804-
log_storage_config: Option<LogStrageConfig>,
804+
logs_storage_config: Option<LogStrageConfig>,
805805
) -> Self {
806806
let mut wasi_ctx_builder = WasiCtxBuilder::new();
807807
wasi_ctx_builder.allow_tcp(false);
@@ -830,7 +830,7 @@ impl WorkflowCtx {
830830
span: worker_span,
831831
execution_id,
832832
run_id,
833-
log_storage_config,
833+
logs_storage_config,
834834
},
835835
resource_table: wasmtime::component::ResourceTable::default(),
836836
backtrace_persist,
@@ -1690,7 +1690,7 @@ pub(crate) mod tests {
16901690
ctx.locked_event,
16911691
Duration::from_secs(1), // lock extension
16921692
None, // subscription_interruption
1693-
None, // log_storage_config
1693+
None, // logs_storage_config
16941694
);
16951695
for step in &self.steps {
16961696
info!("Processing step {step:?}");

crates/wasm-workers/src/workflow/workflow_worker.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub struct WorkflowWorker {
8686
fn_registry: Arc<dyn FunctionRegistry>,
8787
cancel_registry: CancelRegistry,
8888
deadline_factory: Arc<dyn DeadlineTrackerFactory>,
89-
log_storage_config: Option<LogStrageConfig>,
89+
logs_storage_config: Option<LogStrageConfig>,
9090
}
9191

9292
const WASI_NAMESPACE: &str = "wasi";
@@ -333,7 +333,7 @@ impl WorkflowWorkerLinked {
333333
db_pool: Arc<dyn DbPool>,
334334
deadline_factory: Arc<dyn DeadlineTrackerFactory>,
335335
cancel_registry: CancelRegistry,
336-
log_storage_config: Option<LogStrageConfig>,
336+
logs_storage_config: Option<LogStrageConfig>,
337337
) -> WorkflowWorker {
338338
WorkflowWorker {
339339
config: self.config,
@@ -346,7 +346,7 @@ impl WorkflowWorkerLinked {
346346
fn_registry: self.fn_registry,
347347
deadline_factory,
348348
cancel_registry,
349-
log_storage_config,
349+
logs_storage_config,
350350
}
351351
}
352352
}
@@ -447,7 +447,7 @@ impl WorkflowWorker {
447447
ctx.locked_event,
448448
self.config.lock_extension,
449449
self.config.subscription_interruption,
450-
self.log_storage_config.clone(),
450+
self.logs_storage_config.clone(),
451451
);
452452

453453
let mut store = Store::new(&self.engine, workflow_ctx);
@@ -813,7 +813,7 @@ impl WorkflowWorker {
813813
worker_span: Span::current(),
814814
locked_event: Locked {
815815
component_id: config.component_id.clone(),
816-
executor_id: ExecutorId::generate(), // TODO: Remove
816+
executor_id: ExecutorId::generate(),
817817
run_id: RunId::generate(),
818818
lock_expires_at: clock_fn.now(), // does not matter, using DeadlineTrackerFactoryForReplay
819819
retry_config: concepts::ComponentRetryConfig::WORKFLOW,
@@ -829,12 +829,12 @@ impl WorkflowWorker {
829829
)?;
830830
let linked = compiled.link(fn_registry)?;
831831
let db_pool = Arc::new(InMemoryPool::new());
832-
let log_storage_config = None;
832+
let logs_storage_config = None; // No log storage during replay.
833833
let worker = linked.into_worker(
834834
db_pool,
835835
Arc::new(DeadlineTrackerFactoryForReplay {}),
836836
CancelRegistry::new(),
837-
log_storage_config,
837+
logs_storage_config,
838838
);
839839
worker
840840
.run_internal(ctx)
@@ -1030,7 +1030,7 @@ pub(crate) mod tests {
10301030
clock_fn,
10311031
}),
10321032
cancel_registry,
1033-
None, // log_storage_config
1033+
None, // logs_storage_config
10341034
),
10351035
)
10361036
}

obelisk-help.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ webui.listening_addr = "127.0.0.1:8080" # Address and port on which the webui wi
6666
# content_digest = "sha256:AA.." # Optional. If specified, the WASM file must have a matching hash.
6767

6868
## Database storage setting for logs emitted by the component
69-
# log_store_min_level = "off" # One of "off"|"trace"|"debug"|"info"|"warn"|"error"
69+
# logs_store_min_level = "off" # One of "off"|"trace"|"debug"|"info"|"warn"|"error"
7070

7171
## Common executor settings
7272
# exec.batch_size = 5 # Number of executions to lock for every event loop tick.

obelisk-testing-postgres-local.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ location.path = "${OBELISK_TOML_DIR}/target/release_testprograms/wasm32-wasip2/r
4444
http_server = "external_webhook"
4545
routes = [{ methods = ["GET"], route = "/fibo/:N/:ITERATIONS" }]
4646
backtrace.sources = { ".../src/lib.rs" = "${OBELISK_TOML_DIR}/crates/testing/test-programs/fibo/webhook/src/lib.rs" }
47-
log_store_min_level = "info"
47+
logs_store_min_level = "info"
4848
forward_stdout = "db"
4949
forward_stderr = "db"
5050

obelisk-testing-sqlite-local.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ location.path = "${OBELISK_TOML_DIR}/target/release_testprograms/wasm32-wasip2/r
3737
http_server = "external_webhook"
3838
routes = [{ methods = ["GET"], route = "/fibo/:N/:ITERATIONS" }]
3939
backtrace.sources = { ".../src/lib.rs" = "${OBELISK_TOML_DIR}/crates/testing/test-programs/fibo/webhook/src/lib.rs" }
40-
log_store_min_level = "info"
40+
logs_store_min_level = "info"
4141
forward_stdout = "db"
4242
forward_stderr = "db"
4343

0 commit comments

Comments
 (0)