{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Hosting/issues/1384","repository_url":"https://api.github.com/repos/aspnet/Hosting","labels_url":"https://api.github.com/repos/aspnet/Hosting/issues/1384/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Hosting/issues/1384/comments","events_url":"https://api.github.com/repos/aspnet/Hosting/issues/1384/events","html_url":"https://github.com/aspnet/Hosting/issues/1384","id":314743323,"node_id":"MDU6SXNzdWUzMTQ3NDMzMjM=","number":1384,"title":"Parent Request Id is mislabeled as Correlation Id in log scope","user":{"login":"ngbrown","id":228987,"node_id":"MDQ6VXNlcjIyODk4Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/228987?v=4","gravatar_id":"","url":"https://api.github.com/users/ngbrown","html_url":"https://github.com/ngbrown","followers_url":"https://api.github.com/users/ngbrown/followers","following_url":"https://api.github.com/users/ngbrown/following{/other_user}","gists_url":"https://api.github.com/users/ngbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/ngbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngbrown/subscriptions","organizations_url":"https://api.github.com/users/ngbrown/orgs","repos_url":"https://api.github.com/users/ngbrown/repos","events_url":"https://api.github.com/users/ngbrown/events{/privacy}","received_events_url":"https://api.github.com/users/ngbrown/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/aspnet/Hosting/milestones/32","html_url":"https://github.com/aspnet/Hosting/milestone/32","labels_url":"https://api.github.com/repos/aspnet/Hosting/milestones/32/labels","id":2895574,"node_id":"MDk6TWlsZXN0b25lMjg5NTU3NA==","number":32,"title":"2.2.0","description":null,"creator":{"login":"muratg","id":1808428,"node_id":"MDQ6VXNlcjE4MDg0Mjg=","avatar_url":"https://avatars3.githubusercontent.com/u/1808428?v=4","gravatar_id":"","url":"https://api.github.com/users/muratg","html_url":"https://github.com/muratg","followers_url":"https://api.github.com/users/muratg/followers","following_url":"https://api.github.com/users/muratg/following{/other_user}","gists_url":"https://api.github.com/users/muratg/gists{/gist_id}","starred_url":"https://api.github.com/users/muratg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muratg/subscriptions","organizations_url":"https://api.github.com/users/muratg/orgs","repos_url":"https://api.github.com/users/muratg/repos","events_url":"https://api.github.com/users/muratg/events{/privacy}","received_events_url":"https://api.github.com/users/muratg/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":6,"state":"open","created_at":"2017-11-07T22:22:28Z","updated_at":"2018-10-22T20:30:09Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2018-04-16T17:08:50Z","updated_at":"2018-10-22T20:30:56Z","closed_at":null,"author_association":"NONE","body":"For the upcoming for ASP.Net Core 2.1; pull #1138 added to the log scope a `CorrelationId`, but the contents are only the parent request identifier and does not appear to be set if there was no parent request (no `Request-Id` header in the incoming HTTP request).\r\n\r\nThere is documentation/specifications (mostly by @lmolkova) around these terms at:\r\n\r\n* [HttpCorrelationProtocol](https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md)\r\n* [FlatRequestId](https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/FlatRequestId.md)\r\n* [HierarchicalRequestId](https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HierarchicalRequestId.md)\r\n\r\nSpecifically in the [Activity User Guide](https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/ActivityUserGuide.md), it says:\r\n\r\n> When application calls external dependency to complete an operation, it may need to pass some of the context (e.g. ___correlation id___) [emphasis added] along with dependency call to be able to correlate logs from multiple service.\r\n\r\nI see that the expectation is that in the logs, there will be a \"correlation id\" of the context, or `CorrelationId` if you will, that can be used to link the logs entries across multiple services handling a single user request.\r\n\r\nIn the current preview code, the Log scope outputs a `CorrelationId` which is the value of an incoming header `Request-Id`, and only if that header is set.  This is not useful for seeing the entire request across multiple services in the logs.  What is needed is adding to the log scope the root request id to the log scope of all services involved in handling the request, including within the root service that generated the first request id.\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/Hosting/issues/comments/431972995","html_url":"https://github.com/aspnet/Hosting/issues/1384#issuecomment-431972995","issue_url":"https://api.github.com/repos/aspnet/Hosting/issues/1384","id":431972995,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTk3Mjk5NQ==","user":{"login":"muratg","id":1808428,"node_id":"MDQ6VXNlcjE4MDg0Mjg=","avatar_url":"https://avatars3.githubusercontent.com/u/1808428?v=4","gravatar_id":"","url":"https://api.github.com/users/muratg","html_url":"https://github.com/muratg","followers_url":"https://api.github.com/users/muratg/followers","following_url":"https://api.github.com/users/muratg/following{/other_user}","gists_url":"https://api.github.com/users/muratg/gists{/gist_id}","starred_url":"https://api.github.com/users/muratg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muratg/subscriptions","organizations_url":"https://api.github.com/users/muratg/orgs","repos_url":"https://api.github.com/users/muratg/repos","events_url":"https://api.github.com/users/muratg/events{/privacy}","received_events_url":"https://api.github.com/users/muratg/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T20:30:56Z","updated_at":"2018-10-22T20:30:56Z","author_association":"MEMBER","body":"@davidfowl Moving this out to 3.0.0. "}}
{"actor":{"display_login":"muratg"}}