Requst logging for all request on linkerd proxy

Hi Team,
I have deployed 3 microservices on kubrnetes and I have deployed linkerd as well. I am able to proxy the requests. I have two use cases :

  1. I need to trace all the calls between the microservices. Hence, I need a tracing id for all the successful as well as unsuccessful calls. Moreover, is there a way to add a unique id to the request entering the linkerd proxy ?
  2. I need to route requests based on the request body. Yes, this sounds odd but the use case demands the request body to be read and a logic to be applied to the routing based on the request body. So, is there a way to read the request at the linkerd proxy layer ?
  3. Can I log the request to a persistent database so that I can analyse the historical data to derive some meaningful insights? I read about prometheus and Grafana. But I want a simple solution.
    I am a newbie in the linkerd world, so please correct me if I have done anything wrong.

Thanks,
Gagan

  1. You can configure linkerd to use Zipkin to record traces, have a look at:
  1. There is currently no way to route on request body. It’s possible you could write a linkerd plugin to do this. A starting point is https://github.com/linkerd/linkerd-examples/tree/master/plugins/header-classifier.

  2. Prometheus and Grafana are relatively easy to integrate with linkerd. Note they only capture metrics (request volume, success rate, etc). If you need insights into the body of your requests, that would be custom work. A starting point is https://linkerd.io/config/1.3.1/linkerd/index.html#recent-requests.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.