{"action":"created","issue":{"url":"https://api.github.com/repos/prometheus/client_golang/issues/155","labels_url":"https://api.github.com/repos/prometheus/client_golang/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/prometheus/client_golang/issues/155/comments","events_url":"https://api.github.com/repos/prometheus/client_golang/issues/155/events","html_url":"https://github.com/prometheus/client_golang/issues/155","id":98975110,"number":155,"title":"Cannot add custom versions of existing system metrics","user":{"login":"msiebuhr","id":330611,"avatar_url":"https://avatars.githubusercontent.com/u/330611?v=3","gravatar_id":"","url":"https://api.github.com/users/msiebuhr","html_url":"https://github.com/msiebuhr","followers_url":"https://api.github.com/users/msiebuhr/followers","following_url":"https://api.github.com/users/msiebuhr/following{/other_user}","gists_url":"https://api.github.com/users/msiebuhr/gists{/gist_id}","starred_url":"https://api.github.com/users/msiebuhr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msiebuhr/subscriptions","organizations_url":"https://api.github.com/users/msiebuhr/orgs","repos_url":"https://api.github.com/users/msiebuhr/repos","events_url":"https://api.github.com/users/msiebuhr/events{/privacy}","received_events_url":"https://api.github.com/users/msiebuhr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-04T13:50:42Z","updated_at":"2015-08-04T13:57:38Z","closed_at":null,"body":"I'm writing a proxy that ingests Heroku router/runtime metrics logs and converts it to prometheus-ingestable metrics. (See my [fork of lumbermill](https://github.com/msiebuhr/lumbermill/blob/prometheus/drain.go).)\r\n\r\nI thought it'd be nice to output metrics in the same form as the ones used elsewhere in Prometheus, ex `http_request_size_bytes` with the relevant upstream `job`, `instance` and `endpoint` tags. (Though ideally I'd like to include HTTP Method and response code).\r\n\r\nTrying to register a handler for this:\r\n\r\n\thttpResponseSizeBytes = prometheus.NewSummaryVec(prometheus.SummaryOpts{\r\n\t\tName: \"http_request_size_bytes\",\r\n\t\tHelp: \"The HTTP response sizes in bytes.\",\r\n\t}, []string {\"job\", \"instance\", \"handler\"})\r\n\r\n    func init () {\r\n        prometheus.MustRegister(httpResponseSizeBytes)\r\n    }\r\n\r\nConflicts with the existing handler for the very same data:\r\n\r\n    panic: a previously registered descriptor with the same fully-qualified name as Desc{fqName: \"http_request_size_bytes\", help: \"The HTTP request sizes in bytes.\", constLabels: {handler=\"prometheus\"}, variableLabels: []} has different label names or a different help string\r\n\r\nI've tried unregistering the existing SummaryVec, but to no avail:\r\n\r\n    func drain(...) {\r\n        prometheus.Unregister(prometheus.NewSummary(prometheus.SummaryOpts{\r\n\t        Name:        \"http_response_size_bytes\",\r\n\t        Help: \"The HTTP response sizes in bytes.\",\r\n\t        ConstLabels: prometheus.Labels{\"handler\": \"prometheus\"},\r\n        }))\r\n        prometheus.MustRegister(httpResponseSizeBytes)\r\n    }\r\n\r\nDetects that a handler with a different set of labels has been there previously, and more or less gives me the same panic as above."},"comment":{"url":"https://api.github.com/repos/prometheus/client_golang/issues/comments/127621734","html_url":"https://github.com/prometheus/client_golang/issues/155#issuecomment-127621734","issue_url":"https://api.github.com/repos/prometheus/client_golang/issues/155","id":127621734,"user":{"login":"fabxc","id":4948210,"avatar_url":"https://avatars.githubusercontent.com/u/4948210?v=3","gravatar_id":"","url":"https://api.github.com/users/fabxc","html_url":"https://github.com/fabxc","followers_url":"https://api.github.com/users/fabxc/followers","following_url":"https://api.github.com/users/fabxc/following{/other_user}","gists_url":"https://api.github.com/users/fabxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fabxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabxc/subscriptions","organizations_url":"https://api.github.com/users/fabxc/orgs","repos_url":"https://api.github.com/users/fabxc/repos","events_url":"https://api.github.com/users/fabxc/events{/privacy}","received_events_url":"https://api.github.com/users/fabxc/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T13:57:38Z","updated_at":"2015-08-04T13:57:38Z","body":"@beorn7 probably can you give the most elaborate answer on this and how this might be affected/resolved by his planned changed to client_golang.\r\n\r\nPart of that includes switching the default HTTP handler instrumentation to histograms. So you might want to use histograms instead of summaries right away."}}