From 6afd373f2577be0b7a969d867df886f577aa8cae Mon Sep 17 00:00:00 2001 From: Caio Ramos Casimiro Date: Tue, 3 Sep 2024 16:23:38 +0100 Subject: [PATCH] chore(*) document metric name prefixing differences betweeen SDK hosts --- docs/PROXY_WASM_HOST_DIFFERENCES.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/PROXY_WASM_HOST_DIFFERENCES.md diff --git a/docs/PROXY_WASM_HOST_DIFFERENCES.md b/docs/PROXY_WASM_HOST_DIFFERENCES.md new file mode 100644 index 000000000..0328af6d1 --- /dev/null +++ b/docs/PROXY_WASM_HOST_DIFFERENCES.md @@ -0,0 +1,22 @@ +# Proxy-Wasm Host Differences + +Listed here are noteworthy internal discrepancies (implementation differences) +between ngx_wasm_module and other Proxy-Wasm host implementations. + +## Table of Contents + +- [Metrics Prefixing](#metrics-prefixing) + +## Metrics Prefixing + +- Envoy internally prefixes metric names with `wasmcustom.*` and only exposes + this prefix in the output of the `/metrics` endpoint. +- For internal implementation reasons, ngx_wasm_module prefixes metric names + with `pw.[filter_name].*`, where `filter_name` is the name of the filter + that defined the metric. Only the ngx_wasm_module FFI library may expose the + existence of this prefix. + +Proxy-Wasm SDK users need not worry as metric names are never exposed through +the SDK in the first place. + +[Back to TOC](#table-of-contents)