Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-4099

Replace XML statistics with Lua

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.2.0
    • Lua, Manager, Metrics
    • None

    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

          Activity

            People

              jamespeach James Peach
              jamespeach James Peach
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment