Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 100 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 14 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ etcetera = { workspace = true }
figment = { workspace = true, features = ["json", "env", "yaml", "toml"] }
flate2 = { workspace = true, features = ["rust_backend"] }
humantime = { workspace = true }
opentelemetry = { workspace = true }
opentelemetry_sdk = { workspace = true }
opentelemetry-semantic-conventions = { workspace = true, features = ["semconv_experimental"] }
opentelemetry-otlp = { workspace = true, features = ["grpc-tonic", "trace", "logs"] }
opentelemetry-appender-tracing = { workspace = true }
reqwest = { workspace = true, features = ["json", "rustls-tls"] }
rustls = { workspace = true }
semver = { workspace = true }
Expand All @@ -90,6 +95,7 @@ tempfile = { workspace = true }
tokio = { workspace = true, features = ["full"] }
tracing = { workspace = true, features = ["attributes"] }
tracing-subscriber = { workspace = true, features = ["env-filter", "ansi", "time", "json"] }
tracing-opentelemetry = { workspace = true }
url = { workspace = true }
uuid = { workspace = true }
wasm-metadata = { workspace = true }
Expand Down Expand Up @@ -131,12 +137,13 @@ kube-derive = { version = "1", default-features = false }
notify = { version = "8.0.0", default-features = false, features = ["macos_fsevent"] }
oci-client = { version = "0.15.0", default-features = false, features = ["rustls-tls", "rustls-tls-native-roots"]}
oci-wasm = { version = "0.3.0", default-features = false, features = ["rustls-tls"] }
opentelemetry = { version = "0.28", default-features = false }
opentelemetry-appender-tracing = { version = "0.28", default-features = false }
opentelemetry-otlp = { version = "0.28", default-features = false }
opentelemetry_sdk = { version = "0.28", default-features = false }
opentelemetry-semantic-conventions = { version = "0.28", default-features = false }
opentelemetry-stdout = { version = "0.28.0", default-features = false }
opentelemetry = { version = "0.31", default-features = false }
opentelemetry-appender-tracing = { version = "0.31", default-features = false }
opentelemetry-otlp = { version = "0.31", default-features = false }
opentelemetry-http = { version = "0.31", default-features = false }
opentelemetry_sdk = { version = "0.31", default-features = false }
opentelemetry-semantic-conventions = { version = "0.31", default-features = false }
opentelemetry-stdout = { version = "0.31.0", default-features = false }
pbjson = { version = "0.8.0", default-features = false }
pbjson-types = { version = "0.8.0", default-features = false }
pbjson-build = { version = "0.8.0", default-features = false }
Expand Down Expand Up @@ -164,6 +171,7 @@ tonic = { version = "0.14", default-features = false }
tonic-prost = { version = "0.14", default-features = false }
tonic-prost-build = { version = "0.14", default-features = false }
tracing = { version = "0.1.41", default-features = false, features = ["attributes"] }
tracing-opentelemetry = { version = "0.32", default-features = false }
tracing-subscriber = { version = "0.3.19", default-features = false, features = ["env-filter", "ansi", "time", "json"] }
url = { version = "2.5", default-features = false }
uuid = { version = "1.17.0", default-features = false }
Expand Down
7 changes: 2 additions & 5 deletions crates/wash-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,8 @@ pbjson = { workspace = true, default-features = true }
pbjson-types = { workspace = true, default-features = true }
prost = { workspace = true, default-features = true }
tonic-prost = { workspace = true, default-features = true }
opentelemetry = { workspace = true }
opentelemetry-semantic-conventions = { workspace = true, features = [
"semconv_experimental",
] }
opentelemetry_sdk = { workspace = true }
opentelemetry = { workspace = true, features = ["trace", "metrics", "logs"] }
opentelemetry-http = { workspace = true }
wasi-graphics-context-wasmtime = { git = "https://github.com/wasi-gfx/wasi-gfx-runtime.git", rev = "067d92d0eabd264e15486b9cecbb9f7020257b7b", optional = true }
wasi-webgpu-wasmtime = { git = "https://github.com/wasi-gfx/wasi-gfx-runtime.git", rev = "067d92d0eabd264e15486b9cecbb9f7020257b7b", optional = true }

Expand Down
10 changes: 8 additions & 2 deletions crates/wash-runtime/src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
//! ```

use anyhow::{Context, bail};
use tracing::instrument;
use wasmtime::PoolingAllocationConfig;
use wasmtime::component::{Component, Linker};
use wasmtime_wasi::sockets::loopback;
Expand Down Expand Up @@ -202,6 +203,7 @@ impl Engine {
))
}

#[instrument(name = "initialize_service", skip_all)]
fn initialize_service(
&self,
workload_id: impl AsRef<str>,
Expand Down Expand Up @@ -268,6 +270,7 @@ impl Engine {

/// Initialize a component that is a part of a workload, add wasi@0.2 interfaces (and
/// wasi:http if the `http` feature is enabled) to the linker.
#[instrument(name = "initialize_workload_component", skip_all, fields(component.name = %component.name))]
fn initialize_workload_component(
&self,
workload_id: impl AsRef<str>,
Expand All @@ -278,8 +281,11 @@ impl Engine {
loopback: Arc<std::sync::Mutex<loopback::Network>>,
) -> anyhow::Result<WorkloadComponent> {
// Create a wasmtime component from the bytes
let wasmtime_component = Component::new(&self.inner, component.bytes)
.context("failed to create component from bytes")?;
let wasmtime_component = {
let _span = tracing::span!(tracing::Level::INFO, "parse_component_bytes").entered();
Component::new(&self.inner, component.bytes)
.context("failed to create component from bytes")?
};

// Create a linker for this component
let mut linker: Linker<SharedCtx> = Linker::new(&self.inner);
Expand Down
Loading
Loading