lib/instrumental/agent.rb in instrumental_agent-0.7 vs lib/instrumental/agent.rb in instrumental_agent-0.7.1

- old
+ new

@@ -136,10 +136,10 @@ note !~ /[\n\r]/ end def valid?(metric, value, time) valid_metric = metric =~ /^([\d\w\-_]+\.)*[\d\w\-_]+$/i - valid_value = value.to_s =~ /^-?\d+(\.\d+)?$/ + valid_value = value.to_s =~ /^-?\d+(\.\d+)?(e-\d+)?$/ return true if valid_metric && valid_value report_invalid_metric(metric) unless valid_metric report_invalid_value(metric, value) unless valid_value