yarpc / yab

Call and benchmark YARPC services from the command line.
MIT License
85 stars 33 forks source link

Add an option to force capture of Jaeger traces #414

Closed jquirke closed 3 months ago

jquirke commented 3 months ago

Currently, the existing --jaeger flag adds trace, span and parent span information to outgoing RPCs.

However it does not set the sampling bit, which means analysing the trace is impossible if the backend infrastructure is not recording the distributed trace.

This new option --force-jaeger-sample ensures that every originating yab RPC is captured, most useful in the single yab (non benchmarking) case.

It uses constSampler with a decision value of true to ensure the sampling bit in the Jaeger headers. See: https://www.jaegertracing.io/docs/1.22/client-libraries/#tracespan-identity