)]}'
{"monasca_persister/persister.py":[{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"3f6da795d20677e4da19393918f82e287e17e6c1","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                                     config[\u0027influxdb\u0027][\u0027password\u0027],"},{"line_number":57,"context_line":"                                     config[\u0027influxdb\u0027][\u0027database\u0027])"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    for message in consumer:"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        log.debug(message.message.value)"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa98f980_d5e527dd","line":59,"updated":"2014-09-17 13:40:15.000000000","message":"The big thing this is missing is a try clause so any exceptions get logged to the log file. Might be worth adding now to make debugging easier","commit_id":"892e1cfb96a67e2dacc0de64e8f9b5f3452644a7"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"e4b0cb3224cdaf379d8b82338e815e083299ccdf","unresolved":false,"context_lines":[{"line_number":26,"context_line":"import sys"},{"line_number":27,"context_line":"import yaml"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"log \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def main(argv\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_24c8ff55","line":29,"updated":"2014-09-17 16:29:49.000000000","message":"We will need to modify this code to use the oslo logging.","commit_id":"6bf7a60ceb9173378ef0959fe88e8923d5e2cd12"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"e4b0cb3224cdaf379d8b82338e815e083299ccdf","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        print(\"Config file defaults to /etc/monasca/persister.yaml\")"},{"line_number":41,"context_line":"        return 1"},{"line_number":42,"context_line":"    else:"},{"line_number":43,"context_line":"        config_file \u003d \u0027/etc/monasca/persister.yaml\u0027"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    config \u003d yaml.load(open(config_file, \u0027r\u0027))"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_84a8cb78","line":43,"updated":"2014-09-17 16:29:49.000000000","message":"We will need to modify this code to use the oslo opts library.","commit_id":"6bf7a60ceb9173378ef0959fe88e8923d5e2cd12"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"e4b0cb3224cdaf379d8b82338e815e083299ccdf","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        for message in consumer:"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"            log.debug(message.message.value)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"            decoded \u003d json.loads(message.message.value)"},{"line_number":68,"context_line":"            log.debug(json.dumps(decoded, sort_keys\u003dTrue, indent\u003d4))"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_64d92722","line":65,"updated":"2014-09-17 16:29:49.000000000","message":"This is a considerable amount of log.debug messages. Should this be log.trace. \n\nThis just seems like an inordinate number of log messages for when debugging is enabled and will flood the log file. Imagine that you have to debug this in production. You want to enable some level of logging, such as logging messages that result in errors, but you don\u0027t necessarily want to log every single message.","commit_id":"6bf7a60ceb9173378ef0959fe88e8923d5e2cd12"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"e4b0cb3224cdaf379d8b82338e815e083299ccdf","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            log.debug(\u0027value: %s\u0027, value)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"            url_encoded_serie_name \u003d ("},{"line_number":98,"context_line":"                urllib.quote(metric_name.encode(\u0027utf8\u0027), safe\u003d\u0027\u0027)"},{"line_number":99,"context_line":"                + \u0027?\u0027 + urllib.quote(tenant_id.encode(\u0027utf8\u0027), safe\u003d\u0027\u0027)"},{"line_number":100,"context_line":"                + \u0027\u0026\u0027 + urllib.quote(region.encode(\u0027utf8\u0027), safe\u003d\u0027\u0027))"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_a416af56","line":98,"updated":"2014-09-17 16:29:49.000000000","message":"Not sure is oslo has a urllib they use, but if so, same comments as above.","commit_id":"6bf7a60ceb9173378ef0959fe88e8923d5e2cd12"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"e4b0cb3224cdaf379d8b82338e815e083299ccdf","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            influxdb_client.write_points(json_body)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    except Exception:"},{"line_number":122,"context_line":"        log.exception(\u0027Persister encountered fatal exception. Shutting down.\u0027)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"if __name__ \u003d\u003d \"__main__\":"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_644cc7c9","line":122,"updated":"2014-09-17 16:29:49.000000000","message":"You should catch the explicit exception and log that too.","commit_id":"6bf7a60ceb9173378ef0959fe88e8923d5e2cd12"}]}
