Sha256: 37898eb6647a509a6c54d4f26041346e140f77f94cf8d79ad1952cccbd49fa19

Contents?: true

Size: 544 Bytes

Versions: 1

Compression:

Stored size: 544 Bytes

Contents

module Timber
  class Probe
    class RequirementNotMetError < StandardError; end

    class << self
      def insert!(*args)
        new(*args).insert!
        Config.logger.debug("Inserted probe #{name}")
        true
      # RequirementUnsatisfiedError is the only silent failure we support
      rescue RequirementNotMetError => e
        Config.logger.debug("Failed inserting probe #{name}: #{e.message}")
        false
      end
    end

    def insert!
      raise NotImplementedError.new("You must implement #insert")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
timberio-1.0.0.beta1 lib/timber/probe.rb