Payment Service User Service Biller Gateways Payment Gateway Payment History DB DB What services and unit of work does this request touches What services are my customers Who is blocking me most of the time How does a request gets affected if I fail
Scoped. Can be stopped and started • Trace - Collection of spans that represents a single request • Tracer - Records timing and metadata about the operations that takes place in your application • Instrumentation - Happens inside your application using a tracer
{ // The span is in "scope" meaning downstream code such as loggers can see trace IDs return encoder.encode(); } catch (RuntimeException | Error e) { span.error(e); // Unless you handle exceptions, you might not know the operation failed! throw e; } finally { span.finish(); // always finish the span }
bottlenecks and the response time of various request during system failure • Measure latency improvements before and after refactoring the services • Understand the system architecture using Zipkin Dependencies and also identify non-conformant service communications that deviates from the design
low latency end-to-end is a must • Tracing provides detailed insight into component latencies for troubleshooting • Need to ensure as much of the flow as possible is traced, can't skip Pub/Sub, etc.
few years? “Graph analysis is probably the answer. tools like adaptive alerting pushing you insight based on anomalies and deltas in the traces going across the system. Similar to deltas in a metric value, but based on topology instead. Challenge to this would be the unstable nature of call graphs. For example, people are still increasing how many nodes are traced. This will mean that there will be shape differences due to a higher degree of instrumentation. The system will have to figure out the difference between things like this and things like orphaned services or problems. Another challenge is trace data is built to be lossy, the system will have to be able to tolerate missing parts of traces. It is likely commercial products already do some of this on the backend, but if brought to open source a lot of things could progress. For example deployment tools could know if they are causing vs fixing a problem. Tracing UIs could self-navigate or push suggestions instead of a query based approach. I think this would be very interesting.” - Adrian Cole
- https://gitter.im/openzipkin/zipkin Visit https://zipkin.io/ for more info Twitter Scala Days - https://portal.klewel.com/watch/webcast/scala-days-2019/talk/13/ Visualization - http://simianviz.surge.sh/netflix