python - Grouping '.format()'-style logging messages in Sentry -


i use sentryhandler raven.handlers.logging track logs of higher level within sentry. logging messages dynamically populated custom content .format(), text message doesn't have same content. example:

import logging raven.handlers.logging import sentryhandler raven.conf import setup_logging  # create "basic" logger logger = logging.getlogger("root")  # create sentry logger handler sh = sentryhandler("https://******@sentry.io/******") sh.setlevel(logging.warning) setup_logging(sh)  # send desired message sentry via logger if someinteresetingwarning():     logger.warning("{} missing files in {} directiories!".format(num_files,num_dirs)) 

all good, causes every unique message considered unique warning, of course isn't true.

there nice qa covering problem on github, solution provided there applies strings, formatted old-fashioned %s-style.

does know how implement proper sentry message grouping (aggregating) without having redesign string formatting format() %s placeholders?


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -