Instrumenting client calls
Network calls are probably the most important thing to instrument in any distributed application since network and downstream services are unreliable and complex resources. In order to understand how our application works and breaks, we need to know how the services we depend on perform.
Network-level metrics can help us measure essential things such as latency, error rate, throughput, and the number of active requests and connections. Tracing enables context propagation and helps us see how requests flow through the system. So, if you instrument your application at all, you should start with incoming and outgoing requests.
When instrumenting the client side of calls, we need to pick the right level of the network stack. Do we want to trace TCP packets? Can we? The answer depends, but distributed tracing is usually applied on the application layer of the network stack where protocols such as HTTP or AMQP live.
In the case of HTTP on .NET, we apply...