{"action":"created","comment":{"url":"https://api.github.com/repos/Day8/re-frame/pulls/comments/141224031","pull_request_review_id":65405173,"id":141224031,"diff_hunk":"@@ -123,7 +124,9 @@\n          (if (nil? handler-fn)\n            (do (trace/merge-trace! {:error true})\n                (console :error (str \"re-frame: no subscription handler registered for: \\\"\" query-id \"\\\". Returning a nil subscription.\")))\n-           (cache-and-return query [] (handler-fn app-db query)))))))\n+           (let [sub-reaction (handler-fn app-db query)]\n+             (do (trace/merge-trace! {:tags {:value (deref sub-reaction)}})","path":"src/re_frame/subs.cljc","position":14,"original_position":14,"commit_id":"d0f93ad626b035b3a0118a68664e5e4051204791","original_commit_id":"d0f93ad626b035b3a0118a68664e5e4051204791","user":{"login":"danielcompton","id":811954,"avatar_url":"https://avatars2.githubusercontent.com/u/811954?v=4","gravatar_id":"","url":"https://api.github.com/users/danielcompton","html_url":"https://github.com/danielcompton","followers_url":"https://api.github.com/users/danielcompton/followers","following_url":"https://api.github.com/users/danielcompton/following{/other_user}","gists_url":"https://api.github.com/users/danielcompton/gists{/gist_id}","starred_url":"https://api.github.com/users/danielcompton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielcompton/subscriptions","organizations_url":"https://api.github.com/users/danielcompton/orgs","repos_url":"https://api.github.com/users/danielcompton/repos","events_url":"https://api.github.com/users/danielcompton/events{/privacy}","received_events_url":"https://api.github.com/users/danielcompton/received_events","type":"User","site_admin":false},"body":"Hmm, I just realised that this will cause the subscription to run and be calculated immediately, rather than returning a reaction. I think it would be better to only capture the subscription value in `:sub/run`, not `:sub/create` as this could lead to (or mask) subtle bugs. Concretely, can you pull out the trace here and on line 116? We'll keep it in on the :sub/run. Sorry for not picking this up earlier.","created_at":"2017-09-27T01:11:03Z","updated_at":"2017-09-27T01:11:07Z","html_url":"https://github.com/Day8/re-frame/pull/418#discussion_r141224031","pull_request_url":"https://api.github.com/repos/Day8/re-frame/pulls/418","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Day8/re-frame/pulls/comments/141224031"},"html":{"href":"https://github.com/Day8/re-frame/pull/418#discussion_r141224031"},"pull_request":{"href":"https://api.github.com/repos/Day8/re-frame/pulls/418"}}},"pull_request":{"url":"https://api.github.com/repos/Day8/re-frame/pulls/418","id":142882651,"html_url":"https://github.com/Day8/re-frame/pull/418","diff_url":"https://github.com/Day8/re-frame/pull/418.diff","patch_url":"https://github.com/Day8/re-frame/pull/418.patch","issue_url":"https://api.github.com/repos/Day8/re-frame/issues/418","number":418,"state":"open","locked":false,"title":"Add subscription values to traces","user":{"login":"saskali","id":10868131,"avatar_url":"https://avatars2.githubusercontent.com/u/10868131?v=4","gravatar_id":"","url":"https://api.github.com/users/saskali","html_url":"https://github.com/saskali","followers_url":"https://api.github.com/users/saskali/followers","following_url":"https://api.github.com/users/saskali/following{/other_user}","gists_url":"https://api.github.com/users/saskali/gists{/gist_id}","starred_url":"https://api.github.com/users/saskali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saskali/subscriptions","organizations_url":"https://api.github.com/users/saskali/orgs","repos_url":"https://api.github.com/users/saskali/repos","events_url":"https://api.github.com/users/saskali/events{/privacy}","received_events_url":"https://api.github.com/users/saskali/received_events","type":"User","site_admin":false},"body":"This PR adds subscription values to re-frame's traces. The value for `:sub/create` and `:sub-run` is being added to the associated tags of each subscription trace. \r\n\r\n- fixes day8/re-frame-trace#3","created_at":"2017-09-25T13:28:47Z","updated_at":"2017-09-27T01:11:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3fd1006d125e708257766c2fb7c711613317e5a5","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Day8/re-frame/pulls/418/commits","review_comments_url":"https://api.github.com/repos/Day8/re-frame/pulls/418/comments","review_comment_url":"https://api.github.com/repos/Day8/re-frame/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Day8/re-frame/issues/418/comments","statuses_url":"https://api.github.com/repos/Day8/re-frame/statuses/d0f93ad626b035b3a0118a68664e5e4051204791","head":{"label":"saskali:traces-add-sub-values","ref":"traces-add-sub-values","sha":"d0f93ad626b035b3a0118a68664e5e4051204791","user":{"login":"saskali","id":10868131,"avatar_url":"https://avatars2.githubusercontent.com/u/10868131?v=4","gravatar_id":"","url":"https://api.github.com/users/saskali","html_url":"https://github.com/saskali","followers_url":"https://api.github.com/users/saskali/followers","following_url":"https://api.github.com/users/saskali/following{/other_user}","gists_url":"https://api.github.com/users/saskali/gists{/gist_id}","starred_url":"https://api.github.com/users/saskali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saskali/subscriptions","organizations_url":"https://api.github.com/users/saskali/orgs","repos_url":"https://api.github.com/users/saskali/repos","events_url":"https://api.github.com/users/saskali/events{/privacy}","received_events_url":"https://api.github.com/users/saskali/received_events","type":"User","site_admin":false},"repo":{"id":84316091,"name":"re-frame","full_name":"saskali/re-frame","owner":{"login":"saskali","id":10868131,"avatar_url":"https://avatars2.githubusercontent.com/u/10868131?v=4","gravatar_id":"","url":"https://api.github.com/users/saskali","html_url":"https://github.com/saskali","followers_url":"https://api.github.com/users/saskali/followers","following_url":"https://api.github.com/users/saskali/following{/other_user}","gists_url":"https://api.github.com/users/saskali/gists{/gist_id}","starred_url":"https://api.github.com/users/saskali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saskali/subscriptions","organizations_url":"https://api.github.com/users/saskali/orgs","repos_url":"https://api.github.com/users/saskali/repos","events_url":"https://api.github.com/users/saskali/events{/privacy}","received_events_url":"https://api.github.com/users/saskali/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/saskali/re-frame","description":"A Reagent Framework For Writing SPAs, in Clojurescript.","fork":true,"url":"https://api.github.com/repos/saskali/re-frame","forks_url":"https://api.github.com/repos/saskali/re-frame/forks","keys_url":"https://api.github.com/repos/saskali/re-frame/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saskali/re-frame/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saskali/re-frame/teams","hooks_url":"https://api.github.com/repos/saskali/re-frame/hooks","issue_events_url":"https://api.github.com/repos/saskali/re-frame/issues/events{/number}","events_url":"https://api.github.com/repos/saskali/re-frame/events","assignees_url":"https://api.github.com/repos/saskali/re-frame/assignees{/user}","branches_url":"https://api.github.com/repos/saskali/re-frame/branches{/branch}","tags_url":"https://api.github.com/repos/saskali/re-frame/tags","blobs_url":"https://api.github.com/repos/saskali/re-frame/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saskali/re-frame/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saskali/re-frame/git/refs{/sha}","trees_url":"https://api.github.com/repos/saskali/re-frame/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saskali/re-frame/statuses/{sha}","languages_url":"https://api.github.com/repos/saskali/re-frame/languages","stargazers_url":"https://api.github.com/repos/saskali/re-frame/stargazers","contributors_url":"https://api.github.com/repos/saskali/re-frame/contributors","subscribers_url":"https://api.github.com/repos/saskali/re-frame/subscribers","subscription_url":"https://api.github.com/repos/saskali/re-frame/subscription","commits_url":"https://api.github.com/repos/saskali/re-frame/commits{/sha}","git_commits_url":"https://api.github.com/repos/saskali/re-frame/git/commits{/sha}","comments_url":"https://api.github.com/repos/saskali/re-frame/comments{/number}","issue_comment_url":"https://api.github.com/repos/saskali/re-frame/issues/comments{/number}","contents_url":"https://api.github.com/repos/saskali/re-frame/contents/{+path}","compare_url":"https://api.github.com/repos/saskali/re-frame/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saskali/re-frame/merges","archive_url":"https://api.github.com/repos/saskali/re-frame/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saskali/re-frame/downloads","issues_url":"https://api.github.com/repos/saskali/re-frame/issues{/number}","pulls_url":"https://api.github.com/repos/saskali/re-frame/pulls{/number}","milestones_url":"https://api.github.com/repos/saskali/re-frame/milestones{/number}","notifications_url":"https://api.github.com/repos/saskali/re-frame/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saskali/re-frame/labels{/name}","releases_url":"https://api.github.com/repos/saskali/re-frame/releases{/id}","deployments_url":"https://api.github.com/repos/saskali/re-frame/deployments","created_at":"2017-03-08T12:07:28Z","updated_at":"2017-03-08T12:07:30Z","pushed_at":"2017-09-26T06:25:49Z","git_url":"git://github.com/saskali/re-frame.git","ssh_url":"git@github.com:saskali/re-frame.git","clone_url":"https://github.com/saskali/re-frame.git","svn_url":"https://github.com/saskali/re-frame","homepage":"","size":4089,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Day8:master","ref":"master","sha":"b7be7864a4d65b2eacafd18e4d9971490b8ddd37","user":{"login":"Day8","id":3033386,"avatar_url":"https://avatars0.githubusercontent.com/u/3033386?v=4","gravatar_id":"","url":"https://api.github.com/users/Day8","html_url":"https://github.com/Day8","followers_url":"https://api.github.com/users/Day8/followers","following_url":"https://api.github.com/users/Day8/following{/other_user}","gists_url":"https://api.github.com/users/Day8/gists{/gist_id}","starred_url":"https://api.github.com/users/Day8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Day8/subscriptions","organizations_url":"https://api.github.com/users/Day8/orgs","repos_url":"https://api.github.com/users/Day8/repos","events_url":"https://api.github.com/users/Day8/events{/privacy}","received_events_url":"https://api.github.com/users/Day8/received_events","type":"Organization","site_admin":false},"repo":{"id":27587921,"name":"re-frame","full_name":"Day8/re-frame","owner":{"login":"Day8","id":3033386,"avatar_url":"https://avatars0.githubusercontent.com/u/3033386?v=4","gravatar_id":"","url":"https://api.github.com/users/Day8","html_url":"https://github.com/Day8","followers_url":"https://api.github.com/users/Day8/followers","following_url":"https://api.github.com/users/Day8/following{/other_user}","gists_url":"https://api.github.com/users/Day8/gists{/gist_id}","starred_url":"https://api.github.com/users/Day8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Day8/subscriptions","organizations_url":"https://api.github.com/users/Day8/orgs","repos_url":"https://api.github.com/users/Day8/repos","events_url":"https://api.github.com/users/Day8/events{/privacy}","received_events_url":"https://api.github.com/users/Day8/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Day8/re-frame","description":"A Reagent Framework For Writing SPAs, in Clojurescript.","fork":false,"url":"https://api.github.com/repos/Day8/re-frame","forks_url":"https://api.github.com/repos/Day8/re-frame/forks","keys_url":"https://api.github.com/repos/Day8/re-frame/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Day8/re-frame/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Day8/re-frame/teams","hooks_url":"https://api.github.com/repos/Day8/re-frame/hooks","issue_events_url":"https://api.github.com/repos/Day8/re-frame/issues/events{/number}","events_url":"https://api.github.com/repos/Day8/re-frame/events","assignees_url":"https://api.github.com/repos/Day8/re-frame/assignees{/user}","branches_url":"https://api.github.com/repos/Day8/re-frame/branches{/branch}","tags_url":"https://api.github.com/repos/Day8/re-frame/tags","blobs_url":"https://api.github.com/repos/Day8/re-frame/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Day8/re-frame/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Day8/re-frame/git/refs{/sha}","trees_url":"https://api.github.com/repos/Day8/re-frame/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Day8/re-frame/statuses/{sha}","languages_url":"https://api.github.com/repos/Day8/re-frame/languages","stargazers_url":"https://api.github.com/repos/Day8/re-frame/stargazers","contributors_url":"https://api.github.com/repos/Day8/re-frame/contributors","subscribers_url":"https://api.github.com/repos/Day8/re-frame/subscribers","subscription_url":"https://api.github.com/repos/Day8/re-frame/subscription","commits_url":"https://api.github.com/repos/Day8/re-frame/commits{/sha}","git_commits_url":"https://api.github.com/repos/Day8/re-frame/git/commits{/sha}","comments_url":"https://api.github.com/repos/Day8/re-frame/comments{/number}","issue_comment_url":"https://api.github.com/repos/Day8/re-frame/issues/comments{/number}","contents_url":"https://api.github.com/repos/Day8/re-frame/contents/{+path}","compare_url":"https://api.github.com/repos/Day8/re-frame/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Day8/re-frame/merges","archive_url":"https://api.github.com/repos/Day8/re-frame/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Day8/re-frame/downloads","issues_url":"https://api.github.com/repos/Day8/re-frame/issues{/number}","pulls_url":"https://api.github.com/repos/Day8/re-frame/pulls{/number}","milestones_url":"https://api.github.com/repos/Day8/re-frame/milestones{/number}","notifications_url":"https://api.github.com/repos/Day8/re-frame/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Day8/re-frame/labels{/name}","releases_url":"https://api.github.com/repos/Day8/re-frame/releases{/id}","deployments_url":"https://api.github.com/repos/Day8/re-frame/deployments","created_at":"2014-12-05T11:08:39Z","updated_at":"2017-09-27T00:33:41Z","pushed_at":"2017-09-27T00:03:53Z","git_url":"git://github.com/Day8/re-frame.git","ssh_url":"git@github.com:Day8/re-frame.git","clone_url":"https://github.com/Day8/re-frame.git","svn_url":"https://github.com/Day8/re-frame","homepage":"","size":4152,"stargazers_count":2722,"watchers_count":2722,"language":"Clojure","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":290,"mirror_url":null,"open_issues_count":25,"forks":290,"open_issues":25,"watchers":2722,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Day8/re-frame/pulls/418"},"html":{"href":"https://github.com/Day8/re-frame/pull/418"},"issue":{"href":"https://api.github.com/repos/Day8/re-frame/issues/418"},"comments":{"href":"https://api.github.com/repos/Day8/re-frame/issues/418/comments"},"review_comments":{"href":"https://api.github.com/repos/Day8/re-frame/pulls/418/comments"},"review_comment":{"href":"https://api.github.com/repos/Day8/re-frame/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Day8/re-frame/pulls/418/commits"},"statuses":{"href":"https://api.github.com/repos/Day8/re-frame/statuses/d0f93ad626b035b3a0118a68664e5e4051204791"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"danielcompton"}}