Merge changes from topic 'refactor-log-filters-for-prometheus'

* changes:
  Compute log-based metrics as rates or counters
  Fix Lua tests