{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5421","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5421/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5421/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5421/events","html_url":"https://github.com/cockroachdb/cockroach/issues/5421","id":142212795,"number":5421,"title":"ui: Clear contract for metrics provided by CockroachDB","user":{"login":"mrtracy","id":6969858,"avatar_url":"https://avatars.githubusercontent.com/u/6969858?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtracy","html_url":"https://github.com/mrtracy","followers_url":"https://api.github.com/users/mrtracy/followers","following_url":"https://api.github.com/users/mrtracy/following{/other_user}","gists_url":"https://api.github.com/users/mrtracy/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtracy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtracy/subscriptions","organizations_url":"https://api.github.com/users/mrtracy/orgs","repos_url":"https://api.github.com/users/mrtracy/repos","events_url":"https://api.github.com/users/mrtracy/events{/privacy}","received_events_url":"https://api.github.com/users/mrtracy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cockroachdb/cockroach/milestones/2","html_url":"https://github.com/cockroachdb/cockroach/milestones/1.0","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/milestones/2/labels","id":1240360,"number":2,"title":"1.0","description":"","creator":{"login":"tamird","id":1535036,"avatar_url":"https://avatars.githubusercontent.com/u/1535036?v=3","gravatar_id":"","url":"https://api.github.com/users/tamird","html_url":"https://github.com/tamird","followers_url":"https://api.github.com/users/tamird/followers","following_url":"https://api.github.com/users/tamird/following{/other_user}","gists_url":"https://api.github.com/users/tamird/gists{/gist_id}","starred_url":"https://api.github.com/users/tamird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamird/subscriptions","organizations_url":"https://api.github.com/users/tamird/orgs","repos_url":"https://api.github.com/users/tamird/repos","events_url":"https://api.github.com/users/tamird/events{/privacy}","received_events_url":"https://api.github.com/users/tamird/received_events","type":"User","site_admin":false},"open_issues":175,"closed_issues":18,"state":"open","created_at":"2015-08-04T14:55:46Z","updated_at":"2016-03-21T22:34:24Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-03-20T22:09:56Z","updated_at":"2016-03-22T02:01:23Z","closed_at":null,"body":"We should provide a clear contract for the metrics provided by CockroachDB. \r\n\r\nIn current code, metrics are constructed ad-hoc inside of our various components by adding them into a metrics registry. In turn, time series and status summaries are recorded by iterating over the metrics contained in the registries.\r\n\r\nHowever, there is no clear contract describing which metrics are recorded; this will make it difficult for them to be consumed by any third-party product.\r\n\r\nA strategy should be developed for maintaining a clear \"contract\" of metrics - this includes knowledge of what each metric represents, and how each metric can be queried. It should be possible to verify that a cockroach build is meeting the contract; it would also be nice for this contract to inform our documentation."},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/199583869","html_url":"https://github.com/cockroachdb/cockroach/issues/5421#issuecomment-199583869","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5421","id":199583869,"user":{"login":"cuongdo","id":1564582,"avatar_url":"https://avatars.githubusercontent.com/u/1564582?v=3","gravatar_id":"","url":"https://api.github.com/users/cuongdo","html_url":"https://github.com/cuongdo","followers_url":"https://api.github.com/users/cuongdo/followers","following_url":"https://api.github.com/users/cuongdo/following{/other_user}","gists_url":"https://api.github.com/users/cuongdo/gists{/gist_id}","starred_url":"https://api.github.com/users/cuongdo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuongdo/subscriptions","organizations_url":"https://api.github.com/users/cuongdo/orgs","repos_url":"https://api.github.com/users/cuongdo/repos","events_url":"https://api.github.com/users/cuongdo/events{/privacy}","received_events_url":"https://api.github.com/users/cuongdo/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T02:01:23Z","updated_at":"2016-03-22T02:01:23Z","body":"I think that in terms of code, having named metrics with types is a great\nstarting point. The documentation could also be part of the contract, since\nthose describe semantics.\n\nFor example, I've spent a lot of time with these MySQL docs in the past\n(and can attest to their helpfulness):\n\nhttp://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html\n\nOn Sun, Mar 20, 2016 at 6:10 PM mrtracy <notifications@github.com> wrote:\n\n> We should provide a clear contract for the metrics provided by\n> CockroachDB.\n>\n> In current code, metrics are constructed ad-hoc inside of our various\n> components by adding them into a metrics registry. In turn, time series and\n> status summaries are recorded by iterating over the metrics contained in\n> the registries.\n>\n> However, there is no clear contract describing which metrics are recorded;\n> this will make it difficult for them to be consumed by any third-party\n> product.\n>\n> A strategy should be developed for maintaining a clear \"contract\" of\n> metrics - this includes knowledge of what each metric represents, and how\n> each metric can be queried. It should be possible to verify that a\n> cockroach build is meeting the contract; it would also be nice for this\n> contract to inform our documentation.\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly or view it on GitHub\n> <https://github.com/cockroachdb/cockroach/issues/5421>\n>\n"}}