Class: SampledDebugErrorTemplateKeys

Inherits:
Object
  • Object
show all
Defined in:
lib/wingify/constants/sampled_debug_error_template_keys.rb

Overview

Debug error template keys (msg_t) that are subject to sampling. Keys not listed here always send and bypass sampling.

Constant Summary collapse

SAMPLED_KEYS =
%w[
  EVENT_NOT_FOUND
  FEATURE_NOT_FOUND
  FEATURE_NOT_FOUND_WITH_ID
].freeze

Class Method Summary collapse

Class Method Details

.contains?(message_template_key) ⇒ Boolean

Checks whether a debug error template key should be sampled before sending.

Parameters:

  • message_template_key (String)

    The msg_t value from the debug event

Returns:

  • (Boolean)

    true if the key is in the sampled set; false otherwise



28
29
30
# File 'lib/wingify/constants/sampled_debug_error_template_keys.rb', line 28

def self.contains?(message_template_key)
  !message_template_key.nil? && SAMPLED_KEYS.include?(message_template_key)
end