lib/fiveruns/dash/metric.rb in fiveruns-dash-ruby-0.7.3 vs lib/fiveruns/dash/metric.rb in fiveruns-dash-ruby-0.7.4

- old
+ new

@@ -162,16 +162,16 @@ all.push :context => key, :value => val else bad_value! "Contexts must have an even number of items" end else - bad_value! "Unknown context type" + bad_value! "Unknown context type: #{key.class.name}" end all end else - bad_value! "Unknown value type" + bad_value! "Unknown value type: #{value.class.name}" end end def bad_value!(message) raise ArgumentError, "Bad data for `#{@name}' #{self.class.metric_type} metric: #{message}" @@ -266,9 +266,11 @@ end def instrument_options returning({}) do |options| options[:reentrant_token] = self.object_id.abs if @options[:reentrant] + options[:only_within] = @options[:only_within] if @options[:only_within] + options[:mark_as] = @name if @options[:mark] end end def methods_to_instrument @methods_to_instrument ||= Array(@options[:method]) + Array(@options[:methods])