)]}'
{"monasca_agent/collector/checks_d/nagios_wrapper.py":[{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"849268f13699e4db69888549a8dd11330f7a3093","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        status_code \u003d proc.poll()"},{"line_number":112,"context_line":"        if detail:"},{"line_number":113,"context_line":"            value_meta \u003d {\u0027detail\u0027: detail}"},{"line_number":114,"context_line":"            if len(json.dumps(value_meta)) \u003e VALUE_META_VALUE_MAX_LENGTH:"},{"line_number":115,"context_line":"                detail_max_len \u003d len(json.dumps(value_meta)) - VALUE_META_VALUE_MAX_LENGTH"},{"line_number":116,"context_line":"                value_meta \u003d {\u0027detail\u0027: detail[:-detail_max_len]}"},{"line_number":117,"context_line":"            self.gauge(metric_name, status_code,"},{"line_number":118,"context_line":"                       dimensions\u003ddimensions,"},{"line_number":119,"context_line":"                       value_meta\u003dvalue_meta)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_c3636a40","line":116,"range":{"start_line":113,"start_character":0,"end_line":116,"end_character":65},"updated":"2016-09-27 18:27:55.000000000","message":"This is good but I think it would be better to move some of this code to the utilities class so it can be reused by other plugins. Maybe just:\ndef validate_value_meta_length(value):\n\nWhich returns the number of characters that need to be trimmed. Would be good to add an unit test as well.","commit_id":"276477dbcb049b986ef078808f2ef737e4ccd6dd"}]}
