{"action":"closed","number":431,"pull_request":{"url":"https://api.github.com/repos/DataDog/datadog-trace-agent/pulls/431","id":192691253,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNjkxMjUz","html_url":"https://github.com/DataDog/datadog-trace-agent/pull/431","diff_url":"https://github.com/DataDog/datadog-trace-agent/pull/431.diff","patch_url":"https://github.com/DataDog/datadog-trace-agent/pull/431.patch","issue_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/issues/431","number":431,"state":"closed","locked":false,"title":"model/normalizer: Enforce valid utf-8 during normalization.","user":{"login":"AlexJF","id":373323,"node_id":"MDQ6VXNlcjM3MzMyMw==","avatar_url":"https://avatars0.githubusercontent.com/u/373323?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexJF","html_url":"https://github.com/AlexJF","followers_url":"https://api.github.com/users/AlexJF/followers","following_url":"https://api.github.com/users/AlexJF/following{/other_user}","gists_url":"https://api.github.com/users/AlexJF/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexJF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexJF/subscriptions","organizations_url":"https://api.github.com/users/AlexJF/orgs","repos_url":"https://api.github.com/users/AlexJF/repos","events_url":"https://api.github.com/users/AlexJF/events{/privacy}","received_events_url":"https://api.github.com/users/AlexJF/received_events","type":"User","site_admin":false},"body":"An attempt at enforcing valid utf8 strings for span contents after normalization.\r\n\r\nIt works but has a non-negligible impact which I couldn't avoid by writing the same code with several variations (my own loop, etc...). Most of the time and allocations are actually inside the Rune handling code of the stdlib it seems.\r\n\r\nImpact on my MBP:\r\n\r\nImpact with no invalid utf-8 strings:\r\n```\r\n$ benchstat old.txt new-valid.txt\r\nname             old time/op    new time/op    delta\r\nNormalization-4     549ns ± 8%     671ns ± 0%  +22.13%  (p=0.016 n=5+4)\r\n\r\nname             old alloc/op   new alloc/op   delta\r\nNormalization-4      792B ± 0%      792B ± 0%     ~     (all equal)\r\n\r\nname             old allocs/op  new allocs/op  delta\r\nNormalization-4      9.00 ± 0%      9.00 ± 0%     ~     (all equal)\r\n```\r\n\r\nImpact with invalid utf-8 strings in Resource, Type and Meta:\r\n```\r\n$ benchstat old.txt new-invalid.txt\r\nname             old time/op    new time/op    delta\r\nNormalization-4     549ns ± 8%    1344ns ± 0%  +144.68%  (p=0.008 n=5+5)\r\n\r\nname             old alloc/op   new alloc/op   delta\r\nNormalization-4      792B ± 0%     1296B ± 0%   +63.64%  (p=0.008 n=5+5)\r\n\r\nname             old allocs/op  new allocs/op  delta\r\nNormalization-4      9.00 ± 0%     17.00 ± 0%   +88.89%  (p=0.008 n=5+5)\r\n```","created_at":"2018-06-05T12:34:33Z","updated_at":"2018-06-13T13:56:13Z","closed_at":"2018-06-13T13:56:13Z","merged_at":"2018-06-13T13:56:13Z","merge_commit_sha":"9fff78cc9b8dc6da1ba41c92002567a3b8b2f252","assignee":null,"assignees":[],"requested_reviewers":[{"login":"palazzem","id":1560405,"node_id":"MDQ6VXNlcjE1NjA0MDU=","avatar_url":"https://avatars2.githubusercontent.com/u/1560405?v=4","gravatar_id":"","url":"https://api.github.com/users/palazzem","html_url":"https://github.com/palazzem","followers_url":"https://api.github.com/users/palazzem/followers","following_url":"https://api.github.com/users/palazzem/following{/other_user}","gists_url":"https://api.github.com/users/palazzem/gists{/gist_id}","starred_url":"https://api.github.com/users/palazzem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palazzem/subscriptions","organizations_url":"https://api.github.com/users/palazzem/orgs","repos_url":"https://api.github.com/users/palazzem/repos","events_url":"https://api.github.com/users/palazzem/events{/privacy}","received_events_url":"https://api.github.com/users/palazzem/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/pulls/431/commits","review_comments_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/pulls/431/comments","review_comment_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/issues/431/comments","statuses_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/statuses/d7fa6e322444b3d55457a3cabd94d34ece7a6c0f","head":{"label":"DataDog:alexjf/utf8-enforcement","ref":"alexjf/utf8-enforcement","sha":"d7fa6e322444b3d55457a3cabd94d34ece7a6c0f","user":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"repo":{"id":38379832,"node_id":"MDEwOlJlcG9zaXRvcnkzODM3OTgzMg==","name":"datadog-trace-agent","full_name":"DataDog/datadog-trace-agent","owner":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DataDog/datadog-trace-agent","description":"Datadog APM agent.","fork":false,"url":"https://api.github.com/repos/DataDog/datadog-trace-agent","forks_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/forks","keys_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/teams","hooks_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/hooks","issue_events_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/issues/events{/number}","events_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/events","assignees_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/assignees{/user}","branches_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/branches{/branch}","tags_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/tags","blobs_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/languages","stargazers_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/stargazers","contributors_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/contributors","subscribers_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/subscribers","subscription_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/subscription","commits_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/contents/{+path}","compare_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/merges","archive_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/downloads","issues_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/issues{/number}","pulls_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/labels{/name}","releases_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/releases{/id}","deployments_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/deployments","created_at":"2015-07-01T15:45:17Z","updated_at":"2018-06-09T12:16:29Z","pushed_at":"2018-06-13T13:56:13Z","git_url":"git://github.com/DataDog/datadog-trace-agent.git","ssh_url":"git@github.com:DataDog/datadog-trace-agent.git","clone_url":"https://github.com/DataDog/datadog-trace-agent.git","svn_url":"https://github.com/DataDog/datadog-trace-agent","homepage":"http://www.datadog.com","size":5471,"stargazers_count":46,"watchers_count":46,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":21,"open_issues":18,"watchers":46,"default_branch":"master"}},"base":{"label":"DataDog:master","ref":"master","sha":"821cc80926798a6c9b73e5ffaa72a5cafac032cf","user":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"repo":{"id":38379832,"node_id":"MDEwOlJlcG9zaXRvcnkzODM3OTgzMg==","name":"datadog-trace-agent","full_name":"DataDog/datadog-trace-agent","owner":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DataDog/datadog-trace-agent","description":"Datadog APM agent.","fork":false,"url":"https://api.github.com/repos/DataDog/datadog-trace-agent","forks_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/forks","keys_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/teams","hooks_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/hooks","issue_events_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/issues/events{/number}","events_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/events","assignees_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/assignees{/user}","branches_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/branches{/branch}","tags_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/tags","blobs_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/languages","stargazers_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/stargazers","contributors_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/contributors","subscribers_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/subscribers","subscription_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/subscription","commits_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/contents/{+path}","compare_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/merges","archive_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/downloads","issues_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/issues{/number}","pulls_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/labels{/name}","releases_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/releases{/id}","deployments_url":"https://api.github.com/repos/DataDog/datadog-trace-agent/deployments","created_at":"2015-07-01T15:45:17Z","updated_at":"2018-06-09T12:16:29Z","pushed_at":"2018-06-13T13:56:13Z","git_url":"git://github.com/DataDog/datadog-trace-agent.git","ssh_url":"git@github.com:DataDog/datadog-trace-agent.git","clone_url":"https://github.com/DataDog/datadog-trace-agent.git","svn_url":"https://github.com/DataDog/datadog-trace-agent","homepage":"http://www.datadog.com","size":5471,"stargazers_count":46,"watchers_count":46,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":21,"open_issues":18,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DataDog/datadog-trace-agent/pulls/431"},"html":{"href":"https://github.com/DataDog/datadog-trace-agent/pull/431"},"issue":{"href":"https://api.github.com/repos/DataDog/datadog-trace-agent/issues/431"},"comments":{"href":"https://api.github.com/repos/DataDog/datadog-trace-agent/issues/431/comments"},"review_comments":{"href":"https://api.github.com/repos/DataDog/datadog-trace-agent/pulls/431/comments"},"review_comment":{"href":"https://api.github.com/repos/DataDog/datadog-trace-agent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DataDog/datadog-trace-agent/pulls/431/commits"},"statuses":{"href":"https://api.github.com/repos/DataDog/datadog-trace-agent/statuses/d7fa6e322444b3d55457a3cabd94d34ece7a6c0f"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"AlexJF","id":373323,"node_id":"MDQ6VXNlcjM3MzMyMw==","avatar_url":"https://avatars0.githubusercontent.com/u/373323?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexJF","html_url":"https://github.com/AlexJF","followers_url":"https://api.github.com/users/AlexJF/followers","following_url":"https://api.github.com/users/AlexJF/following{/other_user}","gists_url":"https://api.github.com/users/AlexJF/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexJF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexJF/subscriptions","organizations_url":"https://api.github.com/users/AlexJF/orgs","repos_url":"https://api.github.com/users/AlexJF/repos","events_url":"https://api.github.com/users/AlexJF/events{/privacy}","received_events_url":"https://api.github.com/users/AlexJF/received_events","type":"User","site_admin":false},"comments":7,"review_comments":17,"maintainer_can_modify":false,"commits":1,"additions":119,"deletions":0,"changed_files":2}}
{"actor":{"display_login":"AlexJF"}}