0%

Book Description

Most applications today are distributed in some fashion. Monitoring the health and performance of these distributed architectures requires a new approach. Enter distributed tracing, a method of profiling and monitoring applications—especially those that use microservice architectures. There’s just one problem: distributed tracing can be hard. But it doesn’t have to be.

With this practical guide, you’ll learn what distributed tracing is and how to use it to understand the performance and operation of your software. Key players at LightStep walk you through instrumenting your code for tracing, collecting the data that your instrumentation produces, and turning it into useful, operational insights. If you want to start implementing distributed tracing, this book tells you what you need to know.

You’ll learn:

  • The pieces of a distributed tracing deployment: Instrumentation, data collection, and delivering value
  • Best practices for instrumentation (the methods for generating trace data from your service)
  • How to deal with or avoid overhead, costs, and sampling
  • How to work with spans (the building blocks of request-based distributed traces) and choose span characteristics that lead to valuable traces
  • Where distributed tracing is headed in the future

Table of Contents

  1. 1. What is Distributed Tracing?
    1. Distributed Architectures And You
    2. The Difficulties Of Monitoring Distributed Architectures
    3. How Does Distributed Tracing Help?
    4. Distributed Tracing And You
  2. 2. Breaking Down the Problem
    1. The Pieces of a Distributed Tracing Deployment
      1. Instrumentation
      2. Data Collection
      3. Delivering Value
    2. Distributed Tracing, Microservices, Serverless, Oh My!
    3. The Benefits of Tracing
    4. Setting The Table
  3. 3. An Ontology of Instrumentation
    1. White Box versus Black Box
    2. Application versus System
    3. Agents versus Libraries
    4. Propagating Context
      1. Interprocess Propagation
      2. Intraprocess Propagation
    5. The Shape of Distributed Tracing
      1. Tracing-friendly microservices and serverless
      2. Tracing in a monolith
      3. Tracing in web and mobile clients
  4. 4. Open Source Instrumentation: Interfaces, Libraries, and Frameworks
    1. The Importance Of Abstract Instrumentation
    2. OpenTelemetry
    3. OpenTracing and OpenCensus
      1. OpenTracing
      2. OpenCensus
    4. Other Notable Formats and Projects
      1. X-Ray
      2. Zipkin
    5. Interoperability and Migration Strategies
    6. Why Use Open Source Instrumentation?
      1. Interoperability
      2. Portability
      3. Ecosystem and Implicit Visibility
  5. 5. Best Practices for Instrumentation
    1. Tracing By Example
      1. Installing the Sample Application
      2. Adding Basic Distributed Tracing
      3. Custom Instrumentation
    2. Where To Start — Nodes and Edges
      1. Framework Instrumentation
      2. Service Mesh Instrumentation
      3. Creating Your Service Graph
    3. What’s In A Span?
      1. Effective Naming
      2. Effective Tagging
      3. Effective Logging
      4. Understanding Performance Considerations
    4. Trace-Driven Development
      1. Developing With Traces
      2. Testing With Traces
    5. Creating an Instrumentation Plan
      1. Making The Case For Instrumentation
      2. Knowing When To Stop Instrumenting, and Knowing When To Keep Going
  6. 6. Overhead, Costs, and Sampling
    1. Application overhead
      1. Latency
      2. Throughput
    2. Infrastructure costs
      1. Network
      2. Storage
    3. Sampling
      1. Minimum requirements
      2. Strategies
      3. Selecting traces
    4. Off-the-shelf ETL solutions
  7. 7. A New Observability Scorecard
    1. The three pillars defined
      1. Metrics
      2. Logging
      3. Distributed tracing
    2. Fatal flaws of the three pillars
      1. Design goals
      2. Assessing the three pillars
      3. Three pipes (not three pillars)
    3. Observability goals and activities
      1. Two goals in observability
      2. Two fundamental activities in observability
      3. A new scorecard
      4. The path ahead
    4. References
  8. Index
52.54.111.228