26
Distributed Tracing

Distributed Tracing

  • Upload
    soasme

  • View
    435

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Distributed Tracing

Distributed Tracing

Page 4: Distributed Tracing

What's this?

Page 5: Distributed Tracing

– wikipedia.org `Tracing(software)`

“In software engineering, tracing involves a specialized use of logging to record information

about a program's execution. ”

Page 6: Distributed Tracing

What is slow?

Page 7: Distributed Tracing

Who did wrong?

Page 8: Distributed Tracing

How?

Page 9: Distributed Tracing

Possible solution• Blackbox

• application-agnostic

• low correctness

• Unique identifier

• application-intrusive

• instrumentation for various transports

Page 10: Distributed Tracing
Page 11: Distributed Tracing

Pre-Order Traversal

• Log parent entering

• Log all children

• Log parent leaving

Page 12: Distributed Tracing

Zipkin Example

Page 13: Distributed Tracing

Some infrastructure

• HTTP: X-Header

• Thrift: add tracer

• RPC: god-mode

• ...

Page 14: Distributed Tracing

Clock skewcentral problem of distributed system

Page 15: Distributed Tracing

Things worth mentioned

• sampling

• reporting

• aggregate analysis

Page 16: Distributed Tracing

Zipkin

Page 17: Distributed Tracing

Annotationstring data associated with particular timestamp,

service, host, ...

Page 18: Distributed Tracing

Annotation Types• cs: client start

• sr: server receive

• ss: server send

• cr: client receive

• other: further insight of service

Page 19: Distributed Tracing

SpanA set of annotations, represents one specific method call.

Has name, id.

Page 20: Distributed Tracing

TraceA set of span all associated to the same request

Page 21: Distributed Tracing

Identifiers

• Trace ID

• Span ID

• Parent ID

Page 22: Distributed Tracing

Big Brother Bird• X-B3-TraceId: 64 encoeded bits

• X-B3-SpanId: 64 encoded bits

• X-B3-ParentSpanId: 64 encoded bits

• X-B3-Sampled: Boolean (1/0

• X-B3-Flags: a Long

Page 23: Distributed Tracing

Architecture

Page 24: Distributed Tracing

Some adjustment

• scribe -> fluentd + fluentd-plugin-scribe

• fiangle -> http-based intrakit

• serialization & deserialization annotations

Page 25: Distributed Tracing

Q&A

Page 26: Distributed Tracing

Thanks@soasme