Open shafreenAnfar opened 2 years ago
At the moment this is a bit hectic in Ballerina because you need to pass around the inbound request headers all the way to the http:Client
action. Doing so also sort of get mixed with business logic, which reduces the readability of the code.
HTTP header propagation from one service to another is a common requirement in microservices deployments. Most importantly this is needed to enable distributed tracing.
Following is how you can achieve this requirement using Feign (Spring Boot). It uses request interceptors for this. Just adding the below interceptor would make sure all the outbound requests would include all the inbound request headers which starts with
x-
.