{"action":"created","comment":{"url":"https://api.github.com/repos/mmmries/gnat/pulls/comments/230050176","pull_request_review_id":170695077,"id":230050176,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDA1MDE3Ng==","diff_hunk":"@@ -318,6 +335,7 @@ defmodule Gnat do\n   end\n   defp process_message({:msg, topic, sid, reply_to, body}, state) do\n     unless is_nil(state.receivers[sid]) do\n+      Telemetry.execute([:gnat, :message_received], 1, %{topic: topic})","path":"lib/gnat.ex","position":62,"original_position":62,"commit_id":"3dcac8ffc08b3ab2bfff8e3cdb434063dfa243e6","original_commit_id":"3dcac8ffc08b3ab2bfff8e3cdb434063dfa243e6","user":{"login":"jjcarstens","id":11321326,"node_id":"MDQ6VXNlcjExMzIxMzI2","avatar_url":"https://avatars2.githubusercontent.com/u/11321326?v=4","gravatar_id":"","url":"https://api.github.com/users/jjcarstens","html_url":"https://github.com/jjcarstens","followers_url":"https://api.github.com/users/jjcarstens/followers","following_url":"https://api.github.com/users/jjcarstens/following{/other_user}","gists_url":"https://api.github.com/users/jjcarstens/gists{/gist_id}","starred_url":"https://api.github.com/users/jjcarstens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjcarstens/subscriptions","organizations_url":"https://api.github.com/users/jjcarstens/orgs","repos_url":"https://api.github.com/users/jjcarstens/repos","events_url":"https://api.github.com/users/jjcarstens/events{/privacy}","received_events_url":"https://api.github.com/users/jjcarstens/received_events","type":"User","site_admin":false},"body":"💯 Fantastic 🎉 ","created_at":"2018-11-01T13:59:04Z","updated_at":"2018-11-01T13:59:04Z","html_url":"https://github.com/mmmries/gnat/pull/79#discussion_r230050176","pull_request_url":"https://api.github.com/repos/mmmries/gnat/pulls/79","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mmmries/gnat/pulls/comments/230050176"},"html":{"href":"https://github.com/mmmries/gnat/pull/79#discussion_r230050176"},"pull_request":{"href":"https://api.github.com/repos/mmmries/gnat/pulls/79"}},"in_reply_to_id":229927413},"pull_request":{"url":"https://api.github.com/repos/mmmries/gnat/pulls/79","id":227498894,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3NDk4ODk0","html_url":"https://github.com/mmmries/gnat/pull/79","diff_url":"https://github.com/mmmries/gnat/pull/79.diff","patch_url":"https://github.com/mmmries/gnat/pull/79.patch","issue_url":"https://api.github.com/repos/mmmries/gnat/issues/79","number":79,"state":"open","locked":false,"title":"add telemetry to the project","user":{"login":"mmmries","id":80008,"node_id":"MDQ6VXNlcjgwMDA4","avatar_url":"https://avatars3.githubusercontent.com/u/80008?v=4","gravatar_id":"","url":"https://api.github.com/users/mmmries","html_url":"https://github.com/mmmries","followers_url":"https://api.github.com/users/mmmries/followers","following_url":"https://api.github.com/users/mmmries/following{/other_user}","gists_url":"https://api.github.com/users/mmmries/gists{/gist_id}","starred_url":"https://api.github.com/users/mmmries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmmries/subscriptions","organizations_url":"https://api.github.com/users/mmmries/orgs","repos_url":"https://api.github.com/users/mmmries/repos","events_url":"https://api.github.com/users/mmmries/events{/privacy}","received_events_url":"https://api.github.com/users/mmmries/received_events","type":"User","site_admin":false},"body":"@entone this is an alternative to you wrapping the `gnat` library. It should allow you to run something like:\r\n\r\n* `Telemetry.attach(\"record_pubs\", [:gnat, :pub], Publish, :instrument, nil)`\r\n* `Telemetry.attach(\"record_subs\", [:gnat, :sub], Subscription, :instrument, nil)`\r\n* `Telemetry.attach(\"record_requests\", [:gnat, :request], Request, :instrument, nil)`\r\n* `Telemetry.attach(\"record_messages\", [:gnat, :message_received], Message, :instrument, nil)`\r\n* `Telemetry.attach(\"record_unsubs\", [:gnat, :unsub], Unsubscribe, :instrument, nil)`\r\n\r\nWould that give you all the instrumentation you need? Each of the events have metadata about the `topic` except for the `[:gnat, :unsub]` event because we only have the `sid`.  I also ran the benchmarks script before and after these changes and there was no significant differences.\r\n","created_at":"2018-11-01T02:59:49Z","updated_at":"2018-11-01T13:59:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68a3ddda70ed12cff7d1edc94ec13c9dc84d5b80","assignee":null,"assignees":[],"requested_reviewers":[{"login":"newellista","id":50487,"node_id":"MDQ6VXNlcjUwNDg3","avatar_url":"https://avatars3.githubusercontent.com/u/50487?v=4","gravatar_id":"","url":"https://api.github.com/users/newellista","html_url":"https://github.com/newellista","followers_url":"https://api.github.com/users/newellista/followers","following_url":"https://api.github.com/users/newellista/following{/other_user}","gists_url":"https://api.github.com/users/newellista/gists{/gist_id}","starred_url":"https://api.github.com/users/newellista/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newellista/subscriptions","organizations_url":"https://api.github.com/users/newellista/orgs","repos_url":"https://api.github.com/users/newellista/repos","events_url":"https://api.github.com/users/newellista/events{/privacy}","received_events_url":"https://api.github.com/users/newellista/received_events","type":"User","site_admin":false},{"login":"film42","id":1043908,"node_id":"MDQ6VXNlcjEwNDM5MDg=","avatar_url":"https://avatars2.githubusercontent.com/u/1043908?v=4","gravatar_id":"","url":"https://api.github.com/users/film42","html_url":"https://github.com/film42","followers_url":"https://api.github.com/users/film42/followers","following_url":"https://api.github.com/users/film42/following{/other_user}","gists_url":"https://api.github.com/users/film42/gists{/gist_id}","starred_url":"https://api.github.com/users/film42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/film42/subscriptions","organizations_url":"https://api.github.com/users/film42/orgs","repos_url":"https://api.github.com/users/film42/repos","events_url":"https://api.github.com/users/film42/events{/privacy}","received_events_url":"https://api.github.com/users/film42/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mmmries/gnat/pulls/79/commits","review_comments_url":"https://api.github.com/repos/mmmries/gnat/pulls/79/comments","review_comment_url":"https://api.github.com/repos/mmmries/gnat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mmmries/gnat/issues/79/comments","statuses_url":"https://api.github.com/repos/mmmries/gnat/statuses/3dcac8ffc08b3ab2bfff8e3cdb434063dfa243e6","head":{"label":"mmmries:telemetry","ref":"telemetry","sha":"3dcac8ffc08b3ab2bfff8e3cdb434063dfa243e6","user":{"login":"mmmries","id":80008,"node_id":"MDQ6VXNlcjgwMDA4","avatar_url":"https://avatars3.githubusercontent.com/u/80008?v=4","gravatar_id":"","url":"https://api.github.com/users/mmmries","html_url":"https://github.com/mmmries","followers_url":"https://api.github.com/users/mmmries/followers","following_url":"https://api.github.com/users/mmmries/following{/other_user}","gists_url":"https://api.github.com/users/mmmries/gists{/gist_id}","starred_url":"https://api.github.com/users/mmmries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmmries/subscriptions","organizations_url":"https://api.github.com/users/mmmries/orgs","repos_url":"https://api.github.com/users/mmmries/repos","events_url":"https://api.github.com/users/mmmries/events{/privacy}","received_events_url":"https://api.github.com/users/mmmries/received_events","type":"User","site_admin":false},"repo":{"id":85129417,"node_id":"MDEwOlJlcG9zaXRvcnk4NTEyOTQxNw==","name":"gnat","full_name":"mmmries/gnat","private":false,"owner":{"login":"mmmries","id":80008,"node_id":"MDQ6VXNlcjgwMDA4","avatar_url":"https://avatars3.githubusercontent.com/u/80008?v=4","gravatar_id":"","url":"https://api.github.com/users/mmmries","html_url":"https://github.com/mmmries","followers_url":"https://api.github.com/users/mmmries/followers","following_url":"https://api.github.com/users/mmmries/following{/other_user}","gists_url":"https://api.github.com/users/mmmries/gists{/gist_id}","starred_url":"https://api.github.com/users/mmmries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmmries/subscriptions","organizations_url":"https://api.github.com/users/mmmries/orgs","repos_url":"https://api.github.com/users/mmmries/repos","events_url":"https://api.github.com/users/mmmries/events{/privacy}","received_events_url":"https://api.github.com/users/mmmries/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mmmries/gnat","description":"A nats client for elixir","fork":false,"url":"https://api.github.com/repos/mmmries/gnat","forks_url":"https://api.github.com/repos/mmmries/gnat/forks","keys_url":"https://api.github.com/repos/mmmries/gnat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mmmries/gnat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mmmries/gnat/teams","hooks_url":"https://api.github.com/repos/mmmries/gnat/hooks","issue_events_url":"https://api.github.com/repos/mmmries/gnat/issues/events{/number}","events_url":"https://api.github.com/repos/mmmries/gnat/events","assignees_url":"https://api.github.com/repos/mmmries/gnat/assignees{/user}","branches_url":"https://api.github.com/repos/mmmries/gnat/branches{/branch}","tags_url":"https://api.github.com/repos/mmmries/gnat/tags","blobs_url":"https://api.github.com/repos/mmmries/gnat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mmmries/gnat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mmmries/gnat/git/refs{/sha}","trees_url":"https://api.github.com/repos/mmmries/gnat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mmmries/gnat/statuses/{sha}","languages_url":"https://api.github.com/repos/mmmries/gnat/languages","stargazers_url":"https://api.github.com/repos/mmmries/gnat/stargazers","contributors_url":"https://api.github.com/repos/mmmries/gnat/contributors","subscribers_url":"https://api.github.com/repos/mmmries/gnat/subscribers","subscription_url":"https://api.github.com/repos/mmmries/gnat/subscription","commits_url":"https://api.github.com/repos/mmmries/gnat/commits{/sha}","git_commits_url":"https://api.github.com/repos/mmmries/gnat/git/commits{/sha}","comments_url":"https://api.github.com/repos/mmmries/gnat/comments{/number}","issue_comment_url":"https://api.github.com/repos/mmmries/gnat/issues/comments{/number}","contents_url":"https://api.github.com/repos/mmmries/gnat/contents/{+path}","compare_url":"https://api.github.com/repos/mmmries/gnat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mmmries/gnat/merges","archive_url":"https://api.github.com/repos/mmmries/gnat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mmmries/gnat/downloads","issues_url":"https://api.github.com/repos/mmmries/gnat/issues{/number}","pulls_url":"https://api.github.com/repos/mmmries/gnat/pulls{/number}","milestones_url":"https://api.github.com/repos/mmmries/gnat/milestones{/number}","notifications_url":"https://api.github.com/repos/mmmries/gnat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mmmries/gnat/labels{/name}","releases_url":"https://api.github.com/repos/mmmries/gnat/releases{/id}","deployments_url":"https://api.github.com/repos/mmmries/gnat/deployments","created_at":"2017-03-15T23:00:41Z","updated_at":"2018-10-16T14:21:10Z","pushed_at":"2018-11-01T02:59:49Z","git_url":"git://github.com/mmmries/gnat.git","ssh_url":"git@github.com:mmmries/gnat.git","clone_url":"https://github.com/mmmries/gnat.git","svn_url":"https://github.com/mmmries/gnat","homepage":null,"size":227,"stargazers_count":15,"watchers_count":15,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":6,"open_issues":18,"watchers":15,"default_branch":"master"}},"base":{"label":"mmmries:master","ref":"master","sha":"798ebf775e4651d9780d222f38529de5159d3d53","user":{"login":"mmmries","id":80008,"node_id":"MDQ6VXNlcjgwMDA4","avatar_url":"https://avatars3.githubusercontent.com/u/80008?v=4","gravatar_id":"","url":"https://api.github.com/users/mmmries","html_url":"https://github.com/mmmries","followers_url":"https://api.github.com/users/mmmries/followers","following_url":"https://api.github.com/users/mmmries/following{/other_user}","gists_url":"https://api.github.com/users/mmmries/gists{/gist_id}","starred_url":"https://api.github.com/users/mmmries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmmries/subscriptions","organizations_url":"https://api.github.com/users/mmmries/orgs","repos_url":"https://api.github.com/users/mmmries/repos","events_url":"https://api.github.com/users/mmmries/events{/privacy}","received_events_url":"https://api.github.com/users/mmmries/received_events","type":"User","site_admin":false},"repo":{"id":85129417,"node_id":"MDEwOlJlcG9zaXRvcnk4NTEyOTQxNw==","name":"gnat","full_name":"mmmries/gnat","private":false,"owner":{"login":"mmmries","id":80008,"node_id":"MDQ6VXNlcjgwMDA4","avatar_url":"https://avatars3.githubusercontent.com/u/80008?v=4","gravatar_id":"","url":"https://api.github.com/users/mmmries","html_url":"https://github.com/mmmries","followers_url":"https://api.github.com/users/mmmries/followers","following_url":"https://api.github.com/users/mmmries/following{/other_user}","gists_url":"https://api.github.com/users/mmmries/gists{/gist_id}","starred_url":"https://api.github.com/users/mmmries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmmries/subscriptions","organizations_url":"https://api.github.com/users/mmmries/orgs","repos_url":"https://api.github.com/users/mmmries/repos","events_url":"https://api.github.com/users/mmmries/events{/privacy}","received_events_url":"https://api.github.com/users/mmmries/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mmmries/gnat","description":"A nats client for elixir","fork":false,"url":"https://api.github.com/repos/mmmries/gnat","forks_url":"https://api.github.com/repos/mmmries/gnat/forks","keys_url":"https://api.github.com/repos/mmmries/gnat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mmmries/gnat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mmmries/gnat/teams","hooks_url":"https://api.github.com/repos/mmmries/gnat/hooks","issue_events_url":"https://api.github.com/repos/mmmries/gnat/issues/events{/number}","events_url":"https://api.github.com/repos/mmmries/gnat/events","assignees_url":"https://api.github.com/repos/mmmries/gnat/assignees{/user}","branches_url":"https://api.github.com/repos/mmmries/gnat/branches{/branch}","tags_url":"https://api.github.com/repos/mmmries/gnat/tags","blobs_url":"https://api.github.com/repos/mmmries/gnat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mmmries/gnat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mmmries/gnat/git/refs{/sha}","trees_url":"https://api.github.com/repos/mmmries/gnat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mmmries/gnat/statuses/{sha}","languages_url":"https://api.github.com/repos/mmmries/gnat/languages","stargazers_url":"https://api.github.com/repos/mmmries/gnat/stargazers","contributors_url":"https://api.github.com/repos/mmmries/gnat/contributors","subscribers_url":"https://api.github.com/repos/mmmries/gnat/subscribers","subscription_url":"https://api.github.com/repos/mmmries/gnat/subscription","commits_url":"https://api.github.com/repos/mmmries/gnat/commits{/sha}","git_commits_url":"https://api.github.com/repos/mmmries/gnat/git/commits{/sha}","comments_url":"https://api.github.com/repos/mmmries/gnat/comments{/number}","issue_comment_url":"https://api.github.com/repos/mmmries/gnat/issues/comments{/number}","contents_url":"https://api.github.com/repos/mmmries/gnat/contents/{+path}","compare_url":"https://api.github.com/repos/mmmries/gnat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mmmries/gnat/merges","archive_url":"https://api.github.com/repos/mmmries/gnat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mmmries/gnat/downloads","issues_url":"https://api.github.com/repos/mmmries/gnat/issues{/number}","pulls_url":"https://api.github.com/repos/mmmries/gnat/pulls{/number}","milestones_url":"https://api.github.com/repos/mmmries/gnat/milestones{/number}","notifications_url":"https://api.github.com/repos/mmmries/gnat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mmmries/gnat/labels{/name}","releases_url":"https://api.github.com/repos/mmmries/gnat/releases{/id}","deployments_url":"https://api.github.com/repos/mmmries/gnat/deployments","created_at":"2017-03-15T23:00:41Z","updated_at":"2018-10-16T14:21:10Z","pushed_at":"2018-11-01T02:59:49Z","git_url":"git://github.com/mmmries/gnat.git","ssh_url":"git@github.com:mmmries/gnat.git","clone_url":"https://github.com/mmmries/gnat.git","svn_url":"https://github.com/mmmries/gnat","homepage":null,"size":227,"stargazers_count":15,"watchers_count":15,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":6,"open_issues":18,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mmmries/gnat/pulls/79"},"html":{"href":"https://github.com/mmmries/gnat/pull/79"},"issue":{"href":"https://api.github.com/repos/mmmries/gnat/issues/79"},"comments":{"href":"https://api.github.com/repos/mmmries/gnat/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/mmmries/gnat/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/mmmries/gnat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mmmries/gnat/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/mmmries/gnat/statuses/3dcac8ffc08b3ab2bfff8e3cdb434063dfa243e6"}},"author_association":"OWNER"}}
{"actor":{"display_login":"jjcarstens"}}