)]}'
{"monasca_api/api/prometheus_registry.py":[{"author":{"_account_id":20033,"name":"Artur Basiak","email":"artur.basiak@ts.fujitsu.com","username":"abasiak"},"change_message_id":"ef4c97a637e428195d4270f1c02dc073e7d32155","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (C) Copyright 2016 Hewlett Packard Enterprise Development LP"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_d995ef34","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"updated":"2017-05-22 13:59:49.000000000","message":"2017?","commit_id":"8b1cf06efcc44bf789e46c7624019b0561b40daa"}],"monasca_api/api/prometheus_utils.py":[{"author":{"_account_id":20033,"name":"Artur Basiak","email":"artur.basiak@ts.fujitsu.com","username":"abasiak"},"change_message_id":"ef4c97a637e428195d4270f1c02dc073e7d32155","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (C) Copyright 2016 Hewlett Packard Enterprise Development LP"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_f9b9d3cb","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"updated":"2017-05-22 13:59:49.000000000","message":"2017?","commit_id":"8b1cf06efcc44bf789e46c7624019b0561b40daa"},{"author":{"_account_id":20033,"name":"Artur Basiak","email":"artur.basiak@ts.fujitsu.com","username":"abasiak"},"change_message_id":"ef4c97a637e428195d4270f1c02dc073e7d32155","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import requests"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from prometheus_client import core"},{"line_number":24,"context_line":"from prometheus_client.core import _MetricWrapper"},{"line_number":25,"context_line":"from prometheus_client.core import _ValueClass"},{"line_number":26,"context_line":"from prometheus_client.core import default_timer"},{"line_number":27,"context_line":"from prometheus_client.core import decorate"},{"line_number":28,"context_line":"from prometheus_client.bridge.graphite import _RegularPush"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"MULTIPROCESS_MODES \u003d [\u0027min\u0027, \u0027max\u0027, \u0027livesum\u0027, \u0027liveall\u0027, \u0027all\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_394d0bc4","line":28,"range":{"start_line":24,"start_character":0,"end_line":28,"end_character":58},"updated":"2017-05-22 13:59:49.000000000","message":"You should import module not object, classes:\nhttps://docs.openstack.org/developer/hacking/#imports","commit_id":"8b1cf06efcc44bf789e46c7624019b0561b40daa"}],"monasca_api/api/server.py":[{"author":{"_account_id":7052,"name":"Fabio Giannetti","email":"fgiannet@cisco.com","username":"fabgia"},"change_message_id":"9d6b6473f3c3cc33122a762a55d65d6df74d5007","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    # is always /metrics, so we\u0027ll use that here for our internal metric"},{"line_number":87,"context_line":"    # reporting in spite of the name duplication"},{"line_number":88,"context_line":"    prometheus_metrics \u003d simport.load(cfg.CONF.dispatcher.prometheus_metrics)()"},{"line_number":89,"context_line":"    app.add_route(\u0027/metrics\u0027, prometheus_metrics)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    metrics \u003d simport.load(cfg.CONF.dispatcher.metrics)()"},{"line_number":92,"context_line":"    app.add_route(\"/v2.0/metrics\", metrics)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_6caa7f87","line":89,"range":{"start_line":89,"start_character":4,"end_line":89,"end_character":49},"updated":"2017-01-09 21:01:55.000000000","message":"this seems very confusing. A client may thing this is either V1 metrics or it is the latest version and V2 is deprecated. I would qualify the endpoint stating that these are Prometheus metrics, something like /prometheus/metrics","commit_id":"caf9541d76503dfcf199f74837da0a90cd47e5ac"},{"author":{"_account_id":17001,"name":"Tim Buckley","email":"timothy.jas.buckley@hpe.com","username":"timothy.jas.buckley"},"change_message_id":"d772bfdbe631117b144d22569ceea007520df732","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    # is always /metrics, so we\u0027ll use that here for our internal metric"},{"line_number":87,"context_line":"    # reporting in spite of the name duplication"},{"line_number":88,"context_line":"    prometheus_metrics \u003d simport.load(cfg.CONF.dispatcher.prometheus_metrics)()"},{"line_number":89,"context_line":"    app.add_route(\u0027/metrics\u0027, prometheus_metrics)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    metrics \u003d simport.load(cfg.CONF.dispatcher.metrics)()"},{"line_number":92,"context_line":"    app.add_route(\"/v2.0/metrics\", metrics)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_ccac4b38","line":89,"range":{"start_line":89,"start_character":4,"end_line":89,"end_character":49},"in_reply_to":"ba5201f7_6caa7f87","updated":"2017-01-09 21:25:50.000000000","message":"I agree that it is confusing, but it\u0027s a somewhat hard requirement for automatic scraping as implemented in https://review.openstack.org/#/c/401413/\n\nThe simplest ways around this I can see are:\n\n* (1) We could add monasca-specific configuration options to our  prometheus client plugin that would allow us to provide an alternate scrape path in k8s metadata. This would break compatibility with other Prometheus-compatible scrapers\n* (2) We keep it as-is and document the ambiguity\n\nA possible option #3 would be to offload metric serving to another external component. This would solve a number of other issues but has some major complexity penalties. Still something we are investigating :)","commit_id":"caf9541d76503dfcf199f74837da0a90cd47e5ac"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"7d58e5c2e27edd58dedacb96a86bf4abe001ba15","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    # is always /metrics, so we\u0027ll use that here for our internal metric"},{"line_number":87,"context_line":"    # reporting in spite of the name duplication"},{"line_number":88,"context_line":"    prometheus_metrics \u003d simport.load(cfg.CONF.dispatcher.prometheus_metrics)()"},{"line_number":89,"context_line":"    app.add_route(\u0027/metrics\u0027, prometheus_metrics)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    metrics \u003d simport.load(cfg.CONF.dispatcher.metrics)()"},{"line_number":92,"context_line":"    app.add_route(\"/v2.0/metrics\", metrics)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a461143_fa3775fc","line":89,"range":{"start_line":89,"start_character":4,"end_line":89,"end_character":49},"in_reply_to":"ba5201f7_ccac4b38","updated":"2017-01-30 13:08:43.000000000","message":"Prometheus itself already offers an option to specify another scrape-path than \"/metrics\": prometheus.io/path\n\nSee https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml#L88","commit_id":"caf9541d76503dfcf199f74837da0a90cd47e5ac"}],"monasca_api/middleware/instrument_filter.py":[{"author":{"_account_id":20033,"name":"Artur Basiak","email":"artur.basiak@ts.fujitsu.com","username":"abasiak"},"change_message_id":"ef4c97a637e428195d4270f1c02dc073e7d32155","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (C) Copyright 2016 Hewlett Packard Enterprise Development LP"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_f9bf935e","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"updated":"2017-05-22 13:59:49.000000000","message":"2017?","commit_id":"8b1cf06efcc44bf789e46c7624019b0561b40daa"}],"monasca_api/v2/reference/metrics.py":[{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"7a6e9d7012e67c699e838bff32a20f35aca6df81","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        elapsed \u003d timeit.default_timer() - start"},{"line_number":127,"context_line":"        BATCH_TIME.labels(\u0027sum\u0027).observe(elapsed)"},{"line_number":128,"context_line":"        BATCH_LATENCY.labels(\u0027mean\u0027).sample(elapsed)"},{"line_number":129,"context_line":"        MESSAGE_TIME.labels(\u0027sum\u0027).observe(elapsed / len(metrics))"},{"line_number":130,"context_line":"        MESSAGE_LATENCY.labels(\u0027mean\u0027).sample(elapsed / len(metrics))"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    @resource.resource_try_catch_block"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f2577a7_e90b307a","line":129,"range":{"start_line":129,"start_character":57,"end_line":129,"end_character":64},"updated":"2017-09-14 17:30:54.000000000","message":"This and the one below need to handle an empty list of metrics","commit_id":"f6fda6fdd0354f8139411747f7b218c5796ddbbd"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"60c6f20dceff71f82c8126401722bb2a9e2fa59c","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            except Exception as ex:"},{"line_number":162,"context_line":"                LOG.exception(ex)"},{"line_number":163,"context_line":"                if \u0027out of legal range\u0027 in ex.message:"},{"line_number":164,"context_line":"                    METRIC_TIMESTAMP_REJECTED.inc(len(metrics))"},{"line_number":165,"context_line":"                raise HTTPUnprocessableEntityError(\"Unprocessable Entity\", str(ex))"},{"line_number":166,"context_line":"            elapsed \u003d timeit.default_timer() - start"},{"line_number":167,"context_line":"            VALIDATE_TIME.labels(\u0027sum\u0027).observe(elapsed)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa0c359_36fdcc6d","line":164,"updated":"2018-02-09 21:01:09.000000000","message":"Do you really want to increment by the total number of metrics in the batch? There may be only one in the batch that is too old or new.","commit_id":"55b54621ed3ede7a77b67d86c5c4e1122ad0d4d9"}]}
