)]}'
{"monasca_agent/collector/checks/utils.py":[{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"0c34c261e99a1ee7541de9b0734003c928d447cf","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    return tenants"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class DynamicCheckHelper:"},{"line_number":60,"context_line":"    \"\"\""},{"line_number":61,"context_line":"    Supplements existing check class with reusable functionality to transform third-party metrics into Monasca ones"},{"line_number":62,"context_line":"    in a configurable way"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_12d19efa","line":59,"updated":"2017-01-17 05:07:15.000000000","message":"class DynamicCheckHelper(object):\n\nIMHO","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":20033,"name":"Artur Basiak","email":"artur.basiak@ts.fujitsu.com","username":"abasiak"},"change_message_id":"034cba5c00fc5c6391989f22c9ebb903d03fc8a1","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    DEFAULT_GROUP \u003d \"\""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    class MetricSpec:"},{"line_number":68,"context_line":"        \"\"\""},{"line_number":69,"context_line":"        Describes how to filter and map input metrics to Monasca metrics"},{"line_number":70,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_3533e4f7","line":67,"range":{"start_line":67,"start_character":10,"end_line":67,"end_character":20},"updated":"2017-01-17 06:23:18.000000000","message":"The same comment as above.","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        Describes how to filter and map input metrics to Monasca metrics"},{"line_number":70,"context_line":"        \"\"\""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        GAUGE \u003d 1"},{"line_number":73,"context_line":"        RATE \u003d 2"},{"line_number":74,"context_line":"        SKIP \u003d 0"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        def __init__(self, metric_type, metric_name):"},{"line_number":77,"context_line":"            \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_185b66f7","line":74,"range":{"start_line":72,"start_character":0,"end_line":74,"end_character":16},"updated":"2017-01-17 17:55:55.000000000","message":"any reason to support the other metric type Counter?","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":20033,"name":"Artur Basiak","email":"artur.basiak@ts.fujitsu.com","username":"abasiak"},"change_message_id":"034cba5c00fc5c6391989f22c9ebb903d03fc8a1","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        return re.sub(r\u0027[|\\\\;,\u0026\u003d\\\u0027]\u0027, \u0027-\u0027, re.sub(r\u0027[(}\u003e]\u0027, \u0027]\u0027, re.sub(r\u0027[({\u003c]\u0027, \u0027[\u0027, value.replace(r\u0027\\x2d\u0027, \u0027-\u0027)."},{"line_number":97,"context_line":"                                                                        replace(r\u0027\\x7e\u0027, \u0027~\u0027))))[:255]"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    class DimMapping:"},{"line_number":100,"context_line":"        \"\"\""},{"line_number":101,"context_line":"        Describes how to transform dictionary like metadata attached to a metric into Monasca dimensions"},{"line_number":102,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_b56c34d1","line":99,"range":{"start_line":99,"start_character":10,"end_line":99,"end_character":20},"updated":"2017-01-17 06:23:18.000000000","message":"The same comment as above.","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":20033,"name":"Artur Basiak","email":"artur.basiak@ts.fujitsu.com","username":"abasiak"},"change_message_id":"034cba5c00fc5c6391989f22c9ebb903d03fc8a1","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            if self.cregex:"},{"line_number":121,"context_line":"                match_groups \u003d self.cregex.match(source_value)"},{"line_number":122,"context_line":"                if match_groups:"},{"line_number":123,"context_line":"                    return DynamicCheckHelper._normalize_dim_value(self.separator.join(match_groups.groups()))"},{"line_number":124,"context_line":"                else:"},{"line_number":125,"context_line":"                    return None"},{"line_number":126,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_55e31033","line":123,"range":{"start_line":123,"start_character":27,"end_line":123,"end_character":66},"updated":"2017-01-17 06:23:18.000000000","message":"I don\u0027t like calling private method from different class. I know that this is a static method but still it also a private/semiprivate method.","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            if self.cregex:"},{"line_number":121,"context_line":"                match_groups \u003d self.cregex.match(source_value)"},{"line_number":122,"context_line":"                if match_groups:"},{"line_number":123,"context_line":"                    return DynamicCheckHelper._normalize_dim_value(self.separator.join(match_groups.groups()))"},{"line_number":124,"context_line":"                else:"},{"line_number":125,"context_line":"                    return None"},{"line_number":126,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_6e1e60bc","line":123,"range":{"start_line":123,"start_character":46,"end_line":123,"end_character":66},"updated":"2017-01-17 17:55:55.000000000","message":"i think this method is only used in this class \"DimMapping\". Would be better to move here.","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                return DynamicCheckHelper._normalize_dim_value(source_value)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    @staticmethod"},{"line_number":130,"context_line":"    def _build_dimension_map(config):"},{"line_number":131,"context_line":"        \"\"\""},{"line_number":132,"context_line":"        Builds dimension mappings for the given configuration element"},{"line_number":133,"context_line":"        :param config: \u0027mappings\u0027 element of config"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_ceef541c","line":130,"range":{"start_line":130,"start_character":29,"end_line":130,"end_character":35},"updated":"2017-01-17 17:55:55.000000000","message":"mapping","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":130,"context_line":"    def _build_dimension_map(config):"},{"line_number":131,"context_line":"        \"\"\""},{"line_number":132,"context_line":"        Builds dimension mappings for the given configuration element"},{"line_number":133,"context_line":"        :param config: \u0027mappings\u0027 element of config"},{"line_number":134,"context_line":"        :return: dictionary mapping source labels to applicable DimMapping objects"},{"line_number":135,"context_line":"        \"\"\""},{"line_number":136,"context_line":"        result \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_4edc4473","line":133,"range":{"start_line":133,"start_character":45,"end_line":133,"end_character":51},"updated":"2017-01-17 17:55:55.000000000","message":"instance?","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"            # note: source keys can be mapped to multiple dimensions"},{"line_number":148,"context_line":"            arr \u003d result.get(label, [])"},{"line_number":149,"context_line":"            mapping \u003d DynamicCheckHelper.DimMapping(dimension\u003ddim, regex\u003dregex, separator\u003dsepa)"},{"line_number":150,"context_line":"            arr.append(mapping)"},{"line_number":151,"context_line":"            result[label] \u003d arr"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_6eef40e9","line":149,"range":{"start_line":149,"start_character":62,"end_line":149,"end_character":65},"updated":"2017-01-17 17:55:55.000000000","message":"dimension key?","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        return result"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def __init__(self, check, prefix\u003dNone, default_mapping\u003dNone):"},{"line_number":156,"context_line":"        \"\"\""},{"line_number":157,"context_line":"        :param check: Target check instance to filter and map metrics from a separate data source. The mapping"},{"line_number":158,"context_line":"        procedure involves a filtering, renaming and classification of metrics and as part of this also filtering"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_b338b3a1","line":155,"range":{"start_line":155,"start_character":8,"end_line":155,"end_character":16},"updated":"2017-01-17 17:55:55.000000000","message":"Belongs to the DynamicCheckHelper class might be good to move it up under the class declaration to make it easier to find.","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"446bbf772e3d6cd12f60f1a867f4dbc98821981f","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        return result"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def __init__(self, check, prefix\u003dNone, default_mapping\u003dNone):"},{"line_number":156,"context_line":"        \"\"\""},{"line_number":157,"context_line":"        :param check: Target check instance to filter and map metrics from a separate data source. The mapping"},{"line_number":158,"context_line":"        procedure involves a filtering, renaming and classification of metrics and as part of this also filtering"},{"line_number":159,"context_line":"        and mapping of the labels attached to the input metrics."}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_f6e04d2b","line":156,"range":{"start_line":156,"start_character":8,"end_line":156,"end_character":11},"updated":"2017-01-18 00:21:05.000000000","message":"These comments are great for explaining your functions but I do think it\u0027s too long to be in the code. Here is what I did with one of the functions in monasca agent: https://github.com/openstack/monasca-agent/tree/master/docs/DeveloperDocs I think this is a better place to put all the detailed comments for your functions.","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        \"\"\""},{"line_number":157,"context_line":"        :param check: Target check instance to filter and map metrics from a separate data source. The mapping"},{"line_number":158,"context_line":"        procedure involves a filtering, renaming and classification of metrics and as part of this also filtering"},{"line_number":159,"context_line":"        and mapping of the labels attached to the input metrics."},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        To support all these capabilities, an element \u0027mapping\u0027 needs to be added to the instance config or a"},{"line_number":162,"context_line":"        default_mapping has to be supplied."}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_b390b344","line":159,"range":{"start_line":159,"start_character":27,"end_line":159,"end_character":33},"updated":"2017-01-17 17:55:55.000000000","message":"key/value pairs to dimensions correct? Not all inputs will classify that as labels","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        Filtering and renaming of input metrics is performed through regular expressions. Metrics not matching"},{"line_number":165,"context_line":"        the regular expression are ignored."},{"line_number":166,"context_line":"         with zero or more match groups."},{"line_number":167,"context_line":"        If match groups are specified, the match group values are"},{"line_number":168,"context_line":"        concatenated with \u0027_\u0027. If no match group is specified, the name is taken as is. The resulting name is"},{"line_number":169,"context_line":"        normalized according to Monasca naming standards for metrics. This implies that dots are replaced by"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_73c2cb35","line":166,"range":{"start_line":166,"start_character":9,"end_line":166,"end_character":40},"updated":"2017-01-17 17:55:55.000000000","message":"extra line?","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        a) Simple mapping:"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"           rates: [ \u0027FilesystemUsage\u0027 ]             # map metric \u0027FileystemUsage\u0027 to \u0027filesystem_usage\u0027"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        b) Mapping with simple regular expression"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_f3807bc1","line":174,"range":{"start_line":174,"start_character":86,"end_line":174,"end_character":102},"updated":"2017-01-17 17:55:55.000000000","message":"do we want to always use underscore in everycase? If you look at our naming conventions we usually use . to break the top level metric/group and then underscore at the end of the metric name. For instance in the case above we would probably use filesystem.usage","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":181,"context_line":""},{"line_number":182,"context_line":"           rates: [ \u0027(.*Usage)\\.stats\\.(total)\u0027 ]   # map metrics ending with \u0027Usage.stats.total\u0027 to \u0027..._usage_total\u0027"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        Mapping of labels to dimensions is a little more complex. For each dimension, an"},{"line_number":185,"context_line":"        entry of the following format is required:"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        a) Simple mapping"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_135d0779","line":184,"range":{"start_line":184,"start_character":19,"end_line":184,"end_character":25},"updated":"2017-01-17 17:55:55.000000000","message":"key value pairs","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":197,"context_line":"               (default: \u0027-\u0027)"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"            The regex is applied to the dimension value. If the regular expression does not match, then the metric"},{"line_number":201,"context_line":"            is ignored. If match-groups are part of the regular expression then the regex is used for value"},{"line_number":202,"context_line":"            transformation: The resulting dimension value is created by concatenating all match groups (in braces),"},{"line_number":203,"context_line":"            using the specified separator (default: \u0027-\u0027). If not match-group is specified, then the value is passed"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_13eb4779","line":200,"range":{"start_line":200,"start_character":108,"end_line":200,"end_character":114},"updated":"2017-01-17 17:55:55.000000000","message":"metric or dimension value?","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                    engine:"},{"line_number":228,"context_line":"                        dimensions:"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"        \"\"\""},{"line_number":231,"context_line":"        self._check \u003d check"},{"line_number":232,"context_line":"        self._prefix \u003d prefix"},{"line_number":233,"context_line":"        self._groups \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_d350df34","line":230,"range":{"start_line":230,"start_character":8,"end_line":230,"end_character":11},"updated":"2017-01-17 17:55:55.000000000","message":"would almost argue would be good to create documentation on this class in the agent documentation.","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":261,"context_line":"                        self._grp_metric_cache[iname][grp] \u003d {}"},{"line_number":262,"context_line":"                        self._grp_dimension_map[iname][grp] \u003d DynamicCheckHelper._build_dimension_map(gspec)"},{"line_number":263,"context_line":"                    # add the global mappings as pseudo group, so that it is considered when searching for metrics"},{"line_number":264,"context_line":"                    self._groups[iname].append(DynamicCheckHelper.DEFAULT_GROUP)"},{"line_number":265,"context_line":"                    self._grp_metric_map[iname][DynamicCheckHelper.DEFAULT_GROUP] \u003d self._metric_map[iname]"},{"line_number":266,"context_line":"                    self._grp_metric_cache[iname][DynamicCheckHelper.DEFAULT_GROUP] \u003d self._metric_cache[iname]"},{"line_number":267,"context_line":"                    self._grp_dimension_map[iname][DynamicCheckHelper.DEFAULT_GROUP] \u003d self._dimension_map[iname]"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_64291c37","line":264,"range":{"start_line":264,"start_character":66,"end_line":264,"end_character":79},"updated":"2017-01-17 17:55:55.000000000","message":"is the Default group ever set to anything else but \"\".","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def _get_group(self, instance, metric):"},{"line_number":273,"context_line":"        \"\"\""},{"line_number":274,"context_line":"        Search the group for a metric. Can be used only when metric names unambiguous across groups."},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        :param metric: input metric"},{"line_number":277,"context_line":"        :return: group name or None (if no group matches)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_1a06f01c","line":274,"range":{"start_line":274,"start_character":0,"end_line":274,"end_character":100},"updated":"2017-01-17 17:55:55.000000000","message":"does it not also set the metric spec to a group cache? seems like it is doing more then just getting group when group is none.","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":280,"context_line":"        group \u003d self._metric_to_group[iname].get(metric)"},{"line_number":281,"context_line":"        if group is None:"},{"line_number":282,"context_line":"            for g in self._groups[iname]:"},{"line_number":283,"context_line":"                spec \u003d self._fetch_metric_spec(instance, metric, g)"},{"line_number":284,"context_line":"                if spec and spec.metric_type !\u003d DynamicCheckHelper.MetricSpec.SKIP:"},{"line_number":285,"context_line":"                    self._metric_to_group[iname][metric] \u003d g"},{"line_number":286,"context_line":"                    return g"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_378025f7","line":283,"range":{"start_line":283,"start_character":47,"end_line":283,"end_character":55},"updated":"2017-01-17 17:55:55.000000000","message":"pass in instance name here?","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":503,"context_line":"    def push_metric(self, instance, metric, value, labels\u003d{}, group\u003dNone, timestamp\u003dNone, fixed_dimensions\u003d{},"},{"line_number":504,"context_line":"                    default_dimensions\u003d{}):"},{"line_number":505,"context_line":"        \"\"\""},{"line_number":506,"context_line":"        push a meter using the configured mapping information to determine metric_type and map the name and dimensions"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        :param instance: instance containing the check configuration"},{"line_number":509,"context_line":"        :param value: metric value (float)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_37c825a8","line":506,"range":{"start_line":506,"start_character":15,"end_line":506,"end_character":20},"updated":"2017-01-17 17:55:55.000000000","message":"metric","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":509,"context_line":"        :param value: metric value (float)"},{"line_number":510,"context_line":"        :param metric: metric as reported from metric data source (before mapping)"},{"line_number":511,"context_line":"        :param labels: labels/tags as reported from the metric data source (before mapping)"},{"line_number":512,"context_line":"        :param timestamp: optional timestamp to handle rates properly"},{"line_number":513,"context_line":"        :param group: specify the metric group, otherwise it will be determined from the metric name"},{"line_number":514,"context_line":"        :param fixed_dimensions:"},{"line_number":515,"context_line":"        :param default_dimensions:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_1a1990d7","line":512,"range":{"start_line":512,"start_character":0,"end_line":512,"end_character":69},"updated":"2017-01-17 17:55:55.000000000","message":"you dont use it when sending rates","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        dims \u003d self._map_dimensions(instance[\u0027name\u0027], labels, group, default_dimensions)"},{"line_number":538,"context_line":"        if dims is None:"},{"line_number":539,"context_line":"            # regex for at least one dimension filtered the metric out"},{"line_number":540,"context_line":"            return True"},{"line_number":541,"context_line":""},{"line_number":542,"context_line":"        # apply fixed default dimensions"},{"line_number":543,"context_line":"        if fixed_dimensions:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_7a229453","line":540,"range":{"start_line":540,"start_character":19,"end_line":540,"end_character":23},"updated":"2017-01-17 17:55:55.000000000","message":"why is this returning true it really didnt push the metric right? seems weird same return value compared to when it sent the metric","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"af831127418f1a66a8f81fc3fa947dabd5102a3b","unresolved":false,"context_lines":[{"line_number":648,"context_line":"                                                                     metric,"},{"line_number":649,"context_line":"                                                                     match_groups))"},{"line_number":650,"context_line":"                    metric_cache[metric] \u003d metric_entry"},{"line_number":651,"context_line":"                    return metric_entry"},{"line_number":652,"context_line":"            # fall-through"},{"line_number":653,"context_line":"            metric_entry \u003d DynamicCheckHelper.MetricSpec(metric_type\u003dDynamicCheckHelper.MetricSpec.SKIP,"},{"line_number":654,"context_line":"                                                         metric_name\u003dDynamicCheckHelper._normalize_metricname(metric))"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_776f0d2b","line":651,"range":{"start_line":651,"start_character":27,"end_line":651,"end_character":39},"updated":"2017-01-17 17:55:55.000000000","message":"yeah lets add counter here as well","commit_id":"fff0fcc8a52d3f4debec99fab5e0125fb201b840"},{"author":{"_account_id":20033,"name":"Artur Basiak","email":"artur.basiak@ts.fujitsu.com","username":"abasiak"},"change_message_id":"eae2deae259f4d2946a1fcb4db494864597bb0da","unresolved":false,"context_lines":[{"line_number":319,"context_line":""},{"line_number":320,"context_line":"    def is_enabled_metric(self, instance, metric, group\u003dNone):"},{"line_number":321,"context_line":"        return self._fetch_metric_spec(instance, metric, group).metric_type !\u003d DynamicCheckHelper.MetricSpec.SKIP"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def push_metric_dict(self, instance, metric_dict, labels\u003d{}, group\u003dNone, timestamp\u003dNone, fixed_dimensions\u003d{},"},{"line_number":324,"context_line":"                         default_dimensions\u003d{}, max_depth\u003d0, curr_depth\u003d0, prefix\u003d\u0027\u0027, index\u003d-1):"},{"line_number":325,"context_line":"        \"\"\"This will extract metrics and dimensions from a dictionary."},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        The following mappings are applied:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a1ff146_42a4a156","line":324,"range":{"start_line":322,"start_character":0,"end_line":324,"end_character":96},"updated":"2017-03-15 06:15:05.000000000","message":"Default arguments should not be set mutable objects. With\nevery run of this function the mutable object will get bigger. For example:\ndef function(d\u003d[]):\n   d.append(1)\n   print(d)\n\u003e\u003e\u003e function()\n[1]\n\u003e\u003e\u003e function()\n[1, 1]\n\u003e\u003e\u003e function()\n[1, 1, 1]\n\u003e\u003e\u003e function()\n[1, 1, 1, 1]\n\nPlease also check this small article:\nhttp://effbot.org/zone/default-values.htm","commit_id":"dd072ce1fdce32176ff5c05f568b81472339a4c1"},{"author":{"_account_id":20033,"name":"Artur Basiak","email":"artur.basiak@ts.fujitsu.com","username":"abasiak"},"change_message_id":"eae2deae259f4d2946a1fcb4db494864597bb0da","unresolved":false,"context_lines":[{"line_number":506,"context_line":""},{"line_number":507,"context_line":"        return ext_labels"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"    def push_metric(self, instance, metric, value, labels\u003d{}, group\u003dNone, timestamp\u003dNone, fixed_dimensions\u003d{},"},{"line_number":510,"context_line":"                    default_dimensions\u003d{}):"},{"line_number":511,"context_line":"        \"\"\"push a metric value using the configured mapping information to determine metric_type and map the name and"},{"line_number":512,"context_line":"        dimensions"},{"line_number":513,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a1ff146_0832cbf1","line":510,"range":{"start_line":509,"start_character":4,"end_line":510,"end_character":43},"updated":"2017-03-15 06:15:05.000000000","message":"please see comment above","commit_id":"dd072ce1fdce32176ff5c05f568b81472339a4c1"},{"author":{"_account_id":25231,"name":"Nathan Oyler","email":"notque@gmail.com","username":"notq"},"change_message_id":"0cf17314e33a5a0f780ba64f3147516142c0756b","unresolved":false,"context_lines":[{"line_number":557,"context_line":""},{"line_number":558,"context_line":"    def push_metric(self, instance, metric, value, labels\u003dNone, group\u003dNone, timestamp\u003dNone, fixed_dimensions\u003dNone,"},{"line_number":559,"context_line":"                    default_dimensions\u003dNone):"},{"line_number":560,"context_line":"        \"\"\"Pushes a meter using the configured mapping information to determine metric_type and map the name and dimensions"},{"line_number":561,"context_line":""},{"line_number":562,"context_line":"        :param instance: instance containing the check configuration"},{"line_number":563,"context_line":"        :param value: metric value (float)"}],"source_content_type":"text/x-python","patch_set":16,"id":"ffe62b97_9b74609b","line":560,"range":{"start_line":560,"start_character":11,"end_line":560,"end_character":26},"updated":"2017-03-24 15:54:13.000000000","message":"Pushes a metric, not meter.","commit_id":"f87a29a364bf3f8cf67f0bb0369f72bbdc1a82ee"}],"test-requirements.txt":[{"author":{"_account_id":20033,"name":"Artur Basiak","email":"artur.basiak@ts.fujitsu.com","username":"abasiak"},"change_message_id":"eae2deae259f4d2946a1fcb4db494864597bb0da","unresolved":false,"context_lines":[{"line_number":5,"context_line":"flake8\u003c2.6.0,\u003e\u003d2.5.4 # MIT"},{"line_number":6,"context_line":"nose # LGPL"},{"line_number":7,"context_line":"mock\u003e\u003d2.0 # BSD"},{"line_number":8,"context_line":"prometheus_client"}],"source_content_type":"text/plain","patch_set":9,"id":"3a1ff146_0853abe2","line":8,"range":{"start_line":8,"start_character":0,"end_line":8,"end_character":17},"updated":"2017-03-15 06:15:05.000000000","message":"Are they any version constraints ?","commit_id":"dd072ce1fdce32176ff5c05f568b81472339a4c1"}]}
