{"action":"created","comment":{"url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/pulls/comments/89176389","pull_request_review_id":9724834,"id":89176389,"diff_hunk":"@@ -0,0 +1,92 @@\n+# encoding: utf-8\n+require \"logstash/filters/base\"\n+require \"logstash/namespace\"\n+\n+# Allows you to truncate fields longer than a given length.\n+#\n+# This truncates on bytes values, not character count.  In practice, this\n+# should mean that the truncated length is somewhere between `length_bytes` and\n+# `length_bytes - 6` (UTF-8 supports up to 6-byte characters).\n+class LogStash::Filters::Truncate < LogStash::Filters::Base\n+  config_name \"truncate\"\n+\n+  # A list of fieldrefs to truncate if they are too long.\n+  #\n+  # If not specified, the default behavior will be to attempt truncation on all\n+  # strings in the event. This default behavior could be computationally\n+  # expensive, so if you know exactly which fields you wish to truncate, it is\n+  # advised that you be specific and configure the fields you want truncated.\n+  config :fields, :validate => :string, :list => true","path":"lib/logstash/filters/truncate.rb","position":19,"original_position":19,"commit_id":"812ad2342ce4985592c355f771778c034361745b","original_commit_id":"812ad2342ce4985592c355f771778c034361745b","user":{"login":"ph","id":640,"avatar_url":"https://avatars.githubusercontent.com/u/640?v=3","gravatar_id":"","url":"https://api.github.com/users/ph","html_url":"https://github.com/ph","followers_url":"https://api.github.com/users/ph/followers","following_url":"https://api.github.com/users/ph/following{/other_user}","gists_url":"https://api.github.com/users/ph/gists{/gist_id}","starred_url":"https://api.github.com/users/ph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ph/subscriptions","organizations_url":"https://api.github.com/users/ph/orgs","repos_url":"https://api.github.com/users/ph/repos","events_url":"https://api.github.com/users/ph/events{/privacy}","received_events_url":"https://api.github.com/users/ph/received_events","type":"User","site_admin":false},"body":"Maybe add a note about the behavior if the target field is a `hash/array`","created_at":"2016-11-22T18:11:43Z","updated_at":"2016-11-22T18:11:43Z","html_url":"https://github.com/logstash-plugins/logstash-filter-truncate/pull/1#discussion_r89176389","pull_request_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/pulls/comments/89176389"},"html":{"href":"https://github.com/logstash-plugins/logstash-filter-truncate/pull/1#discussion_r89176389"},"pull_request":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/pulls/1","id":94700420,"html_url":"https://github.com/logstash-plugins/logstash-filter-truncate/pull/1","diff_url":"https://github.com/logstash-plugins/logstash-filter-truncate/pull/1.diff","patch_url":"https://github.com/logstash-plugins/logstash-filter-truncate/pull/1.patch","issue_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/issues/1","number":1,"state":"open","locked":false,"title":"Initial commit of this truncate filter.","user":{"login":"jordansissel","id":131818,"avatar_url":"https://avatars.githubusercontent.com/u/131818?v=3","gravatar_id":"","url":"https://api.github.com/users/jordansissel","html_url":"https://github.com/jordansissel","followers_url":"https://api.github.com/users/jordansissel/followers","following_url":"https://api.github.com/users/jordansissel/following{/other_user}","gists_url":"https://api.github.com/users/jordansissel/gists{/gist_id}","starred_url":"https://api.github.com/users/jordansissel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordansissel/subscriptions","organizations_url":"https://api.github.com/users/jordansissel/orgs","repos_url":"https://api.github.com/users/jordansissel/repos","events_url":"https://api.github.com/users/jordansissel/events{/privacy}","received_events_url":"https://api.github.com/users/jordansissel/received_events","type":"User","site_admin":false},"body":"Purpose is to enable byte-length truncation of fields in Logstash.","created_at":"2016-11-21T21:30:29Z","updated_at":"2016-11-22T18:25:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9db2595708d6a7bc92a919637d1a878b48b9a05a","assignee":{"login":"ph","id":640,"avatar_url":"https://avatars.githubusercontent.com/u/640?v=3","gravatar_id":"","url":"https://api.github.com/users/ph","html_url":"https://github.com/ph","followers_url":"https://api.github.com/users/ph/followers","following_url":"https://api.github.com/users/ph/following{/other_user}","gists_url":"https://api.github.com/users/ph/gists{/gist_id}","starred_url":"https://api.github.com/users/ph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ph/subscriptions","organizations_url":"https://api.github.com/users/ph/orgs","repos_url":"https://api.github.com/users/ph/repos","events_url":"https://api.github.com/users/ph/events{/privacy}","received_events_url":"https://api.github.com/users/ph/received_events","type":"User","site_admin":false},"assignees":[{"login":"ph","id":640,"avatar_url":"https://avatars.githubusercontent.com/u/640?v=3","gravatar_id":"","url":"https://api.github.com/users/ph","html_url":"https://github.com/ph","followers_url":"https://api.github.com/users/ph/followers","following_url":"https://api.github.com/users/ph/following{/other_user}","gists_url":"https://api.github.com/users/ph/gists{/gist_id}","starred_url":"https://api.github.com/users/ph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ph/subscriptions","organizations_url":"https://api.github.com/users/ph/orgs","repos_url":"https://api.github.com/users/ph/repos","events_url":"https://api.github.com/users/ph/events{/privacy}","received_events_url":"https://api.github.com/users/ph/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/pulls/1/commits","review_comments_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/pulls/1/comments","review_comment_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/issues/1/comments","statuses_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/statuses/812ad2342ce4985592c355f771778c034361745b","head":{"label":"logstash-plugins:initial","ref":"initial","sha":"812ad2342ce4985592c355f771778c034361745b","user":{"login":"logstash-plugins","id":8961934,"avatar_url":"https://avatars.githubusercontent.com/u/8961934?v=3","gravatar_id":"","url":"https://api.github.com/users/logstash-plugins","html_url":"https://github.com/logstash-plugins","followers_url":"https://api.github.com/users/logstash-plugins/followers","following_url":"https://api.github.com/users/logstash-plugins/following{/other_user}","gists_url":"https://api.github.com/users/logstash-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/logstash-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logstash-plugins/subscriptions","organizations_url":"https://api.github.com/users/logstash-plugins/orgs","repos_url":"https://api.github.com/users/logstash-plugins/repos","events_url":"https://api.github.com/users/logstash-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/logstash-plugins/received_events","type":"Organization","site_admin":false},"repo":{"id":74396956,"name":"logstash-filter-truncate","full_name":"logstash-plugins/logstash-filter-truncate","owner":{"login":"logstash-plugins","id":8961934,"avatar_url":"https://avatars.githubusercontent.com/u/8961934?v=3","gravatar_id":"","url":"https://api.github.com/users/logstash-plugins","html_url":"https://github.com/logstash-plugins","followers_url":"https://api.github.com/users/logstash-plugins/followers","following_url":"https://api.github.com/users/logstash-plugins/following{/other_user}","gists_url":"https://api.github.com/users/logstash-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/logstash-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logstash-plugins/subscriptions","organizations_url":"https://api.github.com/users/logstash-plugins/orgs","repos_url":"https://api.github.com/users/logstash-plugins/repos","events_url":"https://api.github.com/users/logstash-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/logstash-plugins/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/logstash-plugins/logstash-filter-truncate","description":null,"fork":false,"url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate","forks_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/forks","keys_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/teams","hooks_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/hooks","issue_events_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/issues/events{/number}","events_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/events","assignees_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/assignees{/user}","branches_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/branches{/branch}","tags_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/tags","blobs_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/git/refs{/sha}","trees_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/statuses/{sha}","languages_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/languages","stargazers_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/stargazers","contributors_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/contributors","subscribers_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/subscribers","subscription_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/subscription","commits_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/commits{/sha}","git_commits_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/git/commits{/sha}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/comments{/number}","issue_comment_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/issues/comments{/number}","contents_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/contents/{+path}","compare_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/merges","archive_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/downloads","issues_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/issues{/number}","pulls_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/pulls{/number}","milestones_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/milestones{/number}","notifications_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/labels{/name}","releases_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/releases{/id}","deployments_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/deployments","created_at":"2016-11-21T19:11:29Z","updated_at":"2016-11-21T19:11:29Z","pushed_at":"2016-11-21T21:31:15Z","git_url":"git://github.com/logstash-plugins/logstash-filter-truncate.git","ssh_url":"git@github.com:logstash-plugins/logstash-filter-truncate.git","clone_url":"https://github.com/logstash-plugins/logstash-filter-truncate.git","svn_url":"https://github.com/logstash-plugins/logstash-filter-truncate","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":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":"logstash-plugins:master","ref":"master","sha":"4b1f116cf67f3dba6a1728ea6f952011000f915c","user":{"login":"logstash-plugins","id":8961934,"avatar_url":"https://avatars.githubusercontent.com/u/8961934?v=3","gravatar_id":"","url":"https://api.github.com/users/logstash-plugins","html_url":"https://github.com/logstash-plugins","followers_url":"https://api.github.com/users/logstash-plugins/followers","following_url":"https://api.github.com/users/logstash-plugins/following{/other_user}","gists_url":"https://api.github.com/users/logstash-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/logstash-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logstash-plugins/subscriptions","organizations_url":"https://api.github.com/users/logstash-plugins/orgs","repos_url":"https://api.github.com/users/logstash-plugins/repos","events_url":"https://api.github.com/users/logstash-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/logstash-plugins/received_events","type":"Organization","site_admin":false},"repo":{"id":74396956,"name":"logstash-filter-truncate","full_name":"logstash-plugins/logstash-filter-truncate","owner":{"login":"logstash-plugins","id":8961934,"avatar_url":"https://avatars.githubusercontent.com/u/8961934?v=3","gravatar_id":"","url":"https://api.github.com/users/logstash-plugins","html_url":"https://github.com/logstash-plugins","followers_url":"https://api.github.com/users/logstash-plugins/followers","following_url":"https://api.github.com/users/logstash-plugins/following{/other_user}","gists_url":"https://api.github.com/users/logstash-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/logstash-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logstash-plugins/subscriptions","organizations_url":"https://api.github.com/users/logstash-plugins/orgs","repos_url":"https://api.github.com/users/logstash-plugins/repos","events_url":"https://api.github.com/users/logstash-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/logstash-plugins/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/logstash-plugins/logstash-filter-truncate","description":null,"fork":false,"url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate","forks_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/forks","keys_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/teams","hooks_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/hooks","issue_events_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/issues/events{/number}","events_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/events","assignees_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/assignees{/user}","branches_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/branches{/branch}","tags_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/tags","blobs_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/git/refs{/sha}","trees_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/statuses/{sha}","languages_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/languages","stargazers_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/stargazers","contributors_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/contributors","subscribers_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/subscribers","subscription_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/subscription","commits_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/commits{/sha}","git_commits_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/git/commits{/sha}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/comments{/number}","issue_comment_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/issues/comments{/number}","contents_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/contents/{+path}","compare_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/merges","archive_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/downloads","issues_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/issues{/number}","pulls_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/pulls{/number}","milestones_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/milestones{/number}","notifications_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/labels{/name}","releases_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/releases{/id}","deployments_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/deployments","created_at":"2016-11-21T19:11:29Z","updated_at":"2016-11-21T19:11:29Z","pushed_at":"2016-11-21T21:31:15Z","git_url":"git://github.com/logstash-plugins/logstash-filter-truncate.git","ssh_url":"git@github.com:logstash-plugins/logstash-filter-truncate.git","clone_url":"https://github.com/logstash-plugins/logstash-filter-truncate.git","svn_url":"https://github.com/logstash-plugins/logstash-filter-truncate","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":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"}},"_links":{"self":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/pulls/1"},"html":{"href":"https://github.com/logstash-plugins/logstash-filter-truncate/pull/1"},"issue":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/issues/1"},"comments":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-truncate/statuses/812ad2342ce4985592c355f771778c034361745b"}}}}
{"actor":{"display_login":"ph"}}