-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Parent Request Id is mislabeled as Correlation Id in log scope #5918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@ngbrown i.e. 'correlationId' looks like You are right that 'parent request id' is the correct name for it. Instead of adding parent Request-Id header value to logger scopes, we should use I believe @davidfowl hit a snag there because no instrumentation (i.e. Activity creation) happens in absence of ApplicaitonInsights or other tracing systems that lights-up hosting diagnostics. |
If If that can't be achieved, then I don't think it should be set with the current name at all. i.e. change the log scope/enrichment name to |
@lmolkova is right. Maybe we should just remove this from the logging scope altogether. |
Another issue is that the log context The spec says:
|
@davidfowl anything to do in 2.2? |
Yes, we should look at this in 2.2 and also look at disabling this by default because of the other security concerns raised here aspnet/Hosting#1385 |
@Tratcher thoughts? |
No specific thoughts, I wasn't involved in most of this work. @pakrym? |
@davidfowl Moving this out to 3.0.0. |
@pakrym thoughts on the scope of this one? You agree that removing it from logging scope is the right approach? |
I, unfortunately, don't have enough context on this. Would need to discuss with @davidfowl as it seems he understands what's wrong here. |
I want to agree here that |
Epic #8924 |
Needs similar design to #5926 |
This is done now |
See #9491 |
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 (noRequest-Id
header in the incoming HTTP request).There is documentation/specifications (mostly by @lmolkova) around these terms at:
Specifically in the Activity User Guide, it says:
I 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.In the current preview code, the Log scope outputs a
CorrelationId
which is the value of an incoming headerRequest-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.The text was updated successfully, but these errors were encountered: