Skip to content

EnableCallContextPropagation's configure input results in a global configuration, how to make this client specific? #1595

@EraYaN

Description

@EraYaN

So say I have two Grpc clients defined:

services
.AddGrpcClient<TClient>(o =>
{
    o.Address = clientOptions.Address;
})
.EnableCallContextPropagation(o =>
{
    o.SuppressContextNotFoundErrors = true
});

services
.AddGrpcClient<TClient2>(o =>
{
    o.Address = clientOptions.Address;
})
.EnableCallContextPropagation(o =>
{
    o.SuppressContextNotFoundErrors = false
});

When I now request a TClient instance from the container both of these configure handlers are run and the SuppressContextNotFoundErrors equals false. How do I make it so it does not do this, it should really only call one of these actions (the one that belongs to the specific client)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingquestionFurther information is requested

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions