Sha256: df9aadb44d824964f1043bc22e88c6a1964787829e6d2295e7310df4f75ed1d3

Contents?: true

Size: 1.54 KB

Versions: 10

Compression:

Stored size: 1.54 KB

Contents

# typed: ignore

# Copyright (c) 2015 Sqreen. All Rights Reserved.
# Please refer to our terms for more information: https://www.sqreen.com/terms.html

require 'sqreen/weave'

# rule loader: decouple from runner
# remote rules from back
# local rules from local files
# => rule list (what is a rule?)
# => to callback (what is a callback?)
# => to instrumentation (== attach callbacks to their targets using graft)

# make shit like instrument framework independent (block passing?)
# => too much things assume only one framework
# possible to do run req actions without hardcoded cbs?
# (data comes from actions command, native cb merely binds to middleware)
# can cb be a form of abstraction?

# rule sig: decouple/split
# - data signer/checker
# apply this to rule data

# whitelist is mixed in

# metrics
# three dedicated metrics: abstract and isolate

class Sqreen::Weave::Instrumentor
  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

  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
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sqreen-1.25.1 lib/sqreen/weave/instrumentor.rb
sqreen-1.25.0 lib/sqreen/weave/instrumentor.rb
sqreen-1.24.3 lib/sqreen/weave/instrumentor.rb
sqreen-1.24.2 lib/sqreen/weave/instrumentor.rb
sqreen-1.24.1 lib/sqreen/weave/instrumentor.rb
sqreen-1.24.0 lib/sqreen/weave/instrumentor.rb
sqreen-1.23.2 lib/sqreen/weave/instrumentor.rb
sqreen-1.23.1 lib/sqreen/weave/instrumentor.rb
sqreen-1.23.0 lib/sqreen/weave/instrumentor.rb
sqreen-1.22.1 lib/sqreen/weave/instrumentor.rb