Learning OpenTelemetry

Book description

OpenTelemetry is a revolution in observability data. Instead of running multiple uncoordinated pipelines, OpenTelemetry provides users with a single integrated stream of data, providing multiple sources of high-quality telemetry data: tracing, metrics, logs, RUM, eBPF, and more. This practical guide shows you how to set up, operate, and troubleshoot the OpenTelemetry observability system.

Authors Austin Parker, head of developer relations at Lightstep and OpenTelemetry Community Maintainer, and Ted Young, cofounder of the OpenTelemetry project, cover every OpenTelemetry component, as well as observability best practices for many popular cloud, platform, and data services such as Kubernetes and AWS Lambda. You'll learn how OpenTelemetry enables OSS libraries and services to provide their own native instrumentation—a first in the industry.

Ideal for application developers, OSS maintainers, operators and infrastructure teams, and managers and team leaders, this book guides you through:

  • The principles of modern observability
  • All OpenTelemetry components—and how they fit together
  • A practical approach to instrumenting platforms and applications
  • Methods for installing, operating, and troubleshooting an OpenTelemetry-based observability solution
  • Ways to roll out and maintain end-to-end observability across a large organization
  • How to write and maintain consistent, high-quality instrumentation without a lot of work

Publisher resources

View/Submit Errata

Table of contents

  1. 1. The State of Modern Observability: A Brief Overview
    1. The times, they are a-changin’
    2. Observability: Key terms to know
      1. A Brief History of Telemetry
    3. The three browser tabs of observability
    4. Emerging complications
    5. The three pillars were an accident
    6. A Single Braid of Data
    7. Conclusion
  2. 2. Why Use OpenTelemetry?
    1. Production Monitoring: The Status Quo
      1. Why Context Matters
      2. Telemetry Layering
      3. Understanding The Territory
    2. What Do Developers and Operators Need?
      1. Built-In Telemetry
      2. Clear and Consistent APIs
      3. Integrating Telemetry with Tools
    3. What Do Businesses and Organizations Need?
      1. Standardized Data Formats
      2. Portability
      3. Compatibility with Existing Data
    4. OpenTelemetry: A Unifying Force
  3. 3. OpenTelemetry Overview
    1. The OpenTelemetry Model
      1. Primary Observability Signals
      2. Observability Context
      3. OpenTelemetry Protocol
  4. 4. The OpenTelemetry Architecture
    1. Hands-on with the OpenTelemetry Demo
    2. Exploring the Demo Architecture
      1. Framework Instrumentation and Extending Instrumentation
      2. Separation of Concerns
    3. Understanding the OpenTelemetry Architecture
      1. Instrumentation
      2. The API and SDK
      3. The Collector
    4. Conclusion
  5. 5. Instrumenting Applications: Setting Up the SDK and Instrumentation
    1. Configuration best practices
      1. Remote Configuration
    2. Agents and automated setup
    3. Installing the SDK
      1. Registering Providers
      2. TracingProvider
      3. MeterProvider
      4. LoggingProvider
      5. Shutting down Providers
      6. Custom Providers
    4. Attaching resources
      1. Resource detectors
      2. Service resources
    5. Installing instrumentation
    6. Instrumenting application code
      1. Decorating spans
      2. How much is too much?
    7. Browser and mobile clients
    8. The complete setup checklist
    9. Learning from the OpenTelemetry Demo project
    10. Packaging it all up
  6. 6. Instrumenting Libraries
    1. The importance of libraries
    2. Why provide native instrumentation?
      1. Observability works by default in native instrumentation
      2. Native instrumentation lets you communicate with your users
      3. Native instrumentation shows that you care about performance
    3. Why aren’t libraries already instrumented?
    4. How OpenTelemetry is designed to support libraries
      1. OTel separates the instrumentation API and the implementation
      2. OTel maintains backwards compatibility
      3. OTel keeps instrumentation off by default
    5. Best practices for shared libraries
    6. Best practices for shared services
    7. Conclusion
  7. 7. Observing Infrastructure
    1. What Is Infrastructure Observability?
    2. Observing Cloud Providers
      1. Collecting Cloud Metrics and Logs
    3. Observing Platforms
      1. Kubernetes platforms
      2. Serverless platforms
      3. Queues, Service Busses, and Other Async Workflows
  8. About the Authors

Product information

  • Title: Learning OpenTelemetry
  • Author(s): Austin Parker, Ted Young
  • Release date: February 2024
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781098147181