Upgrade to Pro — share decks privately, control downloads, hide ads and more …

I see what you did there! (Tracing in Go) - Maximilian Bischoff & Johannes Scheuermann - Inovex

GoDays
January 22, 2020

I see what you did there! (Tracing in Go) - Maximilian Bischoff & Johannes Scheuermann - Inovex

One of the main challenges brought by distributed systems is observability. Besides monitoring and logging, distributed tracing is emerging as a new tool for showing what is going on under the hood.
In our talk we introduce the concept of tracing, what a trace consists of and how it is collected, as well as the different tools and formats of traces. We also show how traces can be generated and delivered from functions in Golang and how header propagation can be used to complete traces in more complex setups.

GoDays

January 22, 2020
Tweet

More Decks by GoDays

Other Decks in Technology

Transcript

  1. 3

  2. 4

  3. 5 • Instrumentation doesn’t show causality ◦ or it’s pretty

    hard (logs) • Main feature is correlation between events • “I want to know why call X didn’t work” • “Why is Y so slow ?” • “How do we optimize the performance”
  4. 6

  5. 8

  6. Trace: xyz 10 Service A Service B Tracing Backend Database

    add_usr add_usr Service A traceId: xyz spanId: 123 parentId: nil id: 123
  7. Trace: xyz https://www.w3.org/TR/trace-context-1/#trace-id 11 Service A Service B Tracing Backend

    Database add_usr POST /users traceId: xyz parentId: 123 traceId: xyz spanId: 123 parentId: nil post_users traceId: xyz spanId: 456 parentId: 123 add_usr Service A id: 123 post_users id: 456 Service B
  8. Trace: xyz https://www.w3.org/TR/trace-context-1/#trace-id 12 Service A Service B Tracing Backend

    Database add_usr POST /users traceId: xyz parentId: 123 traceId: xyz spanId: 123 parentId: nil post_users traceId: xyz spanId: 456 parentId: 123 add_usr Service A id: 123 post_users id: 456 Service B INSERT user traceId: xyz parentId: 456 insert_user traceId: xyz spanId: 789 parentId: 456 insert_user id: 789 Database
  9. 13

  10. 15

  11. • Brings a huge value ◦ Very useful in distributed

    systems • Relativ simple to implement • Can produce quite a lot of data • Definitely worth a look • OpenTracing offers a bunch of libraries 16
  12. Maximilian Bischoff IT Engineering & Operations inovex GmbH Ludwig-Erhard-Allee 6

    76131 Karlsruhe maximilian.bischoff@ inovex.de Johannes Scheuermann IT Engineering & Operations inovex GmbH Ludwig-Erhard-Allee 6 76131 Karlsruhe johannes.scheuermann@ inovex.de