Middleware API Source ​
Middleware is an abstract class that functions as a mutator for MetricCollection instances at specific points in a cycle, such as just before writing to outputs. Middleware is free to add, modify, and remove metrics from the collection, or replace it entirely if needed.
Methods ​
Middleware
​
Creates a new Middleware instance.
DANGER
Because Middleware is an abstract class, this constructor should only be called from within classes inheriting Middleware
by calling self:super('constructor')
. This will set up any inherited properties with the correct default values. Behavior of any other use is undefined.
handle
abstract ​
lua
Middleware:handle (target: MetricCollection): MetricCollection
Process the provided MetricCollection and return the resulting MetricCollection. In-place modification or replacement are both supported.