jaeger sampling configuration for ingress or per service

3/13/2020

In a typical kubernetes based deployment with frontend as traefik and backend as different microservices, we want to sample a fixed percentage of every endpoint being accessed. As jaeger head based sampling works by making the sampling decision on starting the first span, this span would be created at ingress (traefik) level, and the sampling decision will be carried forward to all the backend services.

  1. Since traefik is a frontend of all requests, I am confused if the microservices should have their own sampling strategies or just rely on traefik's sampling config (and at backend microservices I should define sampling config to sample all requests) - as the decision would always be made on traefik level only and microservices will just follow that sampling decision? Or is this understanding incorrect?

  2. Another related question is that in traefik the span operationName is generic based on the route configured - it doesn't contain the endpoint being accessed, just the host name - so how to achieve per endpoint sampling percentage?

-- naresh
jaeger
kubernetes-ingress
opentracing
sampling

0 Answers