)]}'
{"doc/source/index.rst":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"98a1766f79d85e57c4826558636d78e6fd358d9d","unresolved":false,"context_lines":[{"line_number":11,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Ironic-lib provides a pluggable metrics library currently in use by many"},{"line_number":14,"context_line":"ironic projects. Current provided backends are noop, which discards all by"},{"line_number":15,"context_line":"default, and statsd, which emits metrics to a statsd daemon over the network."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The typical usage of metrics is to initialize and cache a metrics logger,"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3ac371cc_231ecb0b","line":14,"updated":"2016-08-18 16:31:15.000000000","message":"``noop`` or \"noop\"","commit_id":"d4a4167339d7c3494c9fb7181c81895675348fb1"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"98a1766f79d85e57c4826558636d78e6fd358d9d","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Ironic-lib provides a pluggable metrics library currently in use by many"},{"line_number":14,"context_line":"ironic projects. Current provided backends are noop, which discards all by"},{"line_number":15,"context_line":"default, and statsd, which emits metrics to a statsd daemon over the network."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The typical usage of metrics is to initialize and cache a metrics logger,"},{"line_number":18,"context_line":"using the helper method in `ironic_lib.metrics_utils`, then use that object to"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3ac371cc_43eae7db","line":15,"updated":"2016-08-18 16:31:15.000000000","message":"ditto, ``statsd`` or \"statsd\" for the backend name (not for statsd daemon)","commit_id":"d4a4167339d7c3494c9fb7181c81895675348fb1"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"98a1766f79d85e57c4826558636d78e6fd358d9d","unresolved":false,"context_lines":[{"line_number":17,"context_line":"The typical usage of metrics is to initialize and cache a metrics logger,"},{"line_number":18,"context_line":"using the helper method in `ironic_lib.metrics_utils`, then use that object to"},{"line_number":19,"context_line":"decorate functions or create context managers to metric. The general convention"},{"line_number":20,"context_line":"is to provide the `__name__` of the method as the first argument to set it as"},{"line_number":21,"context_line":"the prefix, then set the actual metric name to the method name. For example::"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"  from ironic_lib import metrics_utils"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3ac371cc_a3311ba4","line":20,"updated":"2016-08-18 16:31:15.000000000","message":"s/method/module/ ?","commit_id":"d4a4167339d7c3494c9fb7181c81895675348fb1"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"98a1766f79d85e57c4826558636d78e6fd358d9d","unresolved":false,"context_lines":[{"line_number":33,"context_line":"          do_some_work()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"      with METRICS.timer(\u0027complex_method_pt_2\u0027):"},{"line_number":36,"context_line":"          do_more_work()"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"There are three different kinds of metrics. :"},{"line_number":39,"context_line":"  - Timers measure how long the code in the decorated method or context"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3ac371cc_a3a63bbe","line":36,"updated":"2016-08-18 16:31:15.000000000","message":"Maybe add \"this will output timer metrics with a name like \u0027my.module.my_simple_method\u0027\" ?","commit_id":"d4a4167339d7c3494c9fb7181c81895675348fb1"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"98a1766f79d85e57c4826558636d78e6fd358d9d","unresolved":false,"context_lines":[{"line_number":35,"context_line":"      with METRICS.timer(\u0027complex_method_pt_2\u0027):"},{"line_number":36,"context_line":"          do_more_work()"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"There are three different kinds of metrics. :"},{"line_number":39,"context_line":"  - Timers measure how long the code in the decorated method or context"},{"line_number":40,"context_line":"    manager takes to execute, and emits the value as a timer metric. These"},{"line_number":41,"context_line":"    are useful for measuring performance of a given block of code."}],"source_content_type":"text/x-rst","patch_set":1,"id":"3ac371cc_030e2fe4","line":38,"updated":"2016-08-18 16:31:15.000000000","message":"s/. :/:/","commit_id":"d4a4167339d7c3494c9fb7181c81895675348fb1"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"98a1766f79d85e57c4826558636d78e6fd358d9d","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"The provided statsd backend natively supports all three metric types. For more"},{"line_number":61,"context_line":"information about how statsd changes behavior based on the metric type, see"},{"line_number":62,"context_line":"`statsd metric types \u003chttps://github.com/etsy/statsd/blob/master/docs/metric_types.md\u003e`_"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"Generated Developer Documentation"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3ac371cc_03810ffb","line":62,"updated":"2016-08-18 16:31:15.000000000","message":"Do they publish these docs somewhere or just in-tree?","commit_id":"d4a4167339d7c3494c9fb7181c81895675348fb1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8f95be02cc35ce3a6bf6a09a1dc29972e3ca4605","unresolved":false,"context_lines":[{"line_number":10,"context_line":"Metrics"},{"line_number":11,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Ironic-lib provides a pluggable metrics library currently in use by many"},{"line_number":14,"context_line":"ironic projects. Current provided backends are noop, which discards all by"},{"line_number":15,"context_line":"default, and statsd, which emits metrics to a statsd daemon over the network."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_a415979c","line":13,"updated":"2016-08-18 20:34:51.000000000","message":"s/currently//\n\nI really hate it when we use \u0027now\u0027, \u0027currently\u0027. When I see that, I always wonder if the documentation is current. Cuz unless stated otherwise, if it is documented, it is \u0027now\u0027 and \u0027current\u0027 anyway :)\n\nHow many ironic projects use this? ironic \u0026 ipa \u0026 ?","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"b19ec1741872d13d968420cf8b4c57f7ee32b53c","unresolved":false,"context_lines":[{"line_number":10,"context_line":"Metrics"},{"line_number":11,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Ironic-lib provides a pluggable metrics library currently in use by many"},{"line_number":14,"context_line":"ironic projects. Current provided backends are noop, which discards all by"},{"line_number":15,"context_line":"default, and statsd, which emits metrics to a statsd daemon over the network."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_df5e9c78","line":13,"in_reply_to":"3ac371cc_a415979c","updated":"2016-08-18 20:48:14.000000000","message":"You\u0027re right. I made this more generic, and talked about what ironic-lib release it was introduced in and removed any mention of ironic projects using it with this logic: When/if other ironic components (like, for instance, inspector) are updated to support metrics, it\u0027s unlikely ironic-lib, and this document, would be updated.","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8f95be02cc35ce3a6bf6a09a1dc29972e3ca4605","unresolved":false,"context_lines":[{"line_number":11,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Ironic-lib provides a pluggable metrics library currently in use by many"},{"line_number":14,"context_line":"ironic projects. Current provided backends are noop, which discards all by"},{"line_number":15,"context_line":"default, and statsd, which emits metrics to a statsd daemon over the network."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The typical usage of metrics is to initialize and cache a metrics logger,"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_a463d740","line":14,"updated":"2016-08-18 20:34:51.000000000","message":"s/noop/\u0027noop\u0027/","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"b19ec1741872d13d968420cf8b4c57f7ee32b53c","unresolved":false,"context_lines":[{"line_number":11,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Ironic-lib provides a pluggable metrics library currently in use by many"},{"line_number":14,"context_line":"ironic projects. Current provided backends are noop, which discards all by"},{"line_number":15,"context_line":"default, and statsd, which emits metrics to a statsd daemon over the network."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The typical usage of metrics is to initialize and cache a metrics logger,"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_bf63e040","line":14,"in_reply_to":"3ac371cc_a463d740","updated":"2016-08-18 20:48:14.000000000","message":"Done","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8f95be02cc35ce3a6bf6a09a1dc29972e3ca4605","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Ironic-lib provides a pluggable metrics library currently in use by many"},{"line_number":14,"context_line":"ironic projects. Current provided backends are noop, which discards all by"},{"line_number":15,"context_line":"default, and statsd, which emits metrics to a statsd daemon over the network."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The typical usage of metrics is to initialize and cache a metrics logger,"},{"line_number":18,"context_line":"using the helper method in `ironic_lib.metrics_utils`, then use that object to"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_04590b8f","line":15,"updated":"2016-08-18 20:34:51.000000000","message":"s/statsd/\u0027statsd\u0027/","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"b19ec1741872d13d968420cf8b4c57f7ee32b53c","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Ironic-lib provides a pluggable metrics library currently in use by many"},{"line_number":14,"context_line":"ironic projects. Current provided backends are noop, which discards all by"},{"line_number":15,"context_line":"default, and statsd, which emits metrics to a statsd daemon over the network."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The typical usage of metrics is to initialize and cache a metrics logger,"},{"line_number":18,"context_line":"using the helper method in `ironic_lib.metrics_utils`, then use that object to"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_1f59548f","line":15,"in_reply_to":"3ac371cc_04590b8f","updated":"2016-08-18 20:48:14.000000000","message":"Done","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8f95be02cc35ce3a6bf6a09a1dc29972e3ca4605","unresolved":false,"context_lines":[{"line_number":15,"context_line":"default, and statsd, which emits metrics to a statsd daemon over the network."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The typical usage of metrics is to initialize and cache a metrics logger,"},{"line_number":18,"context_line":"using the helper method in `ironic_lib.metrics_utils`, then use that object to"},{"line_number":19,"context_line":"decorate functions or create context managers to metric. The general convention"},{"line_number":20,"context_line":"is to provide the `__name__` of the method as the first argument to set it as"},{"line_number":21,"context_line":"the prefix, then set the actual metric name to the method name. For example::"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_84921bf5","line":18,"updated":"2016-08-18 20:34:51.000000000","message":"what helper method? What\u0027s the name of it?","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"b19ec1741872d13d968420cf8b4c57f7ee32b53c","unresolved":false,"context_lines":[{"line_number":15,"context_line":"default, and statsd, which emits metrics to a statsd daemon over the network."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The typical usage of metrics is to initialize and cache a metrics logger,"},{"line_number":18,"context_line":"using the helper method in `ironic_lib.metrics_utils`, then use that object to"},{"line_number":19,"context_line":"decorate functions or create context managers to metric. The general convention"},{"line_number":20,"context_line":"is to provide the `__name__` of the method as the first argument to set it as"},{"line_number":21,"context_line":"the prefix, then set the actual metric name to the method name. For example::"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_5f53cc6c","line":18,"in_reply_to":"3ac371cc_84921bf5","updated":"2016-08-18 20:48:14.000000000","message":"Made this more clear, thanks!","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8f95be02cc35ce3a6bf6a09a1dc29972e3ca4605","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The typical usage of metrics is to initialize and cache a metrics logger,"},{"line_number":18,"context_line":"using the helper method in `ironic_lib.metrics_utils`, then use that object to"},{"line_number":19,"context_line":"decorate functions or create context managers to metric. The general convention"},{"line_number":20,"context_line":"is to provide the `__name__` of the method as the first argument to set it as"},{"line_number":21,"context_line":"the prefix, then set the actual metric name to the method name. For example::"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_647d5fb1","line":19,"updated":"2016-08-18 20:34:51.000000000","message":"s/metric/meter/? \u0027to gather metrics\u0027 I think.","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"b19ec1741872d13d968420cf8b4c57f7ee32b53c","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The typical usage of metrics is to initialize and cache a metrics logger,"},{"line_number":18,"context_line":"using the helper method in `ironic_lib.metrics_utils`, then use that object to"},{"line_number":19,"context_line":"decorate functions or create context managers to metric. The general convention"},{"line_number":20,"context_line":"is to provide the `__name__` of the method as the first argument to set it as"},{"line_number":21,"context_line":"the prefix, then set the actual metric name to the method name. For example::"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_1fd034c9","line":19,"in_reply_to":"3ac371cc_647d5fb1","updated":"2016-08-18 20:48:14.000000000","message":"Good catch.","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8f95be02cc35ce3a6bf6a09a1dc29972e3ca4605","unresolved":false,"context_lines":[{"line_number":18,"context_line":"using the helper method in `ironic_lib.metrics_utils`, then use that object to"},{"line_number":19,"context_line":"decorate functions or create context managers to metric. The general convention"},{"line_number":20,"context_line":"is to provide the `__name__` of the method as the first argument to set it as"},{"line_number":21,"context_line":"the prefix, then set the actual metric name to the method name. For example::"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"  from ironic_lib import metrics_utils"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_0443cb6d","line":21,"updated":"2016-08-18 20:34:51.000000000","message":"this doesn\u0027t make sense. The __name__ IS the method name?","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"b19ec1741872d13d968420cf8b4c57f7ee32b53c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"using the helper method in `ironic_lib.metrics_utils`, then use that object to"},{"line_number":19,"context_line":"decorate functions or create context managers to metric. The general convention"},{"line_number":20,"context_line":"is to provide the `__name__` of the method as the first argument to set it as"},{"line_number":21,"context_line":"the prefix, then set the actual metric name to the method name. For example::"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"  from ironic_lib import metrics_utils"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_3fd7f0c0","line":21,"in_reply_to":"3ac371cc_0443cb6d","updated":"2016-08-18 20:48:14.000000000","message":"I meant \"module\" here, and I cleaned up the sloppy wording.","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8f95be02cc35ce3a6bf6a09a1dc29972e3ca4605","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"  METRICS \u003d metrics_utils.get_metrics_logger(__name__)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"  @METRICS.timer(\u0027my_performant_method\u0027)"},{"line_number":28,"context_line":"  def my_simple_method(arg, matey):"},{"line_number":29,"context_line":"      pass"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_4424a3c5","line":27,"updated":"2016-08-18 20:34:51.000000000","message":"I don\u0027t see how this is described above. Shouldn\u0027t it be \u0027my_simple_method\u0027?","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"b19ec1741872d13d968420cf8b4c57f7ee32b53c","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"  METRICS \u003d metrics_utils.get_metrics_logger(__name__)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"  @METRICS.timer(\u0027my_performant_method\u0027)"},{"line_number":28,"context_line":"  def my_simple_method(arg, matey):"},{"line_number":29,"context_line":"      pass"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_1fe794ad","line":27,"in_reply_to":"3ac371cc_4424a3c5","updated":"2016-08-18 20:48:14.000000000","message":"Done","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8f95be02cc35ce3a6bf6a09a1dc29972e3ca4605","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    manager takes to execute, and emits the value as a timer metric. These"},{"line_number":41,"context_line":"    are useful for measuring performance of a given block of code."},{"line_number":42,"context_line":"  - Counters increment a counter each time a decorated method or context"},{"line_number":43,"context_line":"    manager is executed. These is useful for counting the number of times a"},{"line_number":44,"context_line":"    method is called, or the number of times an event occurs."},{"line_number":45,"context_line":"  - Gauges return the value of a decorated method as a metric. This is useful"},{"line_number":46,"context_line":"    when you want to monitor the value returned by a method over time."}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_e415cf49","line":43,"updated":"2016-08-18 20:34:51.000000000","message":"s/is/are/","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"b19ec1741872d13d968420cf8b4c57f7ee32b53c","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    manager takes to execute, and emits the value as a timer metric. These"},{"line_number":41,"context_line":"    are useful for measuring performance of a given block of code."},{"line_number":42,"context_line":"  - Counters increment a counter each time a decorated method or context"},{"line_number":43,"context_line":"    manager is executed. These is useful for counting the number of times a"},{"line_number":44,"context_line":"    method is called, or the number of times an event occurs."},{"line_number":45,"context_line":"  - Gauges return the value of a decorated method as a metric. This is useful"},{"line_number":46,"context_line":"    when you want to monitor the value returned by a method over time."}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_3ffed038","line":43,"in_reply_to":"3ac371cc_e415cf49","updated":"2016-08-18 20:48:14.000000000","message":"Done","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8f95be02cc35ce3a6bf6a09a1dc29972e3ca4605","unresolved":false,"context_lines":[{"line_number":45,"context_line":"  - Gauges return the value of a decorated method as a metric. This is useful"},{"line_number":46,"context_line":"    when you want to monitor the value returned by a method over time."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Additionally, metrics can be sent directly out of code when appropriate. When"},{"line_number":49,"context_line":"used in this way, ironic-lib will simply emit the value provided as the"},{"line_number":50,"context_line":"requested method type. For example::"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_5f12ac59","line":48,"updated":"2016-08-18 20:34:51.000000000","message":"what do you mean, \u0027out of code\u0027?","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"b19ec1741872d13d968420cf8b4c57f7ee32b53c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"  - Gauges return the value of a decorated method as a metric. This is useful"},{"line_number":46,"context_line":"    when you want to monitor the value returned by a method over time."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Additionally, metrics can be sent directly out of code when appropriate. When"},{"line_number":49,"context_line":"used in this way, ironic-lib will simply emit the value provided as the"},{"line_number":50,"context_line":"requested method type. For example::"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3ac371cc_7f8fa8cc","line":48,"in_reply_to":"3ac371cc_5f12ac59","updated":"2016-08-18 20:48:14.000000000","message":"Cleaned up some of the sloppy wording here.","commit_id":"4ef92e921507e520b6618ee9752039b0727b1b3f"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"9a178caa8c87002269fd5715cffa67240bccc1d0","unresolved":false,"context_lines":[{"line_number":11,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Ironic-lib provides a pluggable metrics library as of the 2.0.0 release."},{"line_number":14,"context_line":"Current provided backends are the default, \u0027noop\u0027, which discards all data,"},{"line_number":15,"context_line":"and \u0027statsd\u0027, which emits metrics to a statsd daemon over the network."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The typical usage of metrics is to initialize and cache a metrics logger,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3ac371cc_ee1637f0","line":14,"updated":"2016-08-19 07:44:35.000000000","message":"How user defines which backend to use? Lets add more info about it.","commit_id":"f3b6117d240050c82172488842369bfd54609ef6"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"21b96ef86898d7bb0a3e32fa2e475f3ae39761b9","unresolved":false,"context_lines":[{"line_number":11,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Ironic-lib provides a pluggable metrics library as of the 2.0.0 release."},{"line_number":14,"context_line":"Current provided backends are the default, \u0027noop\u0027, which discards all data,"},{"line_number":15,"context_line":"and \u0027statsd\u0027, which emits metrics to a statsd daemon over the network."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The typical usage of metrics is to initialize and cache a metrics logger,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"1ac06dbe_a4810e92","line":14,"in_reply_to":"3ac371cc_ee1637f0","updated":"2016-08-19 15:49:38.000000000","message":"Since ironic-lib isn\u0027t directly configured by the user; I\u0027m hesitant to add the configuration details here. I can mention where the configs are, but a user should be using the Ironic or IPA docs to learn how to configure metrics. This doc is simply for developers.","commit_id":"f3b6117d240050c82172488842369bfd54609ef6"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"9a178caa8c87002269fd5715cffa67240bccc1d0","unresolved":false,"context_lines":[{"line_number":15,"context_line":"and \u0027statsd\u0027, which emits metrics to a statsd daemon over the network."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The typical usage of metrics is to initialize and cache a metrics logger,"},{"line_number":18,"context_line":"using the `get_metrics_logger()` method in `ironic_lib.metrics_utils`, then"},{"line_number":19,"context_line":"use that object to decorate functions or create context managers to gather"},{"line_number":20,"context_line":"metrics. The general convention is to provide the name of the module as the"},{"line_number":21,"context_line":"first argument to set it as the prefix, then set the actual metric name to the"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3ac371cc_4e8e6b28","line":18,"updated":"2016-08-19 07:44:35.000000000","message":"What about performance? Is it safe to enable metrics on production environments? Might be add a paragraph or couple sentences about performance impact?","commit_id":"f3b6117d240050c82172488842369bfd54609ef6"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"21b96ef86898d7bb0a3e32fa2e475f3ae39761b9","unresolved":false,"context_lines":[{"line_number":15,"context_line":"and \u0027statsd\u0027, which emits metrics to a statsd daemon over the network."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The typical usage of metrics is to initialize and cache a metrics logger,"},{"line_number":18,"context_line":"using the `get_metrics_logger()` method in `ironic_lib.metrics_utils`, then"},{"line_number":19,"context_line":"use that object to decorate functions or create context managers to gather"},{"line_number":20,"context_line":"metrics. The general convention is to provide the name of the module as the"},{"line_number":21,"context_line":"first argument to set it as the prefix, then set the actual metric name to the"}],"source_content_type":"text/x-rst","patch_set":4,"id":"1ac06dbe_642556c1","line":18,"in_reply_to":"3ac371cc_4e8e6b28","updated":"2016-08-19 15:49:38.000000000","message":"Same as above; this is for developers, not for administrators. See https://review.openstack.org/#/c/356811/ for the administrator guide.","commit_id":"f3b6117d240050c82172488842369bfd54609ef6"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"9a178caa8c87002269fd5715cffa67240bccc1d0","unresolved":false,"context_lines":[{"line_number":37,"context_line":"          do_more_work()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"There are three different kinds of metrics:"},{"line_number":40,"context_line":"  - Timers measure how long the code in the decorated method or context"},{"line_number":41,"context_line":"    manager takes to execute, and emits the value as a timer metric. These"},{"line_number":42,"context_line":"    are useful for measuring performance of a given block of code."},{"line_number":43,"context_line":"  - Counters increment a counter each time a decorated method or context"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3ac371cc_ce4a5b27","line":40,"updated":"2016-08-19 07:44:35.000000000","message":"Might be format kind of metrics with bold style? Like:\n\n- **Timers** - ...\n- **Counters** - ...\n- **Gauges** - ...\n\nThere is an example: https://github.com/openstack-dev/devstack/commit/655c22c77f21b360ba00b8c41b42fd0d0feec974#diff-2b90d8c56e8c74683cd26f86fa30d456R102","commit_id":"f3b6117d240050c82172488842369bfd54609ef6"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"21b96ef86898d7bb0a3e32fa2e475f3ae39761b9","unresolved":false,"context_lines":[{"line_number":37,"context_line":"          do_more_work()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"There are three different kinds of metrics:"},{"line_number":40,"context_line":"  - Timers measure how long the code in the decorated method or context"},{"line_number":41,"context_line":"    manager takes to execute, and emits the value as a timer metric. These"},{"line_number":42,"context_line":"    are useful for measuring performance of a given block of code."},{"line_number":43,"context_line":"  - Counters increment a counter each time a decorated method or context"}],"source_content_type":"text/x-rst","patch_set":4,"id":"1ac06dbe_21b6abdc","line":40,"in_reply_to":"3ac371cc_ce4a5b27","updated":"2016-08-19 15:49:38.000000000","message":"Done","commit_id":"f3b6117d240050c82172488842369bfd54609ef6"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"9a178caa8c87002269fd5715cffa67240bccc1d0","unresolved":false,"context_lines":[{"line_number":59,"context_line":"          METRICS.send_counter(node.uuid, 1)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"The provided statsd backend natively supports all three metric types. For more"},{"line_number":62,"context_line":"information about how statsd changes behavior based on the metric type, see"},{"line_number":63,"context_line":"`statsd metric types \u003chttps://github.com/etsy/statsd/blob/master/docs/metric_types.md\u003e`_"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"3ac371cc_0be585a7","line":62,"range":{"start_line":62,"start_character":37,"end_line":62,"end_character":45},"updated":"2016-08-19 07:44:35.000000000","message":"s/behavior/behaviour","commit_id":"f3b6117d240050c82172488842369bfd54609ef6"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"21b96ef86898d7bb0a3e32fa2e475f3ae39761b9","unresolved":false,"context_lines":[{"line_number":59,"context_line":"          METRICS.send_counter(node.uuid, 1)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"The provided statsd backend natively supports all three metric types. For more"},{"line_number":62,"context_line":"information about how statsd changes behavior based on the metric type, see"},{"line_number":63,"context_line":"`statsd metric types \u003chttps://github.com/etsy/statsd/blob/master/docs/metric_types.md\u003e`_"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"1ac06dbe_24123e63","line":62,"range":{"start_line":62,"start_character":37,"end_line":62,"end_character":45},"in_reply_to":"3ac371cc_0be585a7","updated":"2016-08-19 15:49:38.000000000","message":"This is the US English spelling, you\u0027re suggesting the UK english spelling. Both are considered correct for docs.","commit_id":"f3b6117d240050c82172488842369bfd54609ef6"}]}
