class Sqreen::Weave::Instrumentor
metrics three dedicated metrics: abstract and isolate
Public Class Methods
new(metrics_engine)
click to toggle source
# File lib/sqreen/weave/instrumentor.rb, line 31 def initialize(metrics_engine) ### bail out if no metric engine ### init metric to count calls to sqreen ### init metric to count request whitelist matches (ip or path whitelist) ### init metric to count over budget hits end
Public Instance Methods
instrument!(rules, framework)
click to toggle source
# File lib/sqreen/weave/instrumentor.rb, line 38 def instrument!(rules, framework) ### set up rule signature verifier ### force clean instrumentation callback list ### for each rule description, transform into format for adding callback ### attach framework to callback ### install callback, observing priority ### for each hardcoded callback ### install hardcoded callbacks, observing priority ### globally declare instrumentation ready end