logstash-plugins / logstash-output-datadog_metrics

Apache License 2.0
3 stars 16 forks source link

Time isn't valid, but Logstash::Timestamp is #4

Closed tebriel closed 9 years ago

tebriel commented 9 years ago

event.timestamp is of time Logstash::Timestamp. I'm not sure how you could ever get a non-::Timestamp as your value in event.timestamp, but maybe there's something I don't understand. It definitely fails the is_a(Time) though.

guyboertje commented 9 years ago

@tebriel - the solution that you have suggested is good but the to_epoch method is a coersion and therefore it should handle as many probable datatypes as it can.

I am combining your and @colinsurprenant 's PR into one.

tebriel commented 9 years ago

Awesome, thanks!

guyboertje commented 9 years ago

As PR #5 is now merged - I am closing this one