{"action":"created","issue":{"url":"https://api.github.com/repos/rcrowley/go-metrics/issues/106","labels_url":"https://api.github.com/repos/rcrowley/go-metrics/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/rcrowley/go-metrics/issues/106/comments","events_url":"https://api.github.com/repos/rcrowley/go-metrics/issues/106/events","html_url":"https://github.com/rcrowley/go-metrics/issues/106","id":56002997,"number":106,"title":"GetOrRegisterGaugeFloat64 panic","user":{"login":"oliveagle","id":2270205,"avatar_url":"https://avatars.githubusercontent.com/u/2270205?v=3","gravatar_id":"","url":"https://api.github.com/users/oliveagle","html_url":"https://github.com/oliveagle","followers_url":"https://api.github.com/users/oliveagle/followers","following_url":"https://api.github.com/users/oliveagle/following{/other_user}","gists_url":"https://api.github.com/users/oliveagle/gists{/gist_id}","starred_url":"https://api.github.com/users/oliveagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliveagle/subscriptions","organizations_url":"https://api.github.com/users/oliveagle/orgs","repos_url":"https://api.github.com/users/oliveagle/repos","events_url":"https://api.github.com/users/oliveagle/events{/privacy}","received_events_url":"https://api.github.com/users/oliveagle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-30T07:26:44Z","updated_at":"2015-07-04T19:38:24Z","closed_at":null,"body":"```javascript\r\ng1 := metrics.GetOrRegisterGauge(\"the_same_key\", metrics.DefaultRegistry)\r\ng1.Update(100)\r\n\r\n# this line will panic coz there's a StandardGauge with \"the_same_key\" already exists. \r\ng2 := metrics.GetOrRegisterGaugeFloat64(\"the_same_key\", metrics.DefaultRegistry)\r\n```\r\n\r\n```bash\r\npanic: interface conversion: *metrics.StandardGauge is not metrics.GaugeFloat64: missing method Snapshot [recovered]\r\n        panic: interface conversion: *metrics.StandardGauge is not metrics.GaugeFloat64: missing method Snapshot\r\n```\r\n\r\nIs it better to raise an error instead of panic ?"},"comment":{"url":"https://api.github.com/repos/rcrowley/go-metrics/issues/comments/118545426","html_url":"https://github.com/rcrowley/go-metrics/issues/106#issuecomment-118545426","issue_url":"https://api.github.com/repos/rcrowley/go-metrics/issues/106","id":118545426,"user":{"login":"mihasya","id":22596,"avatar_url":"https://avatars.githubusercontent.com/u/22596?v=3","gravatar_id":"","url":"https://api.github.com/users/mihasya","html_url":"https://github.com/mihasya","followers_url":"https://api.github.com/users/mihasya/followers","following_url":"https://api.github.com/users/mihasya/following{/other_user}","gists_url":"https://api.github.com/users/mihasya/gists{/gist_id}","starred_url":"https://api.github.com/users/mihasya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mihasya/subscriptions","organizations_url":"https://api.github.com/users/mihasya/orgs","repos_url":"https://api.github.com/users/mihasya/repos","events_url":"https://api.github.com/users/mihasya/events{/privacy}","received_events_url":"https://api.github.com/users/mihasya/received_events","type":"User","site_admin":false},"created_at":"2015-07-04T19:38:24Z","updated_at":"2015-07-04T19:38:24Z","body":"I'm pretty sure this is actually Go telling you that the object you're trying to register as a `Gauge` does not implement the correct interface. Is this a `go-metrics` primitive that is supposed to work in this context?\r\n\r\nThis just looks like a bug, could you attach a full program reproducing this?"}}