{"action":"created","issue":{"url":"https://api.github.com/repos/erlio/vernemq/issues/730","repository_url":"https://api.github.com/repos/erlio/vernemq","labels_url":"https://api.github.com/repos/erlio/vernemq/issues/730/labels{/name}","comments_url":"https://api.github.com/repos/erlio/vernemq/issues/730/comments","events_url":"https://api.github.com/repos/erlio/vernemq/issues/730/events","html_url":"https://github.com/erlio/vernemq/pull/730","id":330643207,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzNjAyNDQw","number":730,"title":"WIP - Generalize metrics","user":{"login":"larshesel","id":679187,"node_id":"MDQ6VXNlcjY3OTE4Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/679187?v=4","gravatar_id":"","url":"https://api.github.com/users/larshesel","html_url":"https://github.com/larshesel","followers_url":"https://api.github.com/users/larshesel/followers","following_url":"https://api.github.com/users/larshesel/following{/other_user}","gists_url":"https://api.github.com/users/larshesel/gists{/gist_id}","starred_url":"https://api.github.com/users/larshesel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larshesel/subscriptions","organizations_url":"https://api.github.com/users/larshesel/orgs","repos_url":"https://api.github.com/users/larshesel/repos","events_url":"https://api.github.com/users/larshesel/events{/privacy}","received_events_url":"https://api.github.com/users/larshesel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-08T12:42:47Z","updated_at":"2018-06-27T20:40:14Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/erlio/vernemq/pulls/730","html_url":"https://github.com/erlio/vernemq/pull/730","diff_url":"https://github.com/erlio/vernemq/pull/730.diff","patch_url":"https://github.com/erlio/vernemq/pull/730.patch"},"body":"   The purpose of this PR is to generalize the metrics system in a way\r\n   such that we can:\r\n\r\n   1. Have metrics with the same conceptual name, but still be able to\r\n      distinguish them via tags describing for example a\r\n      context. Example: `mqtt_publish_received` for MQTT 5 and MQTT\r\n      3.1.1 - one should be able to ask for any mqtt publish messages\r\n      received or just for the ones relevant for a specific protocol\r\n      version.\r\n\r\n   2. Metrics with the same conceptual name but different tags are\r\n      aggregated (summarized) if no specific tag was requested.\r\n\r\n   3. It is possible to retrieve all metrics without aggregations\r\n      applied. In this case tag information will also be delivered to\r\n      the receiver. Unaggregated metrics is required for monitoring\r\n      systems like Prometheus where it should be possible to do the\r\n      aggregation manually or only inspect events belonging to a\r\n      specific tag if desired.\r\n\r\n   4. Some metrics cannot be aggregated via summation due to their\r\n      nature. One example are the scheduler utilization gauges as\r\n      these are averages over time. Of course these are unique and\r\n      have different conceptual names\r\n      (`system_utilization_scheduler_1`,\r\n      `system_utilization_scheduler_2`) and as such will not be\r\n      summarized. In general metrics which should never be aggregated\r\n      need to have unique conceptual names!\r\n\r\n   5. Other kinds of aggregation than summation could be\r\n      constructed. For instance instead of summarizing some kind of\r\n      general function could be calculated over the metrics in\r\n      question. For example an average could be used: instead of\r\n      getting the total number of `mqtt_publish_received` events for\r\n      all tags, one could calculate the average instead. It's not\r\n      clear what the benefit would be here and as no obvious examples\r\n      were thought of only aggregation via summation is used. It\r\n      should also be mentioned that these other aggregation mechanism\r\n      can also be applied later, for instance using a monitoring\r\n      system like Prometheus.\r\n\r\nTodos:\r\n\r\n- [x] add tag support to the cli\r\n- [x] provide tag information to the prometheus exporter\r\n- [x] provide tag information to the grafana exporter\r\n- [ ] provide tag information to the $SYSTREE exporter\r\n- [ ] create a metrics manager process where we can register used tags and register new metrics (and it can be checked if it already exists)"},"comment":{"url":"https://api.github.com/repos/erlio/vernemq/issues/comments/400821690","html_url":"https://github.com/erlio/vernemq/pull/730#issuecomment-400821690","issue_url":"https://api.github.com/repos/erlio/vernemq/issues/730","id":400821690,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDgyMTY5MA==","user":{"login":"larshesel","id":679187,"node_id":"MDQ6VXNlcjY3OTE4Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/679187?v=4","gravatar_id":"","url":"https://api.github.com/users/larshesel","html_url":"https://github.com/larshesel","followers_url":"https://api.github.com/users/larshesel/followers","following_url":"https://api.github.com/users/larshesel/following{/other_user}","gists_url":"https://api.github.com/users/larshesel/gists{/gist_id}","starred_url":"https://api.github.com/users/larshesel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larshesel/subscriptions","organizations_url":"https://api.github.com/users/larshesel/orgs","repos_url":"https://api.github.com/users/larshesel/repos","events_url":"https://api.github.com/users/larshesel/events{/privacy}","received_events_url":"https://api.github.com/users/larshesel/received_events","type":"User","site_admin":false},"created_at":"2018-06-27T20:40:14Z","updated_at":"2018-06-27T20:40:14Z","author_association":"CONTRIBUTOR","body":"@dergraf, I think this is starting to get ready. Would you mind taking a look? Note the original comment in the PR which was updated."}}
{"actor":{"display_login":"larshesel"}}