Skip to content

Commit

Permalink
Add vm_id and root_id tags to wasm log messages. (#110)
Browse files Browse the repository at this point in the history
* Add vm_id and root_id tags to wasm log messages.

Signed-off-by: John Plevyak <jplevyak@gmail.com>
  • Loading branch information
jplevyak authored Aug 7, 2019
1 parent 40c9b83 commit 6d8a8d8
Show file tree
Hide file tree
Showing 6 changed files with 871 additions and 853 deletions.
2 changes: 2 additions & 0 deletions examples/wasm/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ static_resources:
http_filters:
- name: envoy.wasm
config:
vm_id: "my_vm_id"
root_id: "my_root_id"
vm_config:
vm: "envoy.wasm.vm.wavm"
code:
Expand Down
3 changes: 2 additions & 1 deletion examples/wasm/envoy_filter_http_wasm_example.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class ExampleContext : public Context {
void onDelete() override;
};
static RegisterContextFactory register_ExampleContext(CONTEXT_FACTORY(ExampleContext),
ROOT_FACTORY(ExampleRootContext));
ROOT_FACTORY(ExampleRootContext),
"my_root_id");

void ExampleRootContext::onStart(WasmDataPtr) { logTrace("onStart"); }

Expand Down
Binary file modified examples/wasm/envoy_filter_http_wasm_example.wasm
Binary file not shown.
Loading

0 comments on commit 6d8a8d8

Please sign in to comment.