Skip to content

Commit

Permalink
Fixup.
Browse files Browse the repository at this point in the history
  • Loading branch information
umaannamalai committed Oct 18, 2023
1 parent cbc21d0 commit c6c1844
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions newrelic/core/custom_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,17 @@ def create_custom_event(event_type, params, is_ml_event=False):
_logger.debug('Maximum number of attributes already '
'added to event %r. Dropping attribute: %r=%r',
name, key, value)
else:
attributes[key] = value
else:
key, value = process_user_attribute(k, v)
if key:
if len(attributes) >= MAX_NUM_USER_ATTRIBUTES:
_logger.debug('Maximum number of attributes already '
'added to event %r. Dropping attribute: %r=%r',
name, key, value)
else:
attributes[key] = value
name, key, value)
else:
attributes[key] = value
except Exception:
_logger.debug('Attributes failed to validate for unknown reason. '
'Check traceback for clues. Dropping event: %r.', name,
Expand Down

0 comments on commit c6c1844

Please sign in to comment.