lua: add stats (#22623)

Currently stats are not available in lua filter, which makes it hard to
track/alert for the script errors. This change adds error stat.

Signed-off-by: Suresh Kumar <sureshkumar.pp@gmail.com>
Signed-off-by: Suresh Kumar <suresh.ponnusamy@freshworks.com>

Mirrored from https://github.com/envoyproxy/envoy @ 8c88943b747bd74517eaf257cd75dd686aa7bbb8
pull/626/head
data-plane-api(Azure Pipelines) 3 years ago
parent 005a06114c
commit 77b7be67de
  1. 20
      envoy/extensions/filters/http/lua/v3/lua.proto

@ -58,6 +58,26 @@ message Lua {
// The default Lua code that Envoy will execute. If no per route config is provided
// for the request, this Lua code will be applied.
config.core.v3.DataSource default_source_code = 3;
// Optional additional prefix to use when emitting statistics. By default
// metrics are emitted in *.lua.* namespace. If multiple lua filters are
// configured in a filter chain, the stats from each filter instance can
// be emitted using custom stat prefix to distinguish emitted
// statistics. For example:
//
// .. code-block:: yaml
//
// http_filters:
// - name: envoy.filters.http.lua
// typed_config:
// "@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
// stat_prefix: foo_script # This emits lua.foo_script.errors etc.
// - name: envoy.filters.http.lua
// typed_config:
// "@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
// stat_prefix: bar_script # This emits lua.bar_script.errors etc.
//
string stat_prefix = 4;
}
message LuaPerRoute {

Loading…
Cancel
Save