1

We have many microservices in the system. I want to build a Java library to propagate auth tokens to each service request.

  1. I can intercept HHTP headers and write a custom interceptor for each client like RestTemplate, WebClient to inject headers. The problem here is it I have to write for each request library and then ask service owners to inject this interceptor.

  2. I got to know about open telemetry (Java auto instrumentation). Is there a way to add custom headers either in source code or implement some class and build a new agent which can be integrated into all microservices running in Java?

Ankur Verma
  • 75
  • 1
  • 12

0 Answers0