Skip to content

Tennant Middleware is not storing the correlation id in the HttpContext #355

@StuartFerguson

Description

@StuartFerguson

In InvokeAsync of the TennantMiddleware this block:

if (correlationId != Guid.Empty)
{
    tenantContext.SetCorrelationId(correlationId);
}

needs to be updated to this:

if (correlationId != Guid.Empty)
{
    tenantContext.SetCorrelationId(correlationId);
    context.Items[KeyNameCorrelationId] = correlationId.ToString(); // make it accessible to HttpClient handlers
}

This will allow client calls to pass on the correlation id to the next link in the HTTP chain

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBugs and error-prone code

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions