WasmLens: Automatic Glass-Box Instrumentation for Composed WebAssembly Applications
Michiel Van Kenhove, Ewout Verlinde, Jos\'e Santos, Filip De Turck, Bruno Volckaert, Merlijn Sebrechts
Key points
From the paper's conclusion- These results show that instrumentation overhead is additive in composition depth rather than proportional to baseline execution time.
Abstract
The WebAssembly Component Model enables language-independent composition of independently developed components, but complicates observability. Existing tracing support flattens execution hierarchy by attributing every span created inside a composition to a single host-level parent context, so execution across component boundaries cannot be reconstructed. The problem is amplified because components are typically deployed as black boxes whose internals cannot be modified or inspected by the system integrator. To address these limitations, we propose a revised wasi:otel/tracing design in which the runtime maintains a per-component span stack, restoring parent-child relationships across component boundaries without changing component interfaces or source code. This change has since been adopted upstream. Building on this design, we present WasmLens, an automatic instrumentation tool that derives instrumentation points from a composition graph and injects tracing middleware into already composed binaries, yielding end-to-end traces for black-box compositions with no developer configuration. This automatic instrumentation raises mean request latency from $238$ $\mu$s to $454$ $\mu$s across six component boundaries. Raising the expected number of boundary crossings from 6 to 11 further increases latency to $514$ $\mu$s, an incremental cost of $12$ $\mu$s per crossing, of which $10.4$ $\mu$s is attributable to instrumentation. These results show that instrumentation overhead is additive in composition depth rather than proportional to baseline execution time.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- WITFuzz: Validity-Preserving Greybox Fuzzing for WebAssembly Interface Type Binding GeneratorsProceedings of the ACM on Software Engineering · 2026
- E2WR: An Effective and Efficient Reduction Framework for WebAssembly BinariesProceedings of the ACM on Software Engineering · 2026
- Compiling WebAssembly Concolic Execution with Staging, Continuations, and SnapshotsProceedings of the ACM on Programming Languages · 2026
- SymWeb: Feedback-Driven Context Exploration and Context-Aware Symbolic Execution for Browser-Embedded WebAssembly Vulnerability DetectionProceedings of the ACM on Software Engineering · 2026
- Finding and Understanding Missed Optimizations in WebAssembly Optimizer (Experience Paper)Proceedings of the ACM on Software Engineering · 2026
- AWS Serverless Infrastructure from WebAssembly ComponentsarXiv · 2026