{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/pulls/comments/233941081","pull_request_review_id":175469790,"id":233941081,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzk0MTA4MQ==","diff_hunk":"@@ -18,6 +21,24 @@ public OperationFilteringTelemetryProcessor(ITelemetryProcessor next)\n \n         public void Process(ITelemetry item)\n         {\n+            // There are scenarios in Functions where we can have two TelemetryClients running for a short period.\n+            // We use this property to ensure we only send one of the RequestTelemetry objects (auto-tracked by App \n+            // Insights) to the server.\n+            if (item is RequestTelemetry request)\n+            {\n+                lock (_lock)\n+                {\n+                    if (request.Properties.ContainsKey(ProcessedKey))\n+                    {\n+                        return;\n+                    }\n+                    else\n+                    {\n+                        request.Properties[ProcessedKey] = \"1\";","path":"src/Microsoft.Azure.WebJobs.Logging.ApplicationInsights/Processors/OperationFilteringTelemetryProcessor.cs","position":35,"original_position":35,"commit_id":"8dc9684b9fb36aadd12af6500915aeafc17359e1","original_commit_id":"8dc9684b9fb36aadd12af6500915aeafc17359e1","user":{"login":"fabiocav","id":2507935,"node_id":"MDQ6VXNlcjI1MDc5MzU=","avatar_url":"https://avatars2.githubusercontent.com/u/2507935?v=4","gravatar_id":"","url":"https://api.github.com/users/fabiocav","html_url":"https://github.com/fabiocav","followers_url":"https://api.github.com/users/fabiocav/followers","following_url":"https://api.github.com/users/fabiocav/following{/other_user}","gists_url":"https://api.github.com/users/fabiocav/gists{/gist_id}","starred_url":"https://api.github.com/users/fabiocav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabiocav/subscriptions","organizations_url":"https://api.github.com/users/fabiocav/orgs","repos_url":"https://api.github.com/users/fabiocav/repos","events_url":"https://api.github.com/users/fabiocav/events{/privacy}","received_events_url":"https://api.github.com/users/fabiocav/received_events","type":"User","site_admin":false},"body":"What is inspecting this property?","created_at":"2018-11-15T17:35:33Z","updated_at":"2018-11-15T17:35:53Z","html_url":"https://github.com/Azure/azure-webjobs-sdk/pull/2013#discussion_r233941081","pull_request_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/pulls/2013","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk/pulls/comments/233941081"},"html":{"href":"https://github.com/Azure/azure-webjobs-sdk/pull/2013#discussion_r233941081"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk/pulls/2013"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/pulls/2013","id":231256451,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMjU2NDUx","html_url":"https://github.com/Azure/azure-webjobs-sdk/pull/2013","diff_url":"https://github.com/Azure/azure-webjobs-sdk/pull/2013.diff","patch_url":"https://github.com/Azure/azure-webjobs-sdk/pull/2013.patch","issue_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/2013","number":2013,"state":"open","locked":false,"title":"fixing issues with auto-tracking of Http and Service Bus triggers","user":{"login":"brettsam","id":1089915,"node_id":"MDQ6VXNlcjEwODk5MTU=","avatar_url":"https://avatars2.githubusercontent.com/u/1089915?v=4","gravatar_id":"","url":"https://api.github.com/users/brettsam","html_url":"https://github.com/brettsam","followers_url":"https://api.github.com/users/brettsam/followers","following_url":"https://api.github.com/users/brettsam/following{/other_user}","gists_url":"https://api.github.com/users/brettsam/gists{/gist_id}","starred_url":"https://api.github.com/users/brettsam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brettsam/subscriptions","organizations_url":"https://api.github.com/users/brettsam/orgs","repos_url":"https://api.github.com/users/brettsam/repos","events_url":"https://api.github.com/users/brettsam/events{/privacy}","received_events_url":"https://api.github.com/users/brettsam/received_events","type":"User","site_admin":false},"body":"While porting the new Http auto-tracking changes to Functions, I ran into a handful of issues that this commit now fixes:\r\n- Auto-tracked Service Bus requests were getting \"200\" status code. We now set this to \"0\".\r\n- The URL for auto-tracked Http requests contained the query string, which we want to prevent.\r\n- Because we overwrite Http request `Name` with the function name, we had lost the HttpMethod. I now pull that out and put it into the `HttpMethod` property, like we did in v1.\r\n- We were not looking at the function result when setting Success. This needs to be pulled from the `Suceeded` property and explicitly set on the telemetry. Fixes #2012.\r\n- During host restarts in Functions, it was possible for us to see auto-tracked `RequestTelemetry` flow through our initializers and processors twice. This is because one TelemetryClient was shutting down while another was starting up, and they were overlapping. Since they both watch for requests with DiagnosticListeners, they were both taking the request through their pipelines. I improved this by\r\n    - Making sure our initializers are idempotent. Even if a telemetry flows through twice, it ends up the same.\r\n    - Setting an explicit property when telemetry has already gone through the processor pipeline. If we see it again, we return without sending it to App Insights.\r\n\r\nTests have been beefed up, and new ones written, to cover all of this.","created_at":"2018-11-15T16:28:40Z","updated_at":"2018-11-15T17:35:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d359c754c2e4aea77a2281a8e093514a8c3e03b3","assignee":null,"assignees":[],"requested_reviewers":[{"login":"lmolkova","id":2347409,"node_id":"MDQ6VXNlcjIzNDc0MDk=","avatar_url":"https://avatars2.githubusercontent.com/u/2347409?v=4","gravatar_id":"","url":"https://api.github.com/users/lmolkova","html_url":"https://github.com/lmolkova","followers_url":"https://api.github.com/users/lmolkova/followers","following_url":"https://api.github.com/users/lmolkova/following{/other_user}","gists_url":"https://api.github.com/users/lmolkova/gists{/gist_id}","starred_url":"https://api.github.com/users/lmolkova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmolkova/subscriptions","organizations_url":"https://api.github.com/users/lmolkova/orgs","repos_url":"https://api.github.com/users/lmolkova/repos","events_url":"https://api.github.com/users/lmolkova/events{/privacy}","received_events_url":"https://api.github.com/users/lmolkova/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/pulls/2013/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/pulls/2013/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/2013/comments","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/statuses/8dc9684b9fb36aadd12af6500915aeafc17359e1","head":{"label":"brettsam:http","ref":"http","sha":"8dc9684b9fb36aadd12af6500915aeafc17359e1","user":{"login":"brettsam","id":1089915,"node_id":"MDQ6VXNlcjEwODk5MTU=","avatar_url":"https://avatars2.githubusercontent.com/u/1089915?v=4","gravatar_id":"","url":"https://api.github.com/users/brettsam","html_url":"https://github.com/brettsam","followers_url":"https://api.github.com/users/brettsam/followers","following_url":"https://api.github.com/users/brettsam/following{/other_user}","gists_url":"https://api.github.com/users/brettsam/gists{/gist_id}","starred_url":"https://api.github.com/users/brettsam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brettsam/subscriptions","organizations_url":"https://api.github.com/users/brettsam/orgs","repos_url":"https://api.github.com/users/brettsam/repos","events_url":"https://api.github.com/users/brettsam/events{/privacy}","received_events_url":"https://api.github.com/users/brettsam/received_events","type":"User","site_admin":false},"repo":{"id":52930359,"node_id":"MDEwOlJlcG9zaXRvcnk1MjkzMDM1OQ==","name":"azure-webjobs-sdk","full_name":"brettsam/azure-webjobs-sdk","private":false,"owner":{"login":"brettsam","id":1089915,"node_id":"MDQ6VXNlcjEwODk5MTU=","avatar_url":"https://avatars2.githubusercontent.com/u/1089915?v=4","gravatar_id":"","url":"https://api.github.com/users/brettsam","html_url":"https://github.com/brettsam","followers_url":"https://api.github.com/users/brettsam/followers","following_url":"https://api.github.com/users/brettsam/following{/other_user}","gists_url":"https://api.github.com/users/brettsam/gists{/gist_id}","starred_url":"https://api.github.com/users/brettsam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brettsam/subscriptions","organizations_url":"https://api.github.com/users/brettsam/orgs","repos_url":"https://api.github.com/users/brettsam/repos","events_url":"https://api.github.com/users/brettsam/events{/privacy}","received_events_url":"https://api.github.com/users/brettsam/received_events","type":"User","site_admin":false},"html_url":"https://github.com/brettsam/azure-webjobs-sdk","description":"Azure WebJobs SDK","fork":true,"url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk","forks_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/forks","keys_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/teams","hooks_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/hooks","issue_events_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/events","assignees_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/tags","blobs_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/languages","stargazers_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/stargazers","contributors_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/contributors","subscribers_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/subscribers","subscription_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/subscription","commits_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/merges","archive_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/downloads","issues_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/labels{/name}","releases_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/brettsam/azure-webjobs-sdk/deployments","created_at":"2016-03-02T03:26:09Z","updated_at":"2016-03-02T03:26:14Z","pushed_at":"2018-11-15T16:59:20Z","git_url":"git://github.com/brettsam/azure-webjobs-sdk.git","ssh_url":"git@github.com:brettsam/azure-webjobs-sdk.git","clone_url":"https://github.com/brettsam/azure-webjobs-sdk.git","svn_url":"https://github.com/brettsam/azure-webjobs-sdk","homepage":"","size":20059,"stargazers_count":0,"watchers_count":0,"language":"C#","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":2,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":2,"watchers":0,"default_branch":"dev"}},"base":{"label":"Azure:dev","ref":"dev","sha":"f990328a4799b777a559e4f239027bee1b68751b","user":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":21712185,"node_id":"MDEwOlJlcG9zaXRvcnkyMTcxMjE4NQ==","name":"azure-webjobs-sdk","full_name":"Azure/azure-webjobs-sdk","private":false,"owner":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Azure/azure-webjobs-sdk","description":"Azure WebJobs SDK","fork":false,"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk","forks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/forks","keys_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/teams","hooks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/events","assignees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/tags","blobs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/subscription","commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/merges","archive_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/downloads","issues_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/deployments","created_at":"2014-07-10T22:15:31Z","updated_at":"2018-11-15T03:05:12Z","pushed_at":"2018-11-15T16:59:22Z","git_url":"git://github.com/Azure/azure-webjobs-sdk.git","ssh_url":"git@github.com:Azure/azure-webjobs-sdk.git","clone_url":"https://github.com/Azure/azure-webjobs-sdk.git","svn_url":"https://github.com/Azure/azure-webjobs-sdk","homepage":"","size":19620,"stargazers_count":400,"watchers_count":400,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":199,"mirror_url":null,"archived":false,"open_issues_count":438,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":199,"open_issues":438,"watchers":400,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk/pulls/2013"},"html":{"href":"https://github.com/Azure/azure-webjobs-sdk/pull/2013"},"issue":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/2013"},"comments":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/2013/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk/pulls/2013/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk/pulls/2013/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk/statuses/8dc9684b9fb36aadd12af6500915aeafc17359e1"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"fabiocav"}}