Class: NewRelic::Agent::LogEventAttributes

Inherits:
Object
  • Object
show all
Defined in:
lib/new_relic/agent/log_event_attributes.rb

Defined Under Namespace

Classes: InvalidTypeError, TruncationError

Constant Summary collapse

MAX_ATTRIBUTE_COUNT =

limit is 255, assume we send 15

240
ATTRIBUTE_KEY_CHARACTER_LIMIT =
255
ATTRIBUTE_VALUE_CHARACTER_LIMIT =
4094

Instance Method Summary collapse

Instance Method Details

#add_custom_attributes(attributes) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/new_relic/agent/log_event_attributes.rb', line 12

def add_custom_attributes(attributes)
  return if defined?(@custom_attribute_limit_reached) && @custom_attribute_limit_reached

  attributes.each do |key, value|
    next if absent?(key) || absent?(value)

    add_custom_attribute(key, value)
  end
end

#custom_attributesObject



22
23
24
# File 'lib/new_relic/agent/log_event_attributes.rb', line 22

def custom_attributes
  @custom_attributes ||= {}
end