GitHub user jpeach opened a pull request:
https://github.com/apache/trafficserver/pull/422
TS 4099 Implement Lua support for custom metrics
This patch series implements custom metrics in terms of Lua. This provides
a more general way for operators to write their own metrics, removes the need
to recompile Traffic Server to add new custom metrics and starts paving the way
for more general Lua support in Traffic Server configuration.
@shukitchan @zwoop
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jpeach/trafficserver TS-4099
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafficserver/pull/422.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #422
----
commit d9d2adfd35416b3e107054b67eacf71f640e07dc
Author: James Peach <[email protected]>
Date: 2015-11-24T23:59:54Z
TS-4099: add core library infrastructure for Lua bindings
This adds a libbindings.la library with a convenience wrapper class
for dealing with a Lua state and binding APIs into it. We also add
some low-level Lua convenience APIs that end up being useful.
commit 2f7436de90ec57f956ae07a85f9b2bd4f155dbbd
Author: James Peach <[email protected]>
Date: 2015-11-25T00:08:25Z
TS-4099: add generic Lua bindings for metrics
This adds binding for metrics such that metric value can be queried
from within Lua by using their full names.
commit e0e08250c0d13dea2c8dc864e6f335c7a36fa2b2
Author: James Peach <[email protected]>
Date: 2015-11-25T00:19:37Z
TS-4099: add Lua bindings for custom metrics
Implement custom metrics in terms of Lua bindings. We export a
minimal API that constructs metrics and implicitly registers an
evaluation function. We periodically evaluate all the evaluation
functions and update their corresponding metrics.
Metrics are implicitly registered when they are loaded, so there
is no need to mention anything in mgmt/RecordsConfig.cc.
The metrics registration and evaluation syntax looks like this:
integer 'proxy.node.http.user_agents_total_documents_served' [[
proxy.process.http.incoming_requests
]]
commit 75f838f001d06c65643b5977f1ed527564885e6c
Author: James Peach <[email protected]>
Date: 2015-12-28T01:02:13Z
TS-4099: missing proxy.process.http.transaction_counts.errors.errors
proxy.process.http.transaction_counts.errors.errors doesn't exist,
so replace it with proxy.process.http.transaction_counts.errors.other
where applicable.
commit 303e365fa6987575d4dcc3df3eb7339f431f2587
Author: James Peach <[email protected]>
Date: 2015-12-28T01:04:52Z
TS-4099: missing proxy.process.http.transaction_counts.errors.early_hangups
proxy.process.http.transaction_counts.errors.early_hangups doesn't
exist, so remove mentions of it and metrics that depend on it.
commit 6d9a4cdacc6f285069f412f856a5dc70af4ac5a7
Author: James Peach <[email protected]>
Date: 2015-12-28T01:07:13Z
TS-4099: missing proxy.process.http.transaction_counts.errors.empty_hangups
proxy.process.http.transaction_counts.errors.empty_hangups doesn't
exist, so remove mentions of it and metrics that depend on it.
commit d403a877d3f07dff3029a492519fce413e1d0893
Author: James Peach <[email protected]>
Date: 2015-12-31T00:36:24Z
TS-4099: add automatic metrics namespace management
Rather than hardcoding the set of metrics namespace prefixes, poll
it at runtime. We keep polling until the namespace converges and
periodically thereafter to account for metrics created by plugins.
commit f7834526bc8225e89be8222cba92b239230cb7c7
Author: James Peach <[email protected]>
Date: 2016-01-01T01:33:05Z
TS-4099: fix a couple of metrics syntax problems
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---