{"action":"created","comment":{"url":"https://api.github.com/repos/socialpoint-labs/bsk/pulls/comments/206587548","pull_request_review_id":142027741,"id":206587548,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjU4NzU0OA==","diff_hunk":"@@ -0,0 +1,37 @@\n+package metrics\n+\n+// taggedMetrics is a metrics publisher decorator that add predefined tags to all metrics\n+type taggedMetrics struct {\n+\tMetrics\n+\ttags []Tag\n+}\n+\n+// NewTaggedMetrics returns a new metrics publisher with predefined tags for all the metrics\n+func NewTaggedMetrics(m Metrics, tags ...Tag) Metrics {\n+\treturn &taggedMetrics{Metrics: m, tags: tags}\n+}\n+\n+// Provide a Counter with the given name and tags\n+func (m *taggedMetrics) Counter(name string, tags ...Tag) Counter {\n+\treturn m.Metrics.Counter(name, m.tags...).WithTags(tags...)","path":"metrics/tagged.go","position":16,"original_position":16,"commit_id":"d61f0721e7d55de1e161c512a620c2a56d9f72d5","original_commit_id":"67cca24d06722b353b37456dd3704a9edd28a173","user":{"login":"neomede","id":4903669,"node_id":"MDQ6VXNlcjQ5MDM2Njk=","avatar_url":"https://avatars2.githubusercontent.com/u/4903669?v=4","gravatar_id":"","url":"https://api.github.com/users/neomede","html_url":"https://github.com/neomede","followers_url":"https://api.github.com/users/neomede/followers","following_url":"https://api.github.com/users/neomede/following{/other_user}","gists_url":"https://api.github.com/users/neomede/gists{/gist_id}","starred_url":"https://api.github.com/users/neomede/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neomede/subscriptions","organizations_url":"https://api.github.com/users/neomede/orgs","repos_url":"https://api.github.com/users/neomede/repos","events_url":"https://api.github.com/users/neomede/events{/privacy}","received_events_url":"https://api.github.com/users/neomede/received_events","type":"User","site_admin":false},"body":"@sp-daniel-ramos I tested and doesn't overwrites the tags, just adds a new one with the same key.\r\n\r\nWe can rename WithTags to AddTags if everyone agree (in other pr 😄)","created_at":"2018-07-31T16:00:43Z","updated_at":"2018-07-31T16:00:43Z","html_url":"https://github.com/socialpoint-labs/bsk/pull/58#discussion_r206587548","pull_request_url":"https://api.github.com/repos/socialpoint-labs/bsk/pulls/58","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/socialpoint-labs/bsk/pulls/comments/206587548"},"html":{"href":"https://github.com/socialpoint-labs/bsk/pull/58#discussion_r206587548"},"pull_request":{"href":"https://api.github.com/repos/socialpoint-labs/bsk/pulls/58"}},"in_reply_to_id":206457603},"pull_request":{"url":"https://api.github.com/repos/socialpoint-labs/bsk/pulls/58","id":205027931,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1MDI3OTMx","html_url":"https://github.com/socialpoint-labs/bsk/pull/58","diff_url":"https://github.com/socialpoint-labs/bsk/pull/58.diff","patch_url":"https://github.com/socialpoint-labs/bsk/pull/58.patch","issue_url":"https://api.github.com/repos/socialpoint-labs/bsk/issues/58","number":58,"state":"open","locked":false,"title":"Add new metrics publisher with predefined tags","user":{"login":"neomede","id":4903669,"node_id":"MDQ6VXNlcjQ5MDM2Njk=","avatar_url":"https://avatars2.githubusercontent.com/u/4903669?v=4","gravatar_id":"","url":"https://api.github.com/users/neomede","html_url":"https://github.com/neomede","followers_url":"https://api.github.com/users/neomede/followers","following_url":"https://api.github.com/users/neomede/following{/other_user}","gists_url":"https://api.github.com/users/neomede/gists{/gist_id}","starred_url":"https://api.github.com/users/neomede/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neomede/subscriptions","organizations_url":"https://api.github.com/users/neomede/orgs","repos_url":"https://api.github.com/users/neomede/repos","events_url":"https://api.github.com/users/neomede/events{/privacy}","received_events_url":"https://api.github.com/users/neomede/received_events","type":"User","site_admin":false},"body":"Add new metrics publisher with predefined tags for all the metrics","created_at":"2018-07-31T08:03:53Z","updated_at":"2018-07-31T16:00:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6608e0d05a264c5f9d19f2522b5af61bdb908ef8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/socialpoint-labs/bsk/pulls/58/commits","review_comments_url":"https://api.github.com/repos/socialpoint-labs/bsk/pulls/58/comments","review_comment_url":"https://api.github.com/repos/socialpoint-labs/bsk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/socialpoint-labs/bsk/issues/58/comments","statuses_url":"https://api.github.com/repos/socialpoint-labs/bsk/statuses/d61f0721e7d55de1e161c512a620c2a56d9f72d5","head":{"label":"neomede:feature/tagged_metrics","ref":"feature/tagged_metrics","sha":"d61f0721e7d55de1e161c512a620c2a56d9f72d5","user":{"login":"neomede","id":4903669,"node_id":"MDQ6VXNlcjQ5MDM2Njk=","avatar_url":"https://avatars2.githubusercontent.com/u/4903669?v=4","gravatar_id":"","url":"https://api.github.com/users/neomede","html_url":"https://github.com/neomede","followers_url":"https://api.github.com/users/neomede/followers","following_url":"https://api.github.com/users/neomede/following{/other_user}","gists_url":"https://api.github.com/users/neomede/gists{/gist_id}","starred_url":"https://api.github.com/users/neomede/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neomede/subscriptions","organizations_url":"https://api.github.com/users/neomede/orgs","repos_url":"https://api.github.com/users/neomede/repos","events_url":"https://api.github.com/users/neomede/events{/privacy}","received_events_url":"https://api.github.com/users/neomede/received_events","type":"User","site_admin":false},"repo":{"id":97327756,"node_id":"MDEwOlJlcG9zaXRvcnk5NzMyNzc1Ng==","name":"bsk","full_name":"neomede/bsk","owner":{"login":"neomede","id":4903669,"node_id":"MDQ6VXNlcjQ5MDM2Njk=","avatar_url":"https://avatars2.githubusercontent.com/u/4903669?v=4","gravatar_id":"","url":"https://api.github.com/users/neomede","html_url":"https://github.com/neomede","followers_url":"https://api.github.com/users/neomede/followers","following_url":"https://api.github.com/users/neomede/following{/other_user}","gists_url":"https://api.github.com/users/neomede/gists{/gist_id}","starred_url":"https://api.github.com/users/neomede/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neomede/subscriptions","organizations_url":"https://api.github.com/users/neomede/orgs","repos_url":"https://api.github.com/users/neomede/repos","events_url":"https://api.github.com/users/neomede/events{/privacy}","received_events_url":"https://api.github.com/users/neomede/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/neomede/bsk","description":"Collection of packages used to build backend services in Golang at Social Point","fork":true,"url":"https://api.github.com/repos/neomede/bsk","forks_url":"https://api.github.com/repos/neomede/bsk/forks","keys_url":"https://api.github.com/repos/neomede/bsk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neomede/bsk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neomede/bsk/teams","hooks_url":"https://api.github.com/repos/neomede/bsk/hooks","issue_events_url":"https://api.github.com/repos/neomede/bsk/issues/events{/number}","events_url":"https://api.github.com/repos/neomede/bsk/events","assignees_url":"https://api.github.com/repos/neomede/bsk/assignees{/user}","branches_url":"https://api.github.com/repos/neomede/bsk/branches{/branch}","tags_url":"https://api.github.com/repos/neomede/bsk/tags","blobs_url":"https://api.github.com/repos/neomede/bsk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neomede/bsk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neomede/bsk/git/refs{/sha}","trees_url":"https://api.github.com/repos/neomede/bsk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neomede/bsk/statuses/{sha}","languages_url":"https://api.github.com/repos/neomede/bsk/languages","stargazers_url":"https://api.github.com/repos/neomede/bsk/stargazers","contributors_url":"https://api.github.com/repos/neomede/bsk/contributors","subscribers_url":"https://api.github.com/repos/neomede/bsk/subscribers","subscription_url":"https://api.github.com/repos/neomede/bsk/subscription","commits_url":"https://api.github.com/repos/neomede/bsk/commits{/sha}","git_commits_url":"https://api.github.com/repos/neomede/bsk/git/commits{/sha}","comments_url":"https://api.github.com/repos/neomede/bsk/comments{/number}","issue_comment_url":"https://api.github.com/repos/neomede/bsk/issues/comments{/number}","contents_url":"https://api.github.com/repos/neomede/bsk/contents/{+path}","compare_url":"https://api.github.com/repos/neomede/bsk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neomede/bsk/merges","archive_url":"https://api.github.com/repos/neomede/bsk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neomede/bsk/downloads","issues_url":"https://api.github.com/repos/neomede/bsk/issues{/number}","pulls_url":"https://api.github.com/repos/neomede/bsk/pulls{/number}","milestones_url":"https://api.github.com/repos/neomede/bsk/milestones{/number}","notifications_url":"https://api.github.com/repos/neomede/bsk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neomede/bsk/labels{/name}","releases_url":"https://api.github.com/repos/neomede/bsk/releases{/id}","deployments_url":"https://api.github.com/repos/neomede/bsk/deployments","created_at":"2017-07-15T16:21:10Z","updated_at":"2018-07-31T07:37:29Z","pushed_at":"2018-07-31T15:53:02Z","git_url":"git://github.com/neomede/bsk.git","ssh_url":"git@github.com:neomede/bsk.git","clone_url":"https://github.com/neomede/bsk.git","svn_url":"https://github.com/neomede/bsk","homepage":"","size":119,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"socialpoint-labs:master","ref":"master","sha":"eaa14ae5c779490a5f191df7b7619cb4be6699eb","user":{"login":"socialpoint-labs","id":8780396,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg3ODAzOTY=","avatar_url":"https://avatars2.githubusercontent.com/u/8780396?v=4","gravatar_id":"","url":"https://api.github.com/users/socialpoint-labs","html_url":"https://github.com/socialpoint-labs","followers_url":"https://api.github.com/users/socialpoint-labs/followers","following_url":"https://api.github.com/users/socialpoint-labs/following{/other_user}","gists_url":"https://api.github.com/users/socialpoint-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/socialpoint-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socialpoint-labs/subscriptions","organizations_url":"https://api.github.com/users/socialpoint-labs/orgs","repos_url":"https://api.github.com/users/socialpoint-labs/repos","events_url":"https://api.github.com/users/socialpoint-labs/events{/privacy}","received_events_url":"https://api.github.com/users/socialpoint-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":96294970,"node_id":"MDEwOlJlcG9zaXRvcnk5NjI5NDk3MA==","name":"bsk","full_name":"socialpoint-labs/bsk","owner":{"login":"socialpoint-labs","id":8780396,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg3ODAzOTY=","avatar_url":"https://avatars2.githubusercontent.com/u/8780396?v=4","gravatar_id":"","url":"https://api.github.com/users/socialpoint-labs","html_url":"https://github.com/socialpoint-labs","followers_url":"https://api.github.com/users/socialpoint-labs/followers","following_url":"https://api.github.com/users/socialpoint-labs/following{/other_user}","gists_url":"https://api.github.com/users/socialpoint-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/socialpoint-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socialpoint-labs/subscriptions","organizations_url":"https://api.github.com/users/socialpoint-labs/orgs","repos_url":"https://api.github.com/users/socialpoint-labs/repos","events_url":"https://api.github.com/users/socialpoint-labs/events{/privacy}","received_events_url":"https://api.github.com/users/socialpoint-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socialpoint-labs/bsk","description":"Collection of packages used to build backend services in Golang at Social Point","fork":false,"url":"https://api.github.com/repos/socialpoint-labs/bsk","forks_url":"https://api.github.com/repos/socialpoint-labs/bsk/forks","keys_url":"https://api.github.com/repos/socialpoint-labs/bsk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socialpoint-labs/bsk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socialpoint-labs/bsk/teams","hooks_url":"https://api.github.com/repos/socialpoint-labs/bsk/hooks","issue_events_url":"https://api.github.com/repos/socialpoint-labs/bsk/issues/events{/number}","events_url":"https://api.github.com/repos/socialpoint-labs/bsk/events","assignees_url":"https://api.github.com/repos/socialpoint-labs/bsk/assignees{/user}","branches_url":"https://api.github.com/repos/socialpoint-labs/bsk/branches{/branch}","tags_url":"https://api.github.com/repos/socialpoint-labs/bsk/tags","blobs_url":"https://api.github.com/repos/socialpoint-labs/bsk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socialpoint-labs/bsk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socialpoint-labs/bsk/git/refs{/sha}","trees_url":"https://api.github.com/repos/socialpoint-labs/bsk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socialpoint-labs/bsk/statuses/{sha}","languages_url":"https://api.github.com/repos/socialpoint-labs/bsk/languages","stargazers_url":"https://api.github.com/repos/socialpoint-labs/bsk/stargazers","contributors_url":"https://api.github.com/repos/socialpoint-labs/bsk/contributors","subscribers_url":"https://api.github.com/repos/socialpoint-labs/bsk/subscribers","subscription_url":"https://api.github.com/repos/socialpoint-labs/bsk/subscription","commits_url":"https://api.github.com/repos/socialpoint-labs/bsk/commits{/sha}","git_commits_url":"https://api.github.com/repos/socialpoint-labs/bsk/git/commits{/sha}","comments_url":"https://api.github.com/repos/socialpoint-labs/bsk/comments{/number}","issue_comment_url":"https://api.github.com/repos/socialpoint-labs/bsk/issues/comments{/number}","contents_url":"https://api.github.com/repos/socialpoint-labs/bsk/contents/{+path}","compare_url":"https://api.github.com/repos/socialpoint-labs/bsk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socialpoint-labs/bsk/merges","archive_url":"https://api.github.com/repos/socialpoint-labs/bsk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socialpoint-labs/bsk/downloads","issues_url":"https://api.github.com/repos/socialpoint-labs/bsk/issues{/number}","pulls_url":"https://api.github.com/repos/socialpoint-labs/bsk/pulls{/number}","milestones_url":"https://api.github.com/repos/socialpoint-labs/bsk/milestones{/number}","notifications_url":"https://api.github.com/repos/socialpoint-labs/bsk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socialpoint-labs/bsk/labels{/name}","releases_url":"https://api.github.com/repos/socialpoint-labs/bsk/releases{/id}","deployments_url":"https://api.github.com/repos/socialpoint-labs/bsk/deployments","created_at":"2017-07-05T08:18:53Z","updated_at":"2018-07-31T09:56:46Z","pushed_at":"2018-07-31T15:53:04Z","git_url":"git://github.com/socialpoint-labs/bsk.git","ssh_url":"git@github.com:socialpoint-labs/bsk.git","clone_url":"https://github.com/socialpoint-labs/bsk.git","svn_url":"https://github.com/socialpoint-labs/bsk","homepage":"","size":117,"stargazers_count":14,"watchers_count":14,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":13,"open_issues":4,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/socialpoint-labs/bsk/pulls/58"},"html":{"href":"https://github.com/socialpoint-labs/bsk/pull/58"},"issue":{"href":"https://api.github.com/repos/socialpoint-labs/bsk/issues/58"},"comments":{"href":"https://api.github.com/repos/socialpoint-labs/bsk/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/socialpoint-labs/bsk/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/socialpoint-labs/bsk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/socialpoint-labs/bsk/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/socialpoint-labs/bsk/statuses/d61f0721e7d55de1e161c512a620c2a56d9f72d5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"neomede"}}