{"action":"closed","number":65,"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/pulls/65","id":67374416,"html_url":"https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud/pull/65","diff_url":"https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud/pull/65.diff","patch_url":"https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud/pull/65.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/issues/65","number":65,"state":"closed","locked":false,"title":"Detect JSON by checking each line, in all ingested logs","user":{"login":"bokowski","id":192948,"avatar_url":"https://avatars.githubusercontent.com/u/192948?v=3","gravatar_id":"","url":"https://api.github.com/users/bokowski","html_url":"https://github.com/bokowski","followers_url":"https://api.github.com/users/bokowski/followers","following_url":"https://api.github.com/users/bokowski/following{/other_user}","gists_url":"https://api.github.com/users/bokowski/gists{/gist_id}","starred_url":"https://api.github.com/users/bokowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bokowski/subscriptions","organizations_url":"https://api.github.com/users/bokowski/orgs","repos_url":"https://api.github.com/users/bokowski/repos","events_url":"https://api.github.com/users/bokowski/events{/privacy}","received_events_url":"https://api.github.com/users/bokowski/received_events","type":"User","site_admin":false},"body":"Instead of just checking the first line of each batch, check every line\r\nfor structured content in JSON format, for all ingested logs and not\r\njust for logs coming from containers. This makes the logic easier to\r\nunderstand and explain to users, and more uniform across the different\r\nlogs sources. The implementation now checks whether the start of the\r\nline is valid JSON using simple string operations. Overall, assuming\r\nthat most batches of log lines are not JSON-formatted and have a\r\nrelatively low number of lines in the batch, this change should result\r\nin less CPU compared to the old implementation which calls JSON.parse\r\nand uses rescue to recover.","created_at":"2016-04-21T15:29:40Z","updated_at":"2016-06-15T17:51:22Z","closed_at":"2016-06-15T17:51:22Z","merged_at":null,"merge_commit_sha":"ac4b0a15fa6f237c1bee8ca2e2a053f86019dad3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/pulls/65/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/pulls/65/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/issues/65/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/statuses/9b699fb4c8b654adcdbb4365cfe9980269a9f0ef","head":{"label":"bokowski:master","ref":"master","sha":"9b699fb4c8b654adcdbb4365cfe9980269a9f0ef","user":{"login":"bokowski","id":192948,"avatar_url":"https://avatars.githubusercontent.com/u/192948?v=3","gravatar_id":"","url":"https://api.github.com/users/bokowski","html_url":"https://github.com/bokowski","followers_url":"https://api.github.com/users/bokowski/followers","following_url":"https://api.github.com/users/bokowski/following{/other_user}","gists_url":"https://api.github.com/users/bokowski/gists{/gist_id}","starred_url":"https://api.github.com/users/bokowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bokowski/subscriptions","organizations_url":"https://api.github.com/users/bokowski/orgs","repos_url":"https://api.github.com/users/bokowski/repos","events_url":"https://api.github.com/users/bokowski/events{/privacy}","received_events_url":"https://api.github.com/users/bokowski/received_events","type":"User","site_admin":false},"repo":{"id":56758979,"name":"fluent-plugin-google-cloud","full_name":"bokowski/fluent-plugin-google-cloud","owner":{"login":"bokowski","id":192948,"avatar_url":"https://avatars.githubusercontent.com/u/192948?v=3","gravatar_id":"","url":"https://api.github.com/users/bokowski","html_url":"https://github.com/bokowski","followers_url":"https://api.github.com/users/bokowski/followers","following_url":"https://api.github.com/users/bokowski/following{/other_user}","gists_url":"https://api.github.com/users/bokowski/gists{/gist_id}","starred_url":"https://api.github.com/users/bokowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bokowski/subscriptions","organizations_url":"https://api.github.com/users/bokowski/orgs","repos_url":"https://api.github.com/users/bokowski/repos","events_url":"https://api.github.com/users/bokowski/events{/privacy}","received_events_url":"https://api.github.com/users/bokowski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bokowski/fluent-plugin-google-cloud","description":"Plugin for Fluentd that sends logs to the Google Cloud Platform's log ingestion API.","fork":true,"url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud","forks_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/forks","keys_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/teams","hooks_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/hooks","issue_events_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/issues/events{/number}","events_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/events","assignees_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/assignees{/user}","branches_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/branches{/branch}","tags_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/tags","blobs_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/statuses/{sha}","languages_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/languages","stargazers_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/stargazers","contributors_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/contributors","subscribers_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/subscribers","subscription_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/subscription","commits_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/contents/{+path}","compare_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/merges","archive_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/downloads","issues_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/issues{/number}","pulls_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/pulls{/number}","milestones_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/milestones{/number}","notifications_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/labels{/name}","releases_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/releases{/id}","deployments_url":"https://api.github.com/repos/bokowski/fluent-plugin-google-cloud/deployments","created_at":"2016-04-21T09:04:30Z","updated_at":"2016-04-21T09:04:32Z","pushed_at":"2016-06-10T15:22:40Z","git_url":"git://github.com/bokowski/fluent-plugin-google-cloud.git","ssh_url":"git@github.com:bokowski/fluent-plugin-google-cloud.git","clone_url":"https://github.com/bokowski/fluent-plugin-google-cloud.git","svn_url":"https://github.com/bokowski/fluent-plugin-google-cloud","homepage":null,"size":386,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"GoogleCloudPlatform:master","ref":"master","sha":"6dd3716e977f5faf3f52147816e21f3f6b716e10","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":19799990,"name":"fluent-plugin-google-cloud","full_name":"GoogleCloudPlatform/fluent-plugin-google-cloud","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud","description":"Plugin for Fluentd that sends logs to the Google Cloud Platform's log ingestion API.","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/deployments","created_at":"2014-05-14T23:46:51Z","updated_at":"2016-06-08T07:48:00Z","pushed_at":"2016-06-15T17:47:41Z","git_url":"git://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud.git","ssh_url":"git@github.com:GoogleCloudPlatform/fluent-plugin-google-cloud.git","clone_url":"https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud.git","svn_url":"https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud","homepage":null,"size":480,"stargazers_count":45,"watchers_count":45,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":9,"forks":15,"open_issues":9,"watchers":45,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/pulls/65"},"html":{"href":"https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud/pull/65"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/issues/65"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/fluent-plugin-google-cloud/statuses/9b699fb4c8b654adcdbb4365cfe9980269a9f0ef"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":8,"review_comments":20,"commits":4,"additions":92,"deletions":34,"changed_files":2}}
{"actor":{"display_login":"igorpeshansky"}}