Skip to content

Commit 2693b10

Browse files
author
Adrian Cole
committed
Adds diagram showing trace instrumentation's role in architecture
1 parent 2447937 commit 2693b10

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

pages/architecture.md

+55
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,61 @@ Here's a diagram describing this flow:
3333
To see if an instrumentation library already exists for your platform, see the
3434
list of [existing instrumentations]({{ site.github.url}}/pages/existing_instrumentations).
3535

36+
Example flow
37+
-----------------------
38+
39+
As mentioned in the overview, identifiers are sent in-band and details are sent
40+
out-of-band to Zipkin. In both cases, trace instrumentation is responsible for
41+
creating valid traces and rendering them properly. For example, a tracer ensures
42+
parity between the data it sends in-band (downstream) and out-of-band (async to
43+
Zipkin).
44+
45+
Here's an example sequence of http tracing. Notice timing data is reported to
46+
Zipkin after the application response is completed.
47+
48+
49+
```
50+
┌─────────────┐ ┌───────────────────────┐ ┌─────────────┐ ┌─────────────────┐
51+
│ Application │ │ Trace Instrumentation │ │ Http Client │ │ Zipkin Collector│
52+
└─────────────┘ └───────────────────────┘ └─────────────┘ └─────────────────┘
53+
│ │ │ │
54+
┌─────────┐
55+
│ ──┤GET /foo ├──▶│ ────┐ │ │
56+
└─────────┘ │ record tags
57+
│ │ ◀───┘ │ │
58+
────┐
59+
│ │ │ add trace headers │ │
60+
◀───┘
61+
│ │ ────┐ │ │
62+
│ record timestamp
63+
│ │ ◀───┘ │ │
64+
┌─────────────────┐
65+
│ │ ──┤GET /foo ├─▶ │ │
66+
│X-B3-TraceId: aa │ ────┐
67+
│ │ │X-B3-SpanId: 6b │ │ │ │
68+
└─────────────────┘ │ remote
69+
│ │ │ │ request │
70+
71+
│ │ │ │ │
72+
┌────────┐ ◀───┘
73+
│ │◀──────┤200 OK ├────────│ │
74+
────┐ └────────┘
75+
│ │ │ record duration │ │
76+
┌────────┐ ◀───┘
77+
│◀───┤200 OK ├───│ │ │
78+
└────────┘ ┌────────────────────────────────┐
79+
│ │───┤asynchronously report span ├────▶ │
80+
│ │
81+
│{ │
82+
│ "traceId": "ab", │
83+
│ "id": "6b", │
84+
│ "name": "get", │
85+
│ "timestamp": 1483945573944000,│
86+
│ "duration": 386000, │
87+
│ "annotations": [ │
88+
│--snip-- │
89+
└────────────────────────────────┘
90+
```
3691

3792
Transport
3893
---------

public/css/zipkin.css

+6
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ figure.highlight pre code {
3535
overflow-x: auto;
3636
word-wrap: normal;
3737
}
38+
pre {
39+
white-space: pre;
40+
display: block;
41+
overflow-x: auto;
42+
word-wrap: normal;
43+
}
3844

3945
/* Some tables need to be wide to make sense of them, even if it breaks the design and responsiveness */
4046
table.wide-table td {

0 commit comments

Comments
 (0)