Skip to content

Commit

Permalink
Adds diagram showing trace instrumentation's role in architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Cole committed Jan 13, 2017
1 parent 91aa9fa commit 5b86209
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
55 changes: 55 additions & 0 deletions pages/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,61 @@ Here's a diagram describing this flow:
To see if an instrumentation library already exists for your platform, see the
list of [existing instrumentations]({{ site.github.url}}/pages/existing_instrumentations).

Example flow
-----------------------

As mentioned in the overview, identifiers are sent in-band and details are sent
out-of-band to Zipkin. In both cases, trace instrumentation is responsible for
creating valid traces and rendering them properly. For example, a tracer ensures
parity between the data it sends in-band (downstream) and out-of-band (async to
Zipkin).

Here's an example sequence of http tracing where "Application" calls the
resource /foo. This results in a single span, sent asynchronously to Zipkin
after call completes.

```
┌─────────────┐ ┌───────────────────────┐ ┌─────────────┐ ┌──────────────────┐
│ Application │ │ Trace Instrumentation │ │ Http Client │ │ Zipkin Collector │
└─────────────┘ └───────────────────────┘ └─────────────┘ └──────────────────┘
│ │ │ │
┌─────────┐
│ ──┤GET /foo ├─▶ │ ────┐ │ │
└─────────┘ │ record tags
│ │ ◀───┘ │ │
────┐
│ │ │ add trace headers │ │
◀───┘
│ │ ────┐ │ │
│ record timestamp
│ │ ◀───┘ │ │
┌─────────────────┐
│ │ ──┤GET /foo ├─▶ │ │
│X-B3-TraceId: aa │ ────┐
│ │ │X-B3-SpanId: 6b │ │ │ │
└─────────────────┘ │ invoke
│ │ │ │ request │
│ │ │ │ │
┌────────┐ ◀───┘
│ │ ◀─────┤200 OK ├─────── │ │
────┐ └────────┘
│ │ │ record duration │ │
┌────────┐ ◀───┘
│ ◀──┤200 OK ├── │ │ │
└────────┘ ┌────────────────────────────────┐
│ │ ──┤ asynchronously report span ├────▶ │
│ │
│{ │
│ "traceId": "ab", │
│ "id": "6b", │
│ "name": "get", │
│ "timestamp": 1483945573944000,│
│ "duration": 386000, │
│ "annotations": [ │
│--snip-- │
└────────────────────────────────┘
```

Transport
---------
Expand Down
6 changes: 6 additions & 0 deletions public/css/zipkin.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ figure.highlight pre code {
overflow-x: auto;
word-wrap: normal;
}
pre {
white-space: pre;
display: block;
overflow-x: auto;
word-wrap: normal;
}

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

0 comments on commit 5b86209

Please sign in to comment.