{"action":"created","issue":{"url":"https://api.github.com/repos/SimpleFinance/simple-metrics/issues/1","repository_url":"https://api.github.com/repos/SimpleFinance/simple-metrics","labels_url":"https://api.github.com/repos/SimpleFinance/simple-metrics/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/SimpleFinance/simple-metrics/issues/1/comments","events_url":"https://api.github.com/repos/SimpleFinance/simple-metrics/issues/1/events","html_url":"https://github.com/SimpleFinance/simple-metrics/issues/1","id":10127085,"node_id":"MDU6SXNzdWUxMDEyNzA4NQ==","number":1,"title":"Can't access meters from my healthcheck","user":{"login":"tomwans","id":163957,"node_id":"MDQ6VXNlcjE2Mzk1Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/163957?v=4","gravatar_id":"","url":"https://api.github.com/users/tomwans","html_url":"https://github.com/tomwans","followers_url":"https://api.github.com/users/tomwans/followers","following_url":"https://api.github.com/users/tomwans/following{/other_user}","gists_url":"https://api.github.com/users/tomwans/gists{/gist_id}","starred_url":"https://api.github.com/users/tomwans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomwans/subscriptions","organizations_url":"https://api.github.com/users/tomwans/orgs","repos_url":"https://api.github.com/users/tomwans/repos","events_url":"https://api.github.com/users/tomwans/events{/privacy}","received_events_url":"https://api.github.com/users/tomwans/received_events","type":"User","site_admin":false},"labels":[{"id":18458786,"node_id":"MDU6TGFiZWwxODQ1ODc4Ng==","url":"https://api.github.com/repos/SimpleFinance/simple-metrics/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2013-01-19T17:12:41Z","updated_at":"2018-10-24T13:44:56Z","closed_at":"2018-10-24T13:29:38Z","author_association":"NONE","body":"``` ruby\n  define_meter :bac\n\n  get '/drink' do\n    bac.mark\n  end\n\n  new_healthcheck(\"bac\") do\n    rate_watch = 0.3\n\n    if bac.fifteenMinuteRate < rate_watch\n      Simple::Metrics::HEALTHY\n    else\n      Simple::Metrics::UNHEALTHY.new(\"Feeling tipsy\")\n    end\n  end\n```\n\nThis is not possible, since the healthchecks run in a class context, but the meters were evaluated in the rack app instance. The healthcheck can't access the `bac` variable.\n"},"comment":{"url":"https://api.github.com/repos/SimpleFinance/simple-metrics/issues/comments/432662122","html_url":"https://github.com/SimpleFinance/simple-metrics/issues/1#issuecomment-432662122","issue_url":"https://api.github.com/repos/SimpleFinance/simple-metrics/issues/1","id":432662122,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjY2MjEyMg==","user":{"login":"mattmoyer","id":3210334,"node_id":"MDQ6VXNlcjMyMTAzMzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/3210334?v=4","gravatar_id":"","url":"https://api.github.com/users/mattmoyer","html_url":"https://github.com/mattmoyer","followers_url":"https://api.github.com/users/mattmoyer/followers","following_url":"https://api.github.com/users/mattmoyer/following{/other_user}","gists_url":"https://api.github.com/users/mattmoyer/gists{/gist_id}","starred_url":"https://api.github.com/users/mattmoyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattmoyer/subscriptions","organizations_url":"https://api.github.com/users/mattmoyer/orgs","repos_url":"https://api.github.com/users/mattmoyer/repos","events_url":"https://api.github.com/users/mattmoyer/events{/privacy}","received_events_url":"https://api.github.com/users/mattmoyer/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T13:44:56Z","updated_at":"2018-10-24T13:44:56Z","author_association":"NONE","body":"RIP"}}
{"actor":{"display_login":"mattmoyer"}}