{"action":"created","issue":{"url":"https://api.github.com/repos/grpc/grpc/issues/7391","repository_url":"https://api.github.com/repos/grpc/grpc","labels_url":"https://api.github.com/repos/grpc/grpc/issues/7391/labels{/name}","comments_url":"https://api.github.com/repos/grpc/grpc/issues/7391/comments","events_url":"https://api.github.com/repos/grpc/grpc/issues/7391/events","html_url":"https://github.com/grpc/grpc/pull/7391","id":165486152,"number":7391,"title":"Load Reporting Filter","user":{"login":"dgquintas","id":120217,"avatar_url":"https://avatars.githubusercontent.com/u/120217?v=3","gravatar_id":"","url":"https://api.github.com/users/dgquintas","html_url":"https://github.com/dgquintas","followers_url":"https://api.github.com/users/dgquintas/followers","following_url":"https://api.github.com/users/dgquintas/following{/other_user}","gists_url":"https://api.github.com/users/dgquintas/gists{/gist_id}","starred_url":"https://api.github.com/users/dgquintas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgquintas/subscriptions","organizations_url":"https://api.github.com/users/dgquintas/orgs","repos_url":"https://api.github.com/users/dgquintas/repos","events_url":"https://api.github.com/users/dgquintas/events{/privacy}","received_events_url":"https://api.github.com/users/dgquintas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/grpc/grpc/labels/cla:%20yes","name":"cla: yes","color":"009800"},{"url":"https://api.github.com/repos/grpc/grpc/labels/core","name":"core","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"ctiller","id":10120821,"avatar_url":"https://avatars.githubusercontent.com/u/10120821?v=3","gravatar_id":"","url":"https://api.github.com/users/ctiller","html_url":"https://github.com/ctiller","followers_url":"https://api.github.com/users/ctiller/followers","following_url":"https://api.github.com/users/ctiller/following{/other_user}","gists_url":"https://api.github.com/users/ctiller/gists{/gist_id}","starred_url":"https://api.github.com/users/ctiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctiller/subscriptions","organizations_url":"https://api.github.com/users/ctiller/orgs","repos_url":"https://api.github.com/users/ctiller/repos","events_url":"https://api.github.com/users/ctiller/events{/privacy}","received_events_url":"https://api.github.com/users/ctiller/received_events","type":"User","site_admin":false},"assignees":[{"login":"ctiller","id":10120821,"avatar_url":"https://avatars.githubusercontent.com/u/10120821?v=3","gravatar_id":"","url":"https://api.github.com/users/ctiller","html_url":"https://github.com/ctiller","followers_url":"https://api.github.com/users/ctiller/followers","following_url":"https://api.github.com/users/ctiller/following{/other_user}","gists_url":"https://api.github.com/users/ctiller/gists{/gist_id}","starred_url":"https://api.github.com/users/ctiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctiller/subscriptions","organizations_url":"https://api.github.com/users/ctiller/orgs","repos_url":"https://api.github.com/users/ctiller/repos","events_url":"https://api.github.com/users/ctiller/events{/privacy}","received_events_url":"https://api.github.com/users/ctiller/received_events","type":"User","site_admin":false},{"login":"slash-lib","id":19825775,"avatar_url":"https://avatars.githubusercontent.com/u/19825775?v=3","gravatar_id":"","url":"https://api.github.com/users/slash-lib","html_url":"https://github.com/slash-lib","followers_url":"https://api.github.com/users/slash-lib/followers","following_url":"https://api.github.com/users/slash-lib/following{/other_user}","gists_url":"https://api.github.com/users/slash-lib/gists{/gist_id}","starred_url":"https://api.github.com/users/slash-lib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slash-lib/subscriptions","organizations_url":"https://api.github.com/users/slash-lib/orgs","repos_url":"https://api.github.com/users/slash-lib/repos","events_url":"https://api.github.com/users/slash-lib/events{/privacy}","received_events_url":"https://api.github.com/users/slash-lib/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-07-14T06:32:15Z","updated_at":"2016-07-14T06:33:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/grpc/grpc/pulls/7391","html_url":"https://github.com/grpc/grpc/pull/7391","diff_url":"https://github.com/grpc/grpc/pull/7391.diff","patch_url":"https://github.com/grpc/grpc/pull/7391.patch"},"body":"July 2016 implementation of the load reporting filter. Featuring\r\n\r\n- An `grpc_arg` to enable load reporting, provided by `grpc_arg grpc_load_reporting_enable_arg()` in `src/core/ext/load_reporting/load_reporting.h`.\r\n- Much simplified mechanics: The user-provided function is now simply part of the filter translation unit. Its signature is `void load_reporting_fn(const grpc_load_reporting_call_data *call_data)`, where its input argument corresponds to:\r\n```c\r\n/** Call information to be passed to the provided LR callback. */\r\ntypedef struct grpc_load_reporting_call_data {\r\n  const grpc_load_reporting_source source; /**< point of last data update. */\r\n  \r\n  /** Unique identifier for the channel associated with the data */\r\n  intptr_t channel_id;\r\n  \r\n  /** Unique identifier for the call associated with the data. If the call\r\n   * hasn't been created yet, it'll have a value of zero. */\r\n  intptr_t call_id;\r\n  \r\n  /** Only valid when \\a source is \\a GRPC_LR_POINT_CALL_DESTRUCTION, that is,\r\n   * once the call has completed */\r\n  const grpc_call_final_info *final_info;\r\n  \r\n  const char *initial_md_string;  /**< value string for LR's initial md key */\r\n  \r\n  const char *trailing_md_string; /**< value string for LR's trailing md key */\r\n  \r\n  const char *method_name;        /**< Corresponds to :path header */\r\n} grpc_load_reporting_call_data;\r\n```\r\n\r\n#### Bahavior\r\nThere are four events of interest in the lifetime of the filter. The `source` field indicates which one last updated the `grpc_load_reporting_call_data` instance.\r\n##### Channel creation\r\nThe `load_reporting_fn` is invoked with a `grpc_load_reporting_data_call` instance with only `channel_id` set. All the other fields are zero/null.\r\n##### Call creation\r\nSame as previous point but now `call_id` also has a value.\r\n##### Call destruction\r\nThe big one. In this case all fields are filled in. The `initial_md_string` and `trailing_md_string` correspond to the `load-reporting-initial` and `load-reporting-trailing` metadata keys, respectively. \r\n##### Channel destruction\r\nOnce again, only the channel id is set. All other fields are zero/null."},"comment":{"url":"https://api.github.com/repos/grpc/grpc/issues/comments/232570453","html_url":"https://github.com/grpc/grpc/pull/7391#issuecomment-232570453","issue_url":"https://api.github.com/repos/grpc/grpc/issues/7391","id":232570453,"user":{"login":"dgquintas","id":120217,"avatar_url":"https://avatars.githubusercontent.com/u/120217?v=3","gravatar_id":"","url":"https://api.github.com/users/dgquintas","html_url":"https://github.com/dgquintas","followers_url":"https://api.github.com/users/dgquintas/followers","following_url":"https://api.github.com/users/dgquintas/following{/other_user}","gists_url":"https://api.github.com/users/dgquintas/gists{/gist_id}","starred_url":"https://api.github.com/users/dgquintas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgquintas/subscriptions","organizations_url":"https://api.github.com/users/dgquintas/orgs","repos_url":"https://api.github.com/users/dgquintas/repos","events_url":"https://api.github.com/users/dgquintas/events{/privacy}","received_events_url":"https://api.github.com/users/dgquintas/received_events","type":"User","site_admin":false},"created_at":"2016-07-14T06:33:36Z","updated_at":"2016-07-14T06:33:36Z","body":"@summerxyt FYI"}}
{"actor":{"display_login":"dgquintas"}}