Sha256: 1ee816c9f80764dd276903402f0a0baaf1ef27c7e12498b7dc9a92c8eec587e4
Contents?: true
Size: 930 Bytes
Versions: 10
Compression:
Stored size: 930 Bytes
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/cb' require 'sqreen/shared_storage' module Sqreen # Framework-aware callback class FrameworkCB < CB attr_accessor :framework def whitelisted? whitelisted = SharedStorage.get(:whitelisted) return whitelisted unless whitelisted.nil? framework && !framework.whitelisted_match.nil? end # 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 def record_observation(category, key, observation, at = Time.now.utc) return unless framework framework.observe(:observations, [category, key, observation, at], [], false) end end end
Version data entries
10 entries across 10 versions & 1 rubygems