Distributed Systems By Aaron Stannard, CEO, Petabridge What Were - - PowerPoint PPT Presentation

distributed systems
SMART_READER_LITE
LIVE PREVIEW

Distributed Systems By Aaron Stannard, CEO, Petabridge What Were - - PowerPoint PPT Presentation

Distributed Tracing: How the Pros Debug Concurrent and Distributed Systems By Aaron Stannard, CEO, Petabridge What Were Going to Cover Microservices and common people problems they cause How distributed tracing solves some of


slide-1
SLIDE 1

Distributed Tracing: How the Pros Debug Concurrent and Distributed Systems

By Aaron Stannard, CEO, Petabridge

slide-2
SLIDE 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
slide-3
SLIDE 3

Monoliths and Microservices

slide-4
SLIDE 4

Microservices are for Scaling People

slide-5
SLIDE 5

Microservice People Problems

slide-6
SLIDE 6

Enter Distributed Tracing

slide-7
SLIDE 7

Distributed Tracing Features

slide-8
SLIDE 8

Collecting Distributed Traces

slide-9
SLIDE 9

Tracing Output

slide-10
SLIDE 10

Popular Tracing Implementations

slide-11
SLIDE 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

slide-12
SLIDE 12

OpenTracing Terminology

slide-13
SLIDE 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();

slide-14
SLIDE 14

Trace Propagation

slide-15
SLIDE 15

Carrier Formats

B3 HTTP Headers: X-B3-TraceId: EFFC1D X-B3-ParentSpanId: ACC1DD X-B3-SpanId: 100FFD X-B3-Sampled: 0

slide-16
SLIDE 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

slide-17
SLIDE 17

Further Reading

  • http://opentracing.io
  • https://zipkin.io/
  • https://github.com/openzipkin/docker-zipkin