Add trace components - #21
Merged
Merged
Conversation
Components that log each wasi:http call at the TRACE level, with the 'componentized-trace' context: * trace-types: wasi:http/types * trace-client: wasi:http/types and wasi:http/client * trace-handler: wasi:http/types and wasi:http/handler * trace: wasi:http/types, wasi:http/client and wasi:http/handler * trace-componentized-client: componentized:http/client Each component exports only the interfaces it traces, so it imports nothing more from the host than it needs. Traced client and handler calls take the traced request and response resources, so they can't be composed from trace-types with wac. Instead, the four wasi:http components compile the shared sources in crates/trace with cargo features that select the world. Resources are logged by the last four hex digits of their upstream handle, prefixed with `&`, e.g. `SELF=&002a`. Tests run each component in wasmtime with wasi:http from wasmtime-wasi-http. Requests sent upstream are recorded and answered with a canned response, without the network. Body streams passed through from the host can't be read by the harness, so the tests check status and headers. Signed-off-by: Scott Andrews <scott@andrews.me> Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Components that log each wasi:http call at the TRACE level, with the 'componentized-trace' context:
Each component exports only the interfaces it traces, so it imports nothing more from the host than it needs. Traced client and handler calls take the traced request and response resources, so they can't be composed from trace-types with wac. Instead, the four wasi:http components compile the shared sources in crates/trace with cargo features that select the world.
Resources are logged by the last four hex digits of their upstream handle, prefixed with
&, e.g.SELF=&002a.Tests run each component in wasmtime with wasi:http from wasmtime-wasi-http. Requests sent upstream are recorded and answered with a canned response, without the network. Body streams passed through from the host can't be read by the harness, so the tests check status and headers.