{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/issues/1982","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/issues/1982/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/issues/1982/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/issues/1982/events","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-dotnet/issues/1982","id":304007730,"number":1982,"title":"Feature Request: Warn the user if they call app.UseGoogleTrace() after app.UseMvc()","user":{"login":"SurferJeffAtGoogle","id":11778530,"avatar_url":"https://avatars3.githubusercontent.com/u/11778530?v=4","gravatar_id":"","url":"https://api.github.com/users/SurferJeffAtGoogle","html_url":"https://github.com/SurferJeffAtGoogle","followers_url":"https://api.github.com/users/SurferJeffAtGoogle/followers","following_url":"https://api.github.com/users/SurferJeffAtGoogle/following{/other_user}","gists_url":"https://api.github.com/users/SurferJeffAtGoogle/gists{/gist_id}","starred_url":"https://api.github.com/users/SurferJeffAtGoogle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SurferJeffAtGoogle/subscriptions","organizations_url":"https://api.github.com/users/SurferJeffAtGoogle/orgs","repos_url":"https://api.github.com/users/SurferJeffAtGoogle/repos","events_url":"https://api.github.com/users/SurferJeffAtGoogle/events{/privacy}","received_events_url":"https://api.github.com/users/SurferJeffAtGoogle/received_events","type":"User","site_admin":false},"labels":[{"id":448079470,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/labels/api:%20trace","name":"api: trace","color":"f8f8f8","default":false},{"id":544302054,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/labels/priority:%20p2","name":"priority: p2","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":{"login":"evildour","id":4014815,"avatar_url":"https://avatars2.githubusercontent.com/u/4014815?v=4","gravatar_id":"","url":"https://api.github.com/users/evildour","html_url":"https://github.com/evildour","followers_url":"https://api.github.com/users/evildour/followers","following_url":"https://api.github.com/users/evildour/following{/other_user}","gists_url":"https://api.github.com/users/evildour/gists{/gist_id}","starred_url":"https://api.github.com/users/evildour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evildour/subscriptions","organizations_url":"https://api.github.com/users/evildour/orgs","repos_url":"https://api.github.com/users/evildour/repos","events_url":"https://api.github.com/users/evildour/events{/privacy}","received_events_url":"https://api.github.com/users/evildour/received_events","type":"User","site_admin":false},"assignees":[{"login":"evildour","id":4014815,"avatar_url":"https://avatars2.githubusercontent.com/u/4014815?v=4","gravatar_id":"","url":"https://api.github.com/users/evildour","html_url":"https://github.com/evildour","followers_url":"https://api.github.com/users/evildour/followers","following_url":"https://api.github.com/users/evildour/following{/other_user}","gists_url":"https://api.github.com/users/evildour/gists{/gist_id}","starred_url":"https://api.github.com/users/evildour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evildour/subscriptions","organizations_url":"https://api.github.com/users/evildour/orgs","repos_url":"https://api.github.com/users/evildour/repos","events_url":"https://api.github.com/users/evildour/events{/privacy}","received_events_url":"https://api.github.com/users/evildour/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2018-03-09T23:02:03Z","updated_at":"2018-03-30T17:26:38Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"If they call `app.UseGoogleTrace()` after `app.UseMvc()` they'll see no errors and no warnings and no traces, and have no clue why.\r\n\r\nIf there is a way to detect and warn users in this scenario, that would save them a lot of time."},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/issues/comments/377576217","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-dotnet/issues/1982#issuecomment-377576217","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/issues/1982","id":377576217,"user":{"login":"iantalarico","id":5264734,"avatar_url":"https://avatars0.githubusercontent.com/u/5264734?v=4","gravatar_id":"","url":"https://api.github.com/users/iantalarico","html_url":"https://github.com/iantalarico","followers_url":"https://api.github.com/users/iantalarico/followers","following_url":"https://api.github.com/users/iantalarico/following{/other_user}","gists_url":"https://api.github.com/users/iantalarico/gists{/gist_id}","starred_url":"https://api.github.com/users/iantalarico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iantalarico/subscriptions","organizations_url":"https://api.github.com/users/iantalarico/orgs","repos_url":"https://api.github.com/users/iantalarico/repos","events_url":"https://api.github.com/users/iantalarico/events{/privacy}","received_events_url":"https://api.github.com/users/iantalarico/received_events","type":"User","site_admin":false},"created_at":"2018-03-30T17:26:38Z","updated_at":"2018-03-30T17:26:38Z","author_association":"MEMBER","body":"The ordering of these depends on how they are called so for example if we have:\r\n```\r\napp.UseMvc();\r\napp.UseGoogleTrace();\r\n```\r\n\r\nIt's calls will end up like this:\r\n```\r\n// state mvc request\r\n// start trace\r\n// end trace\r\n// end mvc request.\r\n```\r\n\r\nWhere if we do the opposite we have:\r\n\r\n```\r\napp.UseGoogleTrace();\r\napp.UseMvc();\r\n```\r\n\r\nWhich leads to:\r\n```\r\n// start trace\r\n// state mvc request\r\n// end mvc request.\r\n// end trace\r\n```\r\n\r\nResponses to your questions:\r\n1. In the first case we literately trace nothing.  While in the second we trace the mvc request.  Ideally we would like the UseGoogleTrace before most things so we can trace the full request.\r\n\r\n2. (and 3) Yes this could happen with any extension. The goal with this is to catch some cases which are probably and accident. (unlikely a user wants to use trace and not capture mvc requests).  We can always add more checks as we see issues.\r\n\r\n4. It can be used either way.\r\n\r\n5.  No I don't think we should ever fix it as there could be reasons for this just a warning so if they do not see traces and look at logs they will see the message.\r\n"}}
{"actor":{"display_login":"iantalarico"}}