Skip to content

Commit

Permalink
Discard tags that are longer than max length
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Sep 4, 2012
1 parent 4bd5ad9 commit cb5d901
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sentry/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
logger = logging.getLogger('sentry.errors')

UNSAVED = dict()

MAX_TAG_LENGTH = 200

def get_checksum_from_event(event):
for interface in event.interfaces.itervalues():
Expand Down Expand Up @@ -616,6 +616,9 @@ def add_tags(self, group, tags):
date = group.last_seen

for key, value in itertools.ifilter(bool, tags):
if len(value) > MAX_TAG_LENGTH:
continue

# TODO: FilterKey and FilterValue queries should be create's under a try/except
FilterKey.objects.get_or_create(
project=project,
Expand Down

0 comments on commit cb5d901

Please sign in to comment.