From 4461b03f0e854f1ac164f332421c246f0135b711 Mon Sep 17 00:00:00 2001 From: Caleb Schoepp Date: Wed, 4 Sep 2024 11:36:14 -0600 Subject: [PATCH] Fix bad rebase Signed-off-by: Caleb Schoepp --- Cargo.lock | 1 + crates/factor-observe/src/lib.rs | 3 +-- crates/factor-outbound-http/src/lib.rs | 4 +++- crates/runtime-factors/Cargo.toml | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 942284a80b..6eb2017390 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7906,6 +7906,7 @@ dependencies = [ "spin-common", "spin-factor-key-value", "spin-factor-llm", + "spin-factor-observe", "spin-factor-outbound-http", "spin-factor-outbound-mqtt", "spin-factor-outbound-mysql", diff --git a/crates/factor-observe/src/lib.rs b/crates/factor-observe/src/lib.rs index 8bc3fe5625..ccbee71bf0 100644 --- a/crates/factor-observe/src/lib.rs +++ b/crates/factor-observe/src/lib.rs @@ -36,8 +36,7 @@ impl Factor for ObserveFactor { fn prepare( &self, - ctx: spin_factors::PrepareContext, - _builders: &mut spin_factors::InstanceBuilders, + ctx: spin_factors::PrepareContext, ) -> anyhow::Result { // TODO(Lann): Is it fine that we're using BoxedTracer and BoxedSpan? Are there perf tradeoffs? // TODO(Lann): Would it make sense to put the tracer on the app state and just hold a reference to it in the instance state? diff --git a/crates/factor-outbound-http/src/lib.rs b/crates/factor-outbound-http/src/lib.rs index 98519f4c46..b79c4377a1 100644 --- a/crates/factor-outbound-http/src/lib.rs +++ b/crates/factor-outbound-http/src/lib.rs @@ -64,7 +64,9 @@ impl Factor for OutboundHttpFactor { let outbound_networking = ctx.instance_builder::()?; let allowed_hosts = outbound_networking.allowed_hosts(); let component_tls_configs = outbound_networking.component_tls_configs().clone(); - let observe_context = builders.get_mut::()?.get_observe_context(); + let observe_context = ctx + .instance_builder::()? + .get_observe_context(); Ok(InstanceState { wasi_http_ctx: WasiHttpCtx::new(), allowed_hosts, diff --git a/crates/runtime-factors/Cargo.toml b/crates/runtime-factors/Cargo.toml index f0b2252a08..77691d0b69 100644 --- a/crates/runtime-factors/Cargo.toml +++ b/crates/runtime-factors/Cargo.toml @@ -19,6 +19,7 @@ clap = { version = "3.1.18", features = ["derive", "env"] } spin-common = { path = "../common" } spin-factor-key-value = { path = "../factor-key-value" } spin-factor-llm = { path = "../factor-llm" } +spin-factor-observe = { path = "../factor-observe" } spin-factor-outbound-http = { path = "../factor-outbound-http" } spin-factor-outbound-mqtt = { path = "../factor-outbound-mqtt" } spin-factor-outbound-mysql = { path = "../factor-outbound-mysql" }