Description
The custom metrics XML format is undocumented and difficult to use and extend. Since we plan to use Lua for configuration programmability, lets make a start by replacing this subsystem with Lua.
It turns out that Lua is mostly more readable and easier to understand. Performance is roughly similar.
Example syntax:
float 'proxy.node.user_agent_total_bytes_avg_10s' [[ local self = ... return interval_delta_of_10s(self, function() return proxy.node.user_agent_total_bytes end) ]] counter 'proxy.node.origin_server_total_bytes' [[ return proxy.node.http.origin_server_total_request_bytes + proxy.node.http.origin_server_total_response_bytes + proxy.node.http.parent_proxy_total_request_bytes + proxy.node.http.parent_proxy_total_response_bytes ]]
Attachments
Issue Links
- blocks
-
TS-4100 Remove XML statistics
- Closed
- depends upon
-
TS-4119 LuaJIT and ASAN do not work well together
- Closed
- is related to
-
TS-4107 proxy.process.ssl.total_success_handshake_count_in has wrong record type
- Closed
- relates to
-
TS-3830 Metrics created via stats.config.xml should not need to be registered in RecordsConfig.cc
- Closed
-
TS-3686 Implement Lua "scriptlets", as discussed at the Austin 2015 Summit
- Open
-
TS-3183 Clean up (and/or eliminate?) some proxy.node metrics
- Open