{"action":"created","issue":{"url":"https://api.github.com/repos/juju/juju/issues/5644","repository_url":"https://api.github.com/repos/juju/juju","labels_url":"https://api.github.com/repos/juju/juju/issues/5644/labels{/name}","comments_url":"https://api.github.com/repos/juju/juju/issues/5644/comments","events_url":"https://api.github.com/repos/juju/juju/issues/5644/events","html_url":"https://github.com/juju/juju/pull/5644","id":160763417,"number":5644,"title":"Introduce API observers","user":{"login":"kat-co","id":5490961,"avatar_url":"https://avatars.githubusercontent.com/u/5490961?v=3","gravatar_id":"","url":"https://api.github.com/users/kat-co","html_url":"https://github.com/kat-co","followers_url":"https://api.github.com/users/kat-co/followers","following_url":"https://api.github.com/users/kat-co/following{/other_user}","gists_url":"https://api.github.com/users/kat-co/gists{/gist_id}","starred_url":"https://api.github.com/users/kat-co/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kat-co/subscriptions","organizations_url":"https://api.github.com/users/kat-co/orgs","repos_url":"https://api.github.com/users/kat-co/repos","events_url":"https://api.github.com/users/kat-co/events{/privacy}","received_events_url":"https://api.github.com/users/kat-co/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":28,"created_at":"2016-06-16T21:18:31Z","updated_at":"2016-06-29T01:27:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/juju/juju/pulls/5644","html_url":"https://github.com/juju/juju/pull/5644","diff_url":"https://github.com/juju/juju/pull/5644.diff","patch_url":"https://github.com/juju/juju/pull/5644.patch"},"body":"The `apiserver and `rpc` packages previously had a type which would observe RPC connections, and API requests. This type is `apiserver/observers/RequestNotifier`. Because the auditing feature also requires this kind of functionality, we have broadened the injection points to take in N observers, and notify N observers when notable events occur. Currently, the `RequestNotifier` type is the only type which is being registered.\r\n\r\nThe registration occurs in the `MachineAgent` as composition of a workable apiserver is a concern best raised as far up in the stack as possible.\r\n\r\nFunctionally, this change maintains the same functionality as before with 1 notable exception: prior, the `rpc` package would send all connections to the log, but only log `apiserver` events if the logging level of `apiserver` was <= DEBUG. After discussing with fwereade and thumper, this behavior has now been coupled. If the logging level of `apiserver` is <= DEBUG, all functionality will be logged; otherwise, none of it will be.\n\n(Review request: http://reviews.vapour.ws/r/5089/)"},"comment":{"url":"https://api.github.com/repos/juju/juju/issues/comments/229231824","html_url":"https://github.com/juju/juju/pull/5644#issuecomment-229231824","issue_url":"https://api.github.com/repos/juju/juju/issues/5644","id":229231824,"user":{"login":"jujubot","id":7779494,"avatar_url":"https://avatars.githubusercontent.com/u/7779494?v=3","gravatar_id":"","url":"https://api.github.com/users/jujubot","html_url":"https://github.com/jujubot","followers_url":"https://api.github.com/users/jujubot/followers","following_url":"https://api.github.com/users/jujubot/following{/other_user}","gists_url":"https://api.github.com/users/jujubot/gists{/gist_id}","starred_url":"https://api.github.com/users/jujubot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jujubot/subscriptions","organizations_url":"https://api.github.com/users/jujubot/orgs","repos_url":"https://api.github.com/users/jujubot/repos","events_url":"https://api.github.com/users/jujubot/events{/privacy}","received_events_url":"https://api.github.com/users/jujubot/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T01:27:12Z","updated_at":"2016-06-29T01:27:12Z","body":"Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju"}}
{"actor":{"display_login":"jujubot"}}