Method: Wavefront::Validators#wf_event_id?
- Defined in:
- lib/wavefront-sdk/validators.rb
#wf_event_id?(id) ⇒ Boolean
Ensure the given argument is a valid event ID. Event IDs are an epoch-millisecond timestamp followed by a : followed by the name of the event.
287 288 289 290 291 |
# File 'lib/wavefront-sdk/validators.rb', line 287 def wf_event_id?(id) return true if id.is_a?(String) && id =~ /^\d{13}:.+/ raise Wavefront::Exception::InvalidEventId, id end |