Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Introduction to Distributed Tracing

645 views

Published on

As more and more developers move to distributed architectures such as micro services, distributed actor systems, and so forth it becomes increasingly complex to understand, debug, and diagnose.

In this talk we're going to introduce the emerging OpenTracing standard and talk about how you can instrument your applications to help visualize every operation, even across process and service boundaries. We'll also introduce Zipkin, one of the most popular implementations of the OpenTracing standard.

Published in: Data & Analytics
  • Login to see the comments

Introduction to Distributed Tracing

  1. 1. Distributed Tracing: How the Pros Debug Concurrent and Distributed Systems By Aaron Stannard, CEO, Petabridge
  2. 2. What We’re Going to Cover • Microservices and common “people” problems they cause • How distributed tracing solves some of these problems • What distributed tracing is and how it works • The OpenTracing standard and its implementations • Distributed tracing best practices
  3. 3. Monoliths and Microservices
  4. 4. Microservices are for Scaling People
  5. 5. Microservice People Problems
  6. 6. Enter Distributed Tracing
  7. 7. Distributed Tracing Features
  8. 8. Collecting Distributed Traces
  9. 9. Tracing Output
  10. 10. Popular Tracing Implementations
  11. 11. OpenTracing • Vendor-neutral standard for facilitating distributed tracing • Enforces a common lexicon across all tracing products • Helps library and framework maintainers implement tracing • Defines common carrier formats for propagating traces between services
  12. 12. OpenTracing Terminology
  13. 13. Collecting Trace Data (Code) var url = "http://localhost:9411"; ITracer tracer = new ZipkinTracer(new ZipkinTracerOptions(url, "DemoApp", debug: true)); ISpanBuilder sb = null; ISpan current = tracer.ActiveSpan; sb = tracer.BuildSpan("actual-op").WithTag("empty", false); if (current != null) { current.Finish(); sb = sb.AsChildOf(current); } current = sb.Start(); current.Finish();
  14. 14. Trace Propagation
  15. 15. Carrier Formats B3 HTTP Headers: X-B3-TraceId: EFFC1D X-B3-ParentSpanId: ACC1DD X-B3-SpanId: 100FFD X-B3-Sampled: 0
  16. 16. Best Practices • Standardize on carrier formats inside your services – i.e. B3 HTTP headers, dictionary formats • Introduce tracing at the infrastructure level, if you can – i.e. inject into HTTP request processing pipeline • Use OpenTracing IScopeManager – Automatically resolves current active Span • Have logging infrastructure inject events into active span
  17. 17. Further Reading • http://opentracing.io • https://zipkin.io/ • https://github.com/openzipkin/docker- zipkin

×