Skip to content

Zipkin 2.3

Compare
Choose a tag to compare
@codefromthecrypt codefromthecrypt released this 13 Nov 09:47
· 1612 commits to master since this release

Zipkin 2.3 allows querying across all services and introduces Cassandra 3 support

Exploring all data

In the past, the zipkin UI required specifying a service name. This is ok when you know which service you are interested in, but it isn't helpful to explore all data. Now, Zipkin defaults to search across all services.

For example, the below looks for a trace containing an http path and at least 15 milliseconds to complete
screen shot 2017-11-13 at 5 18 15 pm

Thanks @xqliang on helping with the code on this.

Cassandra 3 support

Cassandra has been a supported storage option in Zipkin for over 5 years. Thanks to immense help from @michaelsembwever and @llinder we have a modernized option taking advantage of Cassandra v3.9+ features and Zipkin v2 data format.

Cassandra is a very capable backend. It supports data expiration (TTL) and has powerful replication models which can simplify your ability to trace even across regions. However, if you used our cassandra schema, you'd notice it wasn't great for browsing: Our schema stored encoded thrift blobs, so you couldn't meaningfully query it in CQL. Moreover, our duration query support was problematic to the point of being a pulled feature.

The "cassandra3" storage type eliminates these problems, retaining all the strengths. It installs automatically into the "zipkin2" keyspace, corresponding with what the data structures look like. You need Cassandra v3.9+ (we test on 3.11.1 which is latest). Look at our README for technical details about the schema.

What's notable about this is that the schema now is a span model, as opposed to serialized thrifts. This means you can look at the data in cqlsh and make sense of it. For example, the trace ID is the same hex as B3 headers, which means you can literally paste into CQL if you want.

While most will use zipkin's UI, some of you will like being able to write queries like below:

cqlsh:zipkin2> select trace_id, toTimestamp(ts) as timestamp, duration as duration_micros, minus(writetime(span), plus(ts,duration)) as write_lag_micros, span as name, value(tags, 'http.path') as path, l_service from span limit 10;

 trace_id         | timestamp                       | duration_micros | write_lag_micros | name | path | l_service
------------------+---------------------------------+-----------------+------------------+------+------+-----------
 907a5124315b2cc1 | 2017-11-13 08:16:39.365000+0000 |             634 |           810418 |  get | /api |   backend
 907a5124315b2cc1 | 2017-11-13 08:16:39.364000+0000 |            1693 |           810891 |  get | /api |  frontend
 907a5124315b2cc1 | 2017-11-13 08:16:39.363000+0000 |            2891 |           810507 |  get |    / |  frontend
 d7f8afc80b3f357b | 2017-11-13 08:14:50.478000+0000 |             616 |           288349 |  get | /api |   backend
 d7f8afc80b3f357b | 2017-11-13 08:14:50.476000+0000 |            3093 |           288574 |  get |    / |  frontend
 d7f8afc80b3f357b | 2017-11-13 08:14:50.476000+0000 |            1687 |           289084 |  get | /api |  frontend
 2483c223283177d2 | 2017-11-13 08:14:48.527000+0000 |             895 |          1129547 |  get | /api |   backend
 2483c223283177d2 | 2017-11-13 08:14:48.523000+0000 |            4125 |          1130022 |  get | /api |  frontend
 2483c223283177d2 | 2017-11-13 08:14:48.522000+0000 |            6171 |          1131768 |  get |    / |  frontend
 4ff33dd90b4f8f61 | 2017-11-13 08:16:37.350000+0000 |             659 |           798568 |  get | /api |   backend

(10 rows)

A severe amount of thanks is owed to @llinder (Lance) and @michaelsembwever (Mick). Lance has been piloting a beta model several months, fixing some issues like pagination and generally being first to fire. He also wrote a pilot version of the dependency linking spark job. Mick helped significantly with porting that work in progress to the simpler v2 span model, as well stress tests, advice, tons of advice, code, more code, and advice. Please reach out and thank these two for volunteering hard yards needed to reinvent our Cassandra model.