Method: Wavefront::Validators#wf_distribution?

Defined in:
lib/wavefront-sdk/validators.rb

#wf_distribution?(dist) ⇒ Boolean

Validate a distribution description

Parameters:

  • dist (Hash)

    description of distribution

Returns:

  • (Boolean)

    true if valid

Raises:

  • whichever exception is thrown first when validating each component of the distribution.



460
461
462
463
464
465
466
467
# File 'lib/wavefront-sdk/validators.rb', line 460

def wf_distribution?(dist)
  wf_metric_name?(dist[:path])
  wf_distribution_values?(dist[:value])
  wf_epoch?(dist[:ts]) if dist[:ts]
  wf_source_id?(dist[:source]) if dist[:source]
  wf_point_tags?(dist[:tags]) if dist[:tags]
  true
end