Slide 1

Slide 1 text

1 Expedia Group Proprietary and Confidential Instrumentation: Fly safe in production Distributed Tracing NYC Meetup

Slide 2

Slide 2 text

2 Expedia Group Proprietary and Confidential José Carlos Chávez ● Software Engineer at Expedia ● Zipkin core team and open source contributor @jcchavezs

Slide 3

Slide 3 text

3 Expedia Group Proprietary and Confidential Instrumentation @jcchavezs

Slide 4

Slide 4 text

4 Expedia Group Proprietary and Confidential It is the act of measurement properties of relevant events in the software operations. e.g. - request.sent (method, URI, body.size) - response.received (status_code, error) What is instrumentation? @jcchavezs

Slide 5

Slide 5 text

5 Expedia Group Proprietary and Confidential What is instrumentation? https://twitter.com/autoletics/status/1163345131128401920 @jcchavezs

Slide 6

Slide 6 text

6 Expedia Group Proprietary and Confidential Instrumentation is a step towards increasing observability, but it’s not observability in itself. One instruments and monitors a system as part of a broader strategy to make the system more observable. The goal of instrumentation @jcchavezs

Slide 7

Slide 7 text

7 Expedia Group Proprietary and Confidential Both are the two faces of the same coin, what is instrumented for observation dictates the degree of controllability the system has. Observability vs Controllability @jcchavezs

Slide 8

Slide 8 text

8 Expedia Group Proprietary and Confidential Stopover 1: Consuming instrumentation @jcchavezs

Slide 9

Slide 9 text

9 Expedia Group Proprietary and Confidential Adding instrumentation should be part of the software building process (rather proactive than reactive) As a user, one should focus on: ● Understand the use case to choose the right instrument ● Avoid writing manual or custom instrumentation ● Consider costs and privacy Consuming instrumentation @jcchavezs

Slide 10

Slide 10 text

10 Expedia Group Proprietary and Confidential Stopover 2: Writing instrumentable code @jcchavezs

Slide 11

Slide 11 text

11 Expedia Group Proprietary and Confidential Code that was designed with instrumentation as a first-class use case and that organically allows users to plug instrumentation on it. What is instrumentable code? @jcchavezs

Slide 12

Slide 12 text

12 Expedia Group Proprietary and Confidential Classically, instrumentation should focus on latency source or error prone operations but there are more factors to take into consideration: ● relevant events and properties ● collecting more data doesn't mean it can be analyzed ● operational costs What to allow for instrumentation @jcchavezs

Slide 13

Slide 13 text

13 Expedia Group Proprietary and Confidential ● Aim for well known patterns: ○ decoration (example) ○ event listeners (example) ○ middlewares (example) ○ interceptors (example) ● Focus on events to describe operations (example) ● When possible, use standard components (e.g. standard libraries, http client, sql driver) Rules of thumb for instrumentable code @jcchavezs

Slide 14

Slide 14 text

14 Expedia Group Proprietary and Confidential ● Don’t dictate the instrument ● Don’t restrict measures ● Don’t dispose of behavior Rules of thumb for accepting instrumentation @jcchavezs

Slide 15

Slide 15 text

15 Expedia Group Proprietary and Confidential ● For API designers, instrumentation should be a first class use case. ● The fewer assumptions about type of instrumentation, the better. ● The more relevant data instrumentation can collect, the better. In summary @jcchavezs

Slide 16

Slide 16 text

16 Expedia Group Proprietary and Confidential Stopover 3: Writing instrumentation

Slide 17

Slide 17 text

17 Expedia Group Proprietary and Confidential ● Easy to use and to adopt. ● Negligible impact in performance. ● Flexible collection based on user needs. ● Keeps the focus on relevant data. What is good instrumentation? @jcchavezs

Slide 18

Slide 18 text

18 Expedia Group Proprietary and Confidential ● Don’t ignore costs. ● Don’t ignore privacy and security. ● All components -not just critical services- should be instrumented. ● Be in control to what users can do on top of it What instrumentation should consider? @jcchavezs

Slide 19

Slide 19 text

19 Expedia Group Proprietary and Confidential As a user: choose the right (existing) instrumentation, help your future you by adding it. As a framework/library author: bear in mind instrumentation, use standard components when possible. As an instrumentation author: focus on UX, don’t allow introducing bugs on instrumentation. TL;DR @jcchavezs

Slide 20

Slide 20 text

20 Expedia Group Proprietary and Confidential Gracias Q & A

Slide 21

Slide 21 text

21 Expedia Group Proprietary and Confidential Read more about the topic on: ● Is Operational Sympathy A (Good) Thing? - @autoletics ● Go for industrial programming - @peterbourgon ● Brave instrumentation - Zipkin authors Look around