Skip to content

Add Correlation Id Provider with Task#95

Open
VKAlwaysWin wants to merge 1 commit intostevejgordon:mainfrom
VKAlwaysWin:feature/correlation_id_provider_with_htask
Open

Add Correlation Id Provider with Task#95
VKAlwaysWin wants to merge 1 commit intostevejgordon:mainfrom
VKAlwaysWin:feature/correlation_id_provider_with_htask

Conversation

@VKAlwaysWin
Copy link

No description provided.

/// <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);

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

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;

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants