-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Add Correlation Id Provider with Task #95
base: main
Are you sure you want to change the base?
Add Correlation Id Provider with Task #95
Conversation
@@ -12,6 +13,6 @@ public interface ICorrelationIdProvider | |||
/// </summary> | |||
/// <param name="context">The <see cref="HttpContext"/> of the current request.</param> | |||
/// <returns>A string representing the correlation ID.</returns> | |||
string GenerateCorrelationId(HttpContext context); | |||
Task<string> GenerateCorrelationId(HttpContext context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the method is now async
, it should probably be named GenerateCorrelationIdAsync
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are your thoughts on accepting a CancellationToken
as well?
{ | ||
return null; | ||
} | ||
public Task<string> GenerateCorrelationId(HttpContext _) => null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this implementation be Task.FromResult<string>(null);
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
No description provided.