I have ASP.NET project (.NET5) and sent requests to another API by HttpClient. Also I add ElasticAPM to my project. When I send a request Elastic add distributed tracing headers: traceparent, ... I want to remove this headers, but only in one part of code where I create HttpClient, in another parts i want to save this headers.
I was trying to create custom DelegatingHandler, it's not working, also I try to remove DefaultRequestHeaders from client after creating, it's not working too.