class Sqreen::FrameworkCB

Framework-aware callback

Attributes

framework[RW]

Public Instance Methods

record_observation(category, key, observation, at = Time.now.utc) click to toggle source

Record a metric observation @param category [String] Name of the metric observed @param key [String] aggregation key @param observation [Object] data observed @param at [Time] time when observation was made

# File lib/sqreen/framework_cb.rb, line 25
def record_observation(category, key, observation, at = Time.now.utc)
  return unless framework
  framework.observe(:observations, [category, key, observation, at], [], false)
end
whitelisted?() click to toggle source
# File lib/sqreen/framework_cb.rb, line 14
def whitelisted?
  whitelisted = SharedStorage.get(:whitelisted)
  return whitelisted unless whitelisted.nil?
  framework && !framework.whitelisted_match.nil?
end