Skip to content

Commit

Permalink
Commit suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPansino committed Jun 6, 2023
1 parent 1a28d36 commit a47e209
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions newrelic/common/metric_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ def create_metric_identity(name, tags=None):

# Apply attribute system sanitization.
# process_user_attribute returns (None, None) for results that fail sanitization.
# The filter removes these results fromt he iterable before creating the frozenset.
# The filter removes these results from the iterable before creating the frozenset.
tags = frozenset(filter(lambda args: args[0] is not None, map(lambda args: process_user_attribute(*args), tags)))

# Set empty iterables after filtering to None
if not tags and tags is not None:
tags = None
tags = tags or None # Set empty iterables after filtering to None

return (name, tags)

0 comments on commit a47e209

Please sign in to comment.