{"action":"created","comment":{"url":"https://api.github.com/repos/travelping/exometer_influxdb/pulls/comments/43669645","id":43669645,"diff_hunk":"@@ -72,12 +74,12 @@ exometer_init(Opts) ->\n                       exometer_report:extra(),\n                       value(),\n                       state()) -> callback_result().\n-exometer_report(Metric, DataPoint, Extra, Value, #state{tags = Tags} = State) ->\n-    ExtraTags = case Extra of undefined -> []; _ -> Extra end,\n-    Packet = make_packet(Metric, merge_tags(Tags, ExtraTags), \n-                         maps:from_list([{DataPoint, Value}]),\n-                         State#state.timestamping,\n-                         State#state.precision),\n+exometer_report(Metric, DataPoint, _Extra, Value, \n+                #state{tags = DefaultTags, metrics = Metrics} = State) ->\n+    {MetricName, SubscriberTags} = maps:get(Metric, Metrics),\n+    Tags = merge_tags(DefaultTags, SubscriberTags),","path":"src/exometer_report_influxdb.erl","position":29,"original_position":29,"commit_id":"8166d25ef4d8efff218d33c1b5ec8a3f5757a818","original_commit_id":"8166d25ef4d8efff218d33c1b5ec8a3f5757a818","user":{"login":"surik","id":708165,"avatar_url":"https://avatars.githubusercontent.com/u/708165?v=3","gravatar_id":"","url":"https://api.github.com/users/surik","html_url":"https://github.com/surik","followers_url":"https://api.github.com/users/surik/followers","following_url":"https://api.github.com/users/surik/following{/other_user}","gists_url":"https://api.github.com/users/surik/gists{/gist_id}","starred_url":"https://api.github.com/users/surik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/surik/subscriptions","organizations_url":"https://api.github.com/users/surik/orgs","repos_url":"https://api.github.com/users/surik/repos","events_url":"https://api.github.com/users/surik/events{/privacy}","received_events_url":"https://api.github.com/users/surik/received_events","type":"User","site_admin":false},"body":"Can we merge DefaultTags with SubscriberTags in exometer_subscribe function?","created_at":"2015-11-02T19:27:20Z","updated_at":"2015-11-02T19:27:20Z","html_url":"https://github.com/travelping/exometer_influxdb/pull/5#discussion_r43669645","pull_request_url":"https://api.github.com/repos/travelping/exometer_influxdb/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/travelping/exometer_influxdb/pulls/comments/43669645"},"html":{"href":"https://github.com/travelping/exometer_influxdb/pull/5#discussion_r43669645"},"pull_request":{"href":"https://api.github.com/repos/travelping/exometer_influxdb/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/travelping/exometer_influxdb/pulls/5","id":49438475,"html_url":"https://github.com/travelping/exometer_influxdb/pull/5","diff_url":"https://github.com/travelping/exometer_influxdb/pull/5.diff","patch_url":"https://github.com/travelping/exometer_influxdb/pull/5.patch","issue_url":"https://api.github.com/repos/travelping/exometer_influxdb/issues/5","number":5,"state":"open","locked":false,"title":"Added feature to add remove elements of the exometer metric","user":{"login":"GalaxyGorilla","id":5798605,"avatar_url":"https://avatars.githubusercontent.com/u/5798605?v=3","gravatar_id":"","url":"https://api.github.com/users/GalaxyGorilla","html_url":"https://github.com/GalaxyGorilla","followers_url":"https://api.github.com/users/GalaxyGorilla/followers","following_url":"https://api.github.com/users/GalaxyGorilla/following{/other_user}","gists_url":"https://api.github.com/users/GalaxyGorilla/gists{/gist_id}","starred_url":"https://api.github.com/users/GalaxyGorilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GalaxyGorilla/subscriptions","organizations_url":"https://api.github.com/users/GalaxyGorilla/orgs","repos_url":"https://api.github.com/users/GalaxyGorilla/repos","events_url":"https://api.github.com/users/GalaxyGorilla/events{/privacy}","received_events_url":"https://api.github.com/users/GalaxyGorilla/received_events","type":"User","site_admin":false},"body":"id and to add them as tag in the subscription call. Closes #3.\r\n\r\nElements of the exometer id can be removed with the 'from_name'\r\nkeyword by using its name or position in the id. Hence the call\r\n\r\nexometer_report:subscribe(Reporter,\r\n                          [eradius, '127.0.0.1:8111', requests],\r\n                          value, 500,\r\n                          [{nas, {from_name, 2}}],\r\n                          true).\r\n\r\nwill use the metrics name 'eradius_requests' and the tag pair\r\n'{nas, '127.0.0.1:8111'}'. This works identically by using\r\n'[{nas, {from_name, '127.0.0.1:8111'}}]'.","created_at":"2015-11-02T14:38:56Z","updated_at":"2015-11-02T19:27:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7ad691db88c0dafbd345a9f820bfacec158ebd4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/travelping/exometer_influxdb/pulls/5/commits","review_comments_url":"https://api.github.com/repos/travelping/exometer_influxdb/pulls/5/comments","review_comment_url":"https://api.github.com/repos/travelping/exometer_influxdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/travelping/exometer_influxdb/issues/5/comments","statuses_url":"https://api.github.com/repos/travelping/exometer_influxdb/statuses/8166d25ef4d8efff218d33c1b5ec8a3f5757a818","head":{"label":"GalaxyGorilla:tag_fix_rebased","ref":"tag_fix_rebased","sha":"8166d25ef4d8efff218d33c1b5ec8a3f5757a818","user":{"login":"GalaxyGorilla","id":5798605,"avatar_url":"https://avatars.githubusercontent.com/u/5798605?v=3","gravatar_id":"","url":"https://api.github.com/users/GalaxyGorilla","html_url":"https://github.com/GalaxyGorilla","followers_url":"https://api.github.com/users/GalaxyGorilla/followers","following_url":"https://api.github.com/users/GalaxyGorilla/following{/other_user}","gists_url":"https://api.github.com/users/GalaxyGorilla/gists{/gist_id}","starred_url":"https://api.github.com/users/GalaxyGorilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GalaxyGorilla/subscriptions","organizations_url":"https://api.github.com/users/GalaxyGorilla/orgs","repos_url":"https://api.github.com/users/GalaxyGorilla/repos","events_url":"https://api.github.com/users/GalaxyGorilla/events{/privacy}","received_events_url":"https://api.github.com/users/GalaxyGorilla/received_events","type":"User","site_admin":false},"repo":{"id":45035690,"name":"exometer_influxdb","full_name":"GalaxyGorilla/exometer_influxdb","owner":{"login":"GalaxyGorilla","id":5798605,"avatar_url":"https://avatars.githubusercontent.com/u/5798605?v=3","gravatar_id":"","url":"https://api.github.com/users/GalaxyGorilla","html_url":"https://github.com/GalaxyGorilla","followers_url":"https://api.github.com/users/GalaxyGorilla/followers","following_url":"https://api.github.com/users/GalaxyGorilla/following{/other_user}","gists_url":"https://api.github.com/users/GalaxyGorilla/gists{/gist_id}","starred_url":"https://api.github.com/users/GalaxyGorilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GalaxyGorilla/subscriptions","organizations_url":"https://api.github.com/users/GalaxyGorilla/orgs","repos_url":"https://api.github.com/users/GalaxyGorilla/repos","events_url":"https://api.github.com/users/GalaxyGorilla/events{/privacy}","received_events_url":"https://api.github.com/users/GalaxyGorilla/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GalaxyGorilla/exometer_influxdb","description":" Exometer reporter for InfluxDB","fork":true,"url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb","forks_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/forks","keys_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/teams","hooks_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/hooks","issue_events_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/issues/events{/number}","events_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/events","assignees_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/assignees{/user}","branches_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/branches{/branch}","tags_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/tags","blobs_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/statuses/{sha}","languages_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/languages","stargazers_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/stargazers","contributors_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/contributors","subscribers_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/subscribers","subscription_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/subscription","commits_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/contents/{+path}","compare_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/merges","archive_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/downloads","issues_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/issues{/number}","pulls_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/pulls{/number}","milestones_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/milestones{/number}","notifications_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/labels{/name}","releases_url":"https://api.github.com/repos/GalaxyGorilla/exometer_influxdb/releases{/id}","created_at":"2015-10-27T11:14:21Z","updated_at":"2015-10-27T11:14:22Z","pushed_at":"2015-11-02T14:52:29Z","git_url":"git://github.com/GalaxyGorilla/exometer_influxdb.git","ssh_url":"git@github.com:GalaxyGorilla/exometer_influxdb.git","clone_url":"https://github.com/GalaxyGorilla/exometer_influxdb.git","svn_url":"https://github.com/GalaxyGorilla/exometer_influxdb","homepage":null,"size":85,"stargazers_count":0,"watchers_count":0,"language":"Erlang","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"travelping:master","ref":"master","sha":"b425086ae4b6c04ffdc675ec10ec8198253b62eb","user":{"login":"travelping","id":364206,"avatar_url":"https://avatars.githubusercontent.com/u/364206?v=3","gravatar_id":"","url":"https://api.github.com/users/travelping","html_url":"https://github.com/travelping","followers_url":"https://api.github.com/users/travelping/followers","following_url":"https://api.github.com/users/travelping/following{/other_user}","gists_url":"https://api.github.com/users/travelping/gists{/gist_id}","starred_url":"https://api.github.com/users/travelping/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travelping/subscriptions","organizations_url":"https://api.github.com/users/travelping/orgs","repos_url":"https://api.github.com/users/travelping/repos","events_url":"https://api.github.com/users/travelping/events{/privacy}","received_events_url":"https://api.github.com/users/travelping/received_events","type":"Organization","site_admin":false},"repo":{"id":44677494,"name":"exometer_influxdb","full_name":"travelping/exometer_influxdb","owner":{"login":"travelping","id":364206,"avatar_url":"https://avatars.githubusercontent.com/u/364206?v=3","gravatar_id":"","url":"https://api.github.com/users/travelping","html_url":"https://github.com/travelping","followers_url":"https://api.github.com/users/travelping/followers","following_url":"https://api.github.com/users/travelping/following{/other_user}","gists_url":"https://api.github.com/users/travelping/gists{/gist_id}","starred_url":"https://api.github.com/users/travelping/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travelping/subscriptions","organizations_url":"https://api.github.com/users/travelping/orgs","repos_url":"https://api.github.com/users/travelping/repos","events_url":"https://api.github.com/users/travelping/events{/privacy}","received_events_url":"https://api.github.com/users/travelping/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/travelping/exometer_influxdb","description":" Exometer reporter for InfluxDB","fork":false,"url":"https://api.github.com/repos/travelping/exometer_influxdb","forks_url":"https://api.github.com/repos/travelping/exometer_influxdb/forks","keys_url":"https://api.github.com/repos/travelping/exometer_influxdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/travelping/exometer_influxdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/travelping/exometer_influxdb/teams","hooks_url":"https://api.github.com/repos/travelping/exometer_influxdb/hooks","issue_events_url":"https://api.github.com/repos/travelping/exometer_influxdb/issues/events{/number}","events_url":"https://api.github.com/repos/travelping/exometer_influxdb/events","assignees_url":"https://api.github.com/repos/travelping/exometer_influxdb/assignees{/user}","branches_url":"https://api.github.com/repos/travelping/exometer_influxdb/branches{/branch}","tags_url":"https://api.github.com/repos/travelping/exometer_influxdb/tags","blobs_url":"https://api.github.com/repos/travelping/exometer_influxdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/travelping/exometer_influxdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/travelping/exometer_influxdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/travelping/exometer_influxdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/travelping/exometer_influxdb/statuses/{sha}","languages_url":"https://api.github.com/repos/travelping/exometer_influxdb/languages","stargazers_url":"https://api.github.com/repos/travelping/exometer_influxdb/stargazers","contributors_url":"https://api.github.com/repos/travelping/exometer_influxdb/contributors","subscribers_url":"https://api.github.com/repos/travelping/exometer_influxdb/subscribers","subscription_url":"https://api.github.com/repos/travelping/exometer_influxdb/subscription","commits_url":"https://api.github.com/repos/travelping/exometer_influxdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/travelping/exometer_influxdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/travelping/exometer_influxdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/travelping/exometer_influxdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/travelping/exometer_influxdb/contents/{+path}","compare_url":"https://api.github.com/repos/travelping/exometer_influxdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/travelping/exometer_influxdb/merges","archive_url":"https://api.github.com/repos/travelping/exometer_influxdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/travelping/exometer_influxdb/downloads","issues_url":"https://api.github.com/repos/travelping/exometer_influxdb/issues{/number}","pulls_url":"https://api.github.com/repos/travelping/exometer_influxdb/pulls{/number}","milestones_url":"https://api.github.com/repos/travelping/exometer_influxdb/milestones{/number}","notifications_url":"https://api.github.com/repos/travelping/exometer_influxdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/travelping/exometer_influxdb/labels{/name}","releases_url":"https://api.github.com/repos/travelping/exometer_influxdb/releases{/id}","created_at":"2015-10-21T13:18:24Z","updated_at":"2015-10-25T03:14:07Z","pushed_at":"2015-11-02T14:52:30Z","git_url":"git://github.com/travelping/exometer_influxdb.git","ssh_url":"git@github.com:travelping/exometer_influxdb.git","clone_url":"https://github.com/travelping/exometer_influxdb.git","svn_url":"https://github.com/travelping/exometer_influxdb","homepage":null,"size":134,"stargazers_count":3,"watchers_count":3,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/travelping/exometer_influxdb/pulls/5"},"html":{"href":"https://github.com/travelping/exometer_influxdb/pull/5"},"issue":{"href":"https://api.github.com/repos/travelping/exometer_influxdb/issues/5"},"comments":{"href":"https://api.github.com/repos/travelping/exometer_influxdb/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/travelping/exometer_influxdb/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/travelping/exometer_influxdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/travelping/exometer_influxdb/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/travelping/exometer_influxdb/statuses/8166d25ef4d8efff218d33c1b5ec8a3f5757a818"}}}}