Class: Sqreen::Weave::Instrumentor

Inherits:
Object
  • Object
show all
Defined in:
lib/sqreen/weave/instrumentor.rb

Overview

metrics three dedicated metrics: abstract and isolate

Instance Method Summary collapse

Constructor Details

#initialize(metrics_engine) ⇒ Instrumentor



31
32
33
34
35
36
# 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

Instance Method Details

#instrument!(rules, framework) ⇒ Object



38
39
40
41
42
43
44
45
46
47
# 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