)]}'
{"monasca_agent/common/metrics.py":[{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"dea25bb77fcf43b5c450058ec623a1e7658eb84d","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        try:"},{"line_number":110,"context_line":"          self.value +\u003d value * int(1 / sample_rate)"},{"line_number":111,"context_line":"        except TypeError:"},{"line_number":112,"context_line":"          log.error(\"metric %s value %s sample_rate %s\" % (self.name, value, sample_rate))"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def flush(self, timestamp):"},{"line_number":115,"context_line":"        if self.value is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_5c90acec","line":112,"updated":"2015-04-06 17:07:23.000000000","message":"If we use log.exception here we should get a stack trace so we can track the bad variable back to the source.\n\nAlso there seems to be a similar line of code in the Histogram object as well.  Should the same check also be in that location?","commit_id":"aaa1b77b91a4ef78f5aec286060677148f55d51f"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"395db1984052ab220edc5d909859586fce8ab82f","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        try:"},{"line_number":110,"context_line":"          self.value +\u003d value * int(1 / sample_rate)"},{"line_number":111,"context_line":"        except TypeError:"},{"line_number":112,"context_line":"          log.error(\"metric %s value %s sample_rate %s\" % (self.name, value, sample_rate))"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def flush(self, timestamp):"},{"line_number":115,"context_line":"        if self.value is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_e071e0a9","line":112,"updated":"2015-04-07 18:40:21.000000000","message":"need to use string.format.","commit_id":"aaa1b77b91a4ef78f5aec286060677148f55d51f"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"1148a00285d7061d3deb3f464cb59b2534f5f2af","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        try:"},{"line_number":110,"context_line":"          self.value +\u003d value * int(1 / sample_rate)"},{"line_number":111,"context_line":"        except TypeError:"},{"line_number":112,"context_line":"          log.error(\"metric %s value %s sample_rate %s\" % (self.name, value, sample_rate))"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def flush(self, timestamp):"},{"line_number":115,"context_line":"        if self.value is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_fcf9974e","line":112,"in_reply_to":"9aa53dc9_5c90acec","updated":"2015-04-07 14:41:59.000000000","message":"Since these can and will come in from an external source, I\u0027m not sure what we can learn from the stack dump.  At it stands today the code prints a messy stack trace and bails out.  This change would print the line number and the values passed in.  The rest of the logic would remain as it is today.\n\nI\u0027ll take a look at the Histogram object.  It wouldn\u0027t hurt wrapping it in an exception handler as well.\n\nThe simplest way to test bad metrics is through StatsD using the command line.\n\necho \"foo:1|c\" | nc -u -w0 127.0.0.1 8125","commit_id":"aaa1b77b91a4ef78f5aec286060677148f55d51f"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"966fc776b852682d40e3c0fdf1c8edbcbd4e127c","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        try:"},{"line_number":110,"context_line":"          self.value +\u003d value * int(1 / sample_rate)"},{"line_number":111,"context_line":"        except TypeError:"},{"line_number":112,"context_line":"          log.error(\"metric %s value %s sample_rate %s\" % (self.name, value, sample_rate))"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def flush(self, timestamp):"},{"line_number":115,"context_line":"        if self.value is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_4cbaf924","line":112,"in_reply_to":"9aa53dc9_e071e0a9","updated":"2015-04-08 02:14:20.000000000","message":"Done","commit_id":"aaa1b77b91a4ef78f5aec286060677148f55d51f"}]}
