{"action":"created","comment":{"url":"https://api.github.com/repos/m3db/m3metrics/pulls/comments/106825773","pull_request_review_id":27765692,"id":106825773,"diff_hunk":"@@ -56,11 +56,32 @@ type Filter interface {\n }\n \n // NewFilter supports startsWith, endsWith, contains and a single wildcard\n-// TODO(martinm): add rest of glob matching support and negation\n+// along with negation\n+// TODO(martinm): add rest of glob matching support\n func NewFilter(pattern string) (Filter, error) {\n-\tidx := strings.Index(pattern, WildcardChar)\n+\tnIdx := strings.Index(pattern, negationChar)\n+\tif nIdx != 0 {","path":"filters/filter.go","position":null,"original_position":22,"commit_id":"480414dddb47b672bfd7dba5d9ad1a9506c7a953","original_commit_id":"b9da7f827f0ada9ccff5019bb980c9204c8439e1","user":{"login":"martin-mao","id":12398992,"avatar_url":"https://avatars3.githubusercontent.com/u/12398992?v=3","gravatar_id":"","url":"https://api.github.com/users/martin-mao","html_url":"https://github.com/martin-mao","followers_url":"https://api.github.com/users/martin-mao/followers","following_url":"https://api.github.com/users/martin-mao/following{/other_user}","gists_url":"https://api.github.com/users/martin-mao/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-mao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-mao/subscriptions","organizations_url":"https://api.github.com/users/martin-mao/orgs","repos_url":"https://api.github.com/users/martin-mao/repos","events_url":"https://api.github.com/users/martin-mao/events{/privacy}","received_events_url":"https://api.github.com/users/martin-mao/received_events","type":"User","site_admin":false},"body":"Sanitize is only used to sanitize the filter expressions so that we can emit metrics on these expressions without special chars (ie the metric we emit to count the number of filter hits has a tag called expression and we want to sanitize the value of that tag). It's not used to sanitize incoming metric IDs. ","created_at":"2017-03-20T01:22:13Z","updated_at":"2017-03-20T01:22:14Z","html_url":"https://github.com/m3db/m3metrics/pull/18#discussion_r106825773","pull_request_url":"https://api.github.com/repos/m3db/m3metrics/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/m3db/m3metrics/pulls/comments/106825773"},"html":{"href":"https://github.com/m3db/m3metrics/pull/18#discussion_r106825773"},"pull_request":{"href":"https://api.github.com/repos/m3db/m3metrics/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/m3db/m3metrics/pulls/18","id":111399932,"html_url":"https://github.com/m3db/m3metrics/pull/18","diff_url":"https://github.com/m3db/m3metrics/pull/18.diff","patch_url":"https://github.com/m3db/m3metrics/pull/18.patch","issue_url":"https://api.github.com/repos/m3db/m3metrics/issues/18","number":18,"state":"closed","locked":false,"title":"Add negation filter","user":{"login":"martin-mao","id":12398992,"avatar_url":"https://avatars3.githubusercontent.com/u/12398992?v=3","gravatar_id":"","url":"https://api.github.com/users/martin-mao","html_url":"https://github.com/martin-mao","followers_url":"https://api.github.com/users/martin-mao/followers","following_url":"https://api.github.com/users/martin-mao/following{/other_user}","gists_url":"https://api.github.com/users/martin-mao/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-mao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-mao/subscriptions","organizations_url":"https://api.github.com/users/martin-mao/orgs","repos_url":"https://api.github.com/users/martin-mao/repos","events_url":"https://api.github.com/users/martin-mao/events{/privacy}","received_events_url":"https://api.github.com/users/martin-mao/received_events","type":"User","site_admin":false},"body":"cc @xichen2020 ","created_at":"2017-03-18T06:54:20Z","updated_at":"2017-03-20T01:22:14Z","closed_at":"2017-03-19T04:45:45Z","merged_at":"2017-03-19T04:45:45Z","merge_commit_sha":"f54b9f67487ee0e578bebbea5f6c056a1de57288","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/m3db/m3metrics/pulls/18/commits","review_comments_url":"https://api.github.com/repos/m3db/m3metrics/pulls/18/comments","review_comment_url":"https://api.github.com/repos/m3db/m3metrics/pulls/comments{/number}","comments_url":"https://api.github.com/repos/m3db/m3metrics/issues/18/comments","statuses_url":"https://api.github.com/repos/m3db/m3metrics/statuses/480414dddb47b672bfd7dba5d9ad1a9506c7a953","head":{"label":"m3db:martinm-add-negation-filter","ref":"martinm-add-negation-filter","sha":"480414dddb47b672bfd7dba5d9ad1a9506c7a953","user":{"login":"m3db","id":19937171,"avatar_url":"https://avatars3.githubusercontent.com/u/19937171?v=3","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"repo":{"id":76399863,"name":"m3metrics","full_name":"m3db/m3metrics","owner":{"login":"m3db","id":19937171,"avatar_url":"https://avatars3.githubusercontent.com/u/19937171?v=3","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/m3db/m3metrics","description":"Metrics data structures and serialization/deserializtion protocols","fork":false,"url":"https://api.github.com/repos/m3db/m3metrics","forks_url":"https://api.github.com/repos/m3db/m3metrics/forks","keys_url":"https://api.github.com/repos/m3db/m3metrics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m3db/m3metrics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m3db/m3metrics/teams","hooks_url":"https://api.github.com/repos/m3db/m3metrics/hooks","issue_events_url":"https://api.github.com/repos/m3db/m3metrics/issues/events{/number}","events_url":"https://api.github.com/repos/m3db/m3metrics/events","assignees_url":"https://api.github.com/repos/m3db/m3metrics/assignees{/user}","branches_url":"https://api.github.com/repos/m3db/m3metrics/branches{/branch}","tags_url":"https://api.github.com/repos/m3db/m3metrics/tags","blobs_url":"https://api.github.com/repos/m3db/m3metrics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m3db/m3metrics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m3db/m3metrics/git/refs{/sha}","trees_url":"https://api.github.com/repos/m3db/m3metrics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m3db/m3metrics/statuses/{sha}","languages_url":"https://api.github.com/repos/m3db/m3metrics/languages","stargazers_url":"https://api.github.com/repos/m3db/m3metrics/stargazers","contributors_url":"https://api.github.com/repos/m3db/m3metrics/contributors","subscribers_url":"https://api.github.com/repos/m3db/m3metrics/subscribers","subscription_url":"https://api.github.com/repos/m3db/m3metrics/subscription","commits_url":"https://api.github.com/repos/m3db/m3metrics/commits{/sha}","git_commits_url":"https://api.github.com/repos/m3db/m3metrics/git/commits{/sha}","comments_url":"https://api.github.com/repos/m3db/m3metrics/comments{/number}","issue_comment_url":"https://api.github.com/repos/m3db/m3metrics/issues/comments{/number}","contents_url":"https://api.github.com/repos/m3db/m3metrics/contents/{+path}","compare_url":"https://api.github.com/repos/m3db/m3metrics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m3db/m3metrics/merges","archive_url":"https://api.github.com/repos/m3db/m3metrics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m3db/m3metrics/downloads","issues_url":"https://api.github.com/repos/m3db/m3metrics/issues{/number}","pulls_url":"https://api.github.com/repos/m3db/m3metrics/pulls{/number}","milestones_url":"https://api.github.com/repos/m3db/m3metrics/milestones{/number}","notifications_url":"https://api.github.com/repos/m3db/m3metrics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m3db/m3metrics/labels{/name}","releases_url":"https://api.github.com/repos/m3db/m3metrics/releases{/id}","deployments_url":"https://api.github.com/repos/m3db/m3metrics/deployments","created_at":"2016-12-13T21:28:26Z","updated_at":"2016-12-13T21:38:42Z","pushed_at":"2017-03-19T04:46:09Z","git_url":"git://github.com/m3db/m3metrics.git","ssh_url":"git@github.com:m3db/m3metrics.git","clone_url":"https://github.com/m3db/m3metrics.git","svn_url":"https://github.com/m3db/m3metrics","homepage":null,"size":192,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"m3db:master","ref":"master","sha":"897be212c36f12a8fa0bb66a1579729088eb2bbc","user":{"login":"m3db","id":19937171,"avatar_url":"https://avatars3.githubusercontent.com/u/19937171?v=3","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"repo":{"id":76399863,"name":"m3metrics","full_name":"m3db/m3metrics","owner":{"login":"m3db","id":19937171,"avatar_url":"https://avatars3.githubusercontent.com/u/19937171?v=3","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/m3db/m3metrics","description":"Metrics data structures and serialization/deserializtion protocols","fork":false,"url":"https://api.github.com/repos/m3db/m3metrics","forks_url":"https://api.github.com/repos/m3db/m3metrics/forks","keys_url":"https://api.github.com/repos/m3db/m3metrics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m3db/m3metrics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m3db/m3metrics/teams","hooks_url":"https://api.github.com/repos/m3db/m3metrics/hooks","issue_events_url":"https://api.github.com/repos/m3db/m3metrics/issues/events{/number}","events_url":"https://api.github.com/repos/m3db/m3metrics/events","assignees_url":"https://api.github.com/repos/m3db/m3metrics/assignees{/user}","branches_url":"https://api.github.com/repos/m3db/m3metrics/branches{/branch}","tags_url":"https://api.github.com/repos/m3db/m3metrics/tags","blobs_url":"https://api.github.com/repos/m3db/m3metrics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m3db/m3metrics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m3db/m3metrics/git/refs{/sha}","trees_url":"https://api.github.com/repos/m3db/m3metrics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m3db/m3metrics/statuses/{sha}","languages_url":"https://api.github.com/repos/m3db/m3metrics/languages","stargazers_url":"https://api.github.com/repos/m3db/m3metrics/stargazers","contributors_url":"https://api.github.com/repos/m3db/m3metrics/contributors","subscribers_url":"https://api.github.com/repos/m3db/m3metrics/subscribers","subscription_url":"https://api.github.com/repos/m3db/m3metrics/subscription","commits_url":"https://api.github.com/repos/m3db/m3metrics/commits{/sha}","git_commits_url":"https://api.github.com/repos/m3db/m3metrics/git/commits{/sha}","comments_url":"https://api.github.com/repos/m3db/m3metrics/comments{/number}","issue_comment_url":"https://api.github.com/repos/m3db/m3metrics/issues/comments{/number}","contents_url":"https://api.github.com/repos/m3db/m3metrics/contents/{+path}","compare_url":"https://api.github.com/repos/m3db/m3metrics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m3db/m3metrics/merges","archive_url":"https://api.github.com/repos/m3db/m3metrics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m3db/m3metrics/downloads","issues_url":"https://api.github.com/repos/m3db/m3metrics/issues{/number}","pulls_url":"https://api.github.com/repos/m3db/m3metrics/pulls{/number}","milestones_url":"https://api.github.com/repos/m3db/m3metrics/milestones{/number}","notifications_url":"https://api.github.com/repos/m3db/m3metrics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m3db/m3metrics/labels{/name}","releases_url":"https://api.github.com/repos/m3db/m3metrics/releases{/id}","deployments_url":"https://api.github.com/repos/m3db/m3metrics/deployments","created_at":"2016-12-13T21:28:26Z","updated_at":"2016-12-13T21:38:42Z","pushed_at":"2017-03-19T04:46:09Z","git_url":"git://github.com/m3db/m3metrics.git","ssh_url":"git@github.com:m3db/m3metrics.git","clone_url":"https://github.com/m3db/m3metrics.git","svn_url":"https://github.com/m3db/m3metrics","homepage":null,"size":192,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/m3db/m3metrics/pulls/18"},"html":{"href":"https://github.com/m3db/m3metrics/pull/18"},"issue":{"href":"https://api.github.com/repos/m3db/m3metrics/issues/18"},"comments":{"href":"https://api.github.com/repos/m3db/m3metrics/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/m3db/m3metrics/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/m3db/m3metrics/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/m3db/m3metrics/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/m3db/m3metrics/statuses/480414dddb47b672bfd7dba5d9ad1a9506c7a953"}}}}
{"actor":{"display_login":"martin-mao"}}