Skip to content

question: should the lua filter log whether or not responses will be hooked when missing function envoy_on_...? #37397

Closed as not planned
@cetanu

Description

@cetanu

I get these log messages showing up

"envoy_on_request() function not found. Lua filter will not hook requests."

and I wanted to bring forward the question as to whether they should be an INFO level log message, or debug?
They seem somewhat noisy - my thinking is that most people who configure a lua filter are not surprised if they aren't hooking into either the request or response, in the cases where they only want to handle one. So what is the purpose behind this message?

Should it perhaps be a warning if BOTH functions are missing, but otherwise debug?

Secondarily, if someone was to add function envoy_on_response(_) end into all their lua filters in order to suppress this log message, does that incur any overheads when envoy is running? Does it then cause the lua filter to hook into the request/response, do nothing, and then continue?

Let me know your thoughts.

https://github.com/envoyproxy/envoy/blob/main/source/extensions/filters/http/lua/lua_filter.cc#L223-L230

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/luaenhancementFeature requests. Not bugs or questions.stalestalebot believes this issue/PR has not been touched recently

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions